Rename the component's output.

This commit is contained in:
coolgo0811 2024-01-07 12:12:06 +08:00
commit 96ebc115f3

View file

@ -56,13 +56,13 @@ class PGVectorComponent(CustomComponent):
try:
if documents is None:
embedding = PGVector.from_existing_index(
vector_store = PGVector.from_existing_index(
embedding=embedding,
collection_name=collection_name,
connection_string=pg_server_url,
)
embedding = PGVector.from_documents(
vector_store = PGVector.from_documents(
embedding=embedding,
documents=documents,
collection_name=collection_name,
@ -70,4 +70,4 @@ class PGVectorComponent(CustomComponent):
)
except Exception as e:
raise RuntimeError(f"Failed to build PGVector: {e}")
return embedding
return vector_store