mirror of
https://github.com/open-webui/open-webui
synced 2025-04-16 13:39:39 +00:00
fix: web attachment issue
This commit is contained in:
parent
f54ab7e551
commit
6336d34b59
@ -709,8 +709,8 @@ def save_docs_to_vector_db(
|
|||||||
if overwrite:
|
if overwrite:
|
||||||
VECTOR_DB_CLIENT.delete_collection(collection_name=collection_name)
|
VECTOR_DB_CLIENT.delete_collection(collection_name=collection_name)
|
||||||
log.info(f"deleting existing collection {collection_name}")
|
log.info(f"deleting existing collection {collection_name}")
|
||||||
|
elif add is False:
|
||||||
if add is False:
|
log.info(f"collection {collection_name} already exists, overwrite is False and add is False")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
log.info(f"adding to collection {collection_name}")
|
log.info(f"adding to collection {collection_name}")
|
||||||
|
@ -385,6 +385,8 @@ def get_rag_context(
|
|||||||
extracted_collections.extend(collection_names)
|
extracted_collections.extend(collection_names)
|
||||||
|
|
||||||
if context:
|
if context:
|
||||||
|
if "data" in file:
|
||||||
|
del file["data"]
|
||||||
relevant_contexts.append({**context, "file": file})
|
relevant_contexts.append({**context, "file": file})
|
||||||
|
|
||||||
contexts = []
|
contexts = []
|
||||||
@ -401,7 +403,6 @@ def get_rag_context(
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
contexts.append(
|
contexts.append(
|
||||||
((", ".join(file_names) + ":\n\n") if file_names else "")
|
((", ".join(file_names) + ":\n\n") if file_names else "")
|
||||||
+ "\n\n".join(
|
+ "\n\n".join(
|
||||||
|
Loading…
Reference in New Issue
Block a user