mirror of
https://github.com/open-webui/open-webui
synced 2025-04-30 19:14:05 +00:00
refac
This commit is contained in:
parent
913f8a15f9
commit
43efff0fe6
@ -1557,6 +1557,7 @@ async def process_web_search(
|
|||||||
collection_names = []
|
collection_names = []
|
||||||
for doc_idx, doc in enumerate(docs):
|
for doc_idx, doc in enumerate(docs):
|
||||||
if doc and doc.page_content:
|
if doc and doc.page_content:
|
||||||
|
try:
|
||||||
collection_name = f"web-search-{calculate_sha256_string(form_data.query + '-' + urls[doc_idx])}"[
|
collection_name = f"web-search-{calculate_sha256_string(form_data.query + '-' + urls[doc_idx])}"[
|
||||||
:63
|
:63
|
||||||
]
|
]
|
||||||
@ -1570,6 +1571,8 @@ async def process_web_search(
|
|||||||
overwrite=True,
|
overwrite=True,
|
||||||
user=user,
|
user=user,
|
||||||
)
|
)
|
||||||
|
except Exception as e:
|
||||||
|
log.debug(f"error saving doc {doc_idx}: {e}")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"status": True,
|
"status": True,
|
||||||
|
Loading…
Reference in New Issue
Block a user