mirror of
https://github.com/open-webui/open-webui
synced 2025-06-04 03:37:35 +00:00
refac
This commit is contained in:
parent
2fcf5d8578
commit
70718dda90
@ -1520,20 +1520,20 @@ async def process_web_search(
|
|||||||
else:
|
else:
|
||||||
collection_names = []
|
collection_names = []
|
||||||
for doc_idx, doc in enumerate(docs):
|
for doc_idx, doc in enumerate(docs):
|
||||||
collection_name = f"web-search-{calculate_sha256_string(form_data.query + '-' + urls[doc_idx])}"[
|
if doc and doc.page_content:
|
||||||
:63
|
collection_name = f"web-search-{calculate_sha256_string(form_data.query + '-' + urls[doc_idx])}"[
|
||||||
]
|
:63
|
||||||
|
]
|
||||||
|
|
||||||
collection_names.append(collection_name)
|
collection_names.append(collection_name)
|
||||||
|
await run_in_threadpool(
|
||||||
await run_in_threadpool(
|
save_docs_to_vector_db,
|
||||||
save_docs_to_vector_db,
|
request,
|
||||||
request,
|
[doc],
|
||||||
[doc],
|
collection_name,
|
||||||
collection_name,
|
overwrite=True,
|
||||||
overwrite=True,
|
user=user,
|
||||||
user=user,
|
)
|
||||||
)
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"status": True,
|
"status": True,
|
||||||
|
Loading…
Reference in New Issue
Block a user