@@ -237,7 +237,7 @@ class PGVector(VectorStore):
237237
238238 def __init__ (
239239 self ,
240- embedding_function : Embeddings ,
240+ embeddings : Embeddings ,
241241 * ,
242242 connection : Optional [Connection ] = None ,
243243 embedding_length : Optional [int ] = None ,
@@ -255,7 +255,7 @@ def __init__(
255255
256256 Args:
257257 connection: Postgres connection string.
258- embedding_function : Any embedding function implementing
258+ embeddings : Any embedding function implementing
259259 `langchain.embeddings.base.Embeddings` interface.
260260 embedding_length: The length of the embedding vector. (default: None)
261261 NOTE: This is not mandatory. Defining it will prevent vectors of
@@ -278,7 +278,7 @@ def __init__(
278278 doesn't exist. disabling creation is useful when using ReadOnly
279279 Databases.
280280 """
281- self .embedding_function = embedding_function
281+ self .embedding_function = embeddings
282282 self ._embedding_length = embedding_length
283283 self .collection_name = collection_name
284284 self .collection_metadata = collection_metadata
@@ -441,7 +441,7 @@ def __from(
441441 store = cls (
442442 connection = connection ,
443443 collection_name = collection_name ,
444- embedding_function = embedding ,
444+ embeddings = embedding ,
445445 distance_strategy = distance_strategy ,
446446 pre_delete_collection = pre_delete_collection ,
447447 use_jsonb = use_jsonb ,
@@ -1068,7 +1068,7 @@ def from_existing_index(
10681068 store = cls (
10691069 connection = connection ,
10701070 collection_name = collection_name ,
1071- embedding_function = embedding ,
1071+ embeddings = embedding ,
10721072 distance_strategy = distance_strategy ,
10731073 pre_delete_collection = pre_delete_collection ,
10741074 )
0 commit comments