🐛 fix(vector_store.py): rename 'texts' parameter to 'documents' to improve semantics
✨ feat(vector_store.py): add support for Supabase client object to be passed in as a parameter
The 'texts' parameter has been renamed to 'documents' to improve semantics. This change makes it clearer that the parameter is a list of documents. Additionally, support for a Supabase client object has been added as a parameter. This allows for more flexibility in the initialization of the SupabaseVectorStore class.
This commit is contained in:
parent
c4f3476646
commit
9417dd69f6
1 changed files with 4 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue