Fix SupbaseVectoreStore write operation timeout (#12318)

**Description**
This small change will make chunk_size a configurable parameter for
loading documents into a Supabase database.

**Issue**
https://github.com/langchain-ai/langchain/issues/11422

**Dependencies**
No chanages

**Twitter**
@ j1philli

**Reminder**
If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.

---------

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
This commit is contained in:
Josh Phillips
2023-10-26 15:19:17 -06:00
committed by GitHub
parent b10cefb160
commit 01c5cd365b
3 changed files with 15 additions and 8 deletions

View File

@@ -197,7 +197,7 @@
"id": "5abb9b93",
"metadata": {},
"source": [
"Insert the above documents into the database. Embeddings will automatically be generated for each document."
"Insert the above documents into the database. Embeddings will automatically be generated for each document. You can adjust the chunk_size based on the amount of documents you have. The default is 500 but lowering it may be necessary."
]
},
{
@@ -208,7 +208,7 @@
"outputs": [],
"source": [
"\n",
"vector_store = SupabaseVectorStore.from_documents(docs, embeddings, client=supabase, table_name=\"documents\", query_name=\"match_documents\")"
"vector_store = SupabaseVectorStore.from_documents(docs, embeddings, client=supabase, table_name=\"documents\", query_name=\"match_documents\", chunk_size=500)"
]
},
{