mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-07 02:58:21 +00:00
fix: async save docs to vector db
This commit is contained in:
parent
c631659327
commit
4370dee79e
1 changed files with 13 additions and 3 deletions
|
|
@ -1689,7 +1689,7 @@ async def process_text(
|
|||
log.debug(f"text_content: {text_content}")
|
||||
|
||||
result = await run_in_threadpool(
|
||||
save_docs_to_vector_db, request, docs, collection_name, user
|
||||
save_docs_to_vector_db, request, docs, collection_name, user=user
|
||||
)
|
||||
if result:
|
||||
return {
|
||||
|
|
@ -1721,7 +1721,12 @@ async def process_web(
|
|||
|
||||
if not request.app.state.config.BYPASS_WEB_SEARCH_EMBEDDING_AND_RETRIEVAL:
|
||||
await run_in_threadpool(
|
||||
save_docs_to_vector_db, request, docs, collection_name, True, user
|
||||
save_docs_to_vector_db,
|
||||
request,
|
||||
docs,
|
||||
collection_name,
|
||||
overwrite=True,
|
||||
user=user,
|
||||
)
|
||||
else:
|
||||
collection_name = None
|
||||
|
|
@ -2464,7 +2469,12 @@ async def process_files_batch(
|
|||
if all_docs:
|
||||
try:
|
||||
await run_in_threadpool(
|
||||
save_docs_to_vector_db, request, all_docs, collection_name, True, user
|
||||
save_docs_to_vector_db,
|
||||
request,
|
||||
all_docs,
|
||||
collection_name,
|
||||
add=True,
|
||||
user=user,
|
||||
)
|
||||
|
||||
# Update all files with collection name
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue