From 9417dd69f6135b6bbe8d4e7300d6b30901f6f76d Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 22 Jun 2023 21:27:17 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(vector=5Fstore.py):=20rename?= =?UTF-8?q?=20'texts'=20parameter=20to=20'documents'=20to=20improve=20sema?= =?UTF-8?q?ntics=20=E2=9C=A8=20feat(vector=5Fstore.py):=20add=20support=20?= =?UTF-8?q?for=20Supabase=20client=20object=20to=20be=20passed=20in=20as?= =?UTF-8?q?=20a=20parameter=20The=20'texts'=20parameter=20has=20been=20ren?= =?UTF-8?q?amed=20to=20'documents'=20to=20improve=20semantics.=20This=20ch?= =?UTF-8?q?ange=20makes=20it=20clearer=20that=20the=20parameter=20is=20a?= =?UTF-8?q?=20list=20of=20documents.=20Additionally,=20support=20for=20a?= =?UTF-8?q?=20Supabase=20client=20object=20has=20been=20added=20as=20a=20p?= =?UTF-8?q?arameter.=20This=20allows=20for=20more=20flexibility=20in=20the?= =?UTF-8?q?=20initialization=20of=20the=20SupabaseVectorStore=20class.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/initialize/vector_store.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/interface/initialize/vector_store.py b/src/backend/langflow/interface/initialize/vector_store.py index 51d330804..d960adb89 100644 --- a/src/backend/langflow/interface/initialize/vector_store.py +++ b/src/backend/langflow/interface/initialize/vector_store.py @@ -33,8 +33,11 @@ def initialize_supabase(class_object: Type[SupabaseVectorStore], params: dict): supabase: Client = create_client(**client_kwargs) if not docs_in_params(params): return class_object(client=supabase, **params) + # If there are docs in the params, create a new index + if "texts" in params: + params["documents"] = params.pop("texts") - return class_object.from_documents(**params) + return class_object.from_documents(client=supabase, **params) def initialize_weaviate(class_object: Type[Weaviate], params: dict):