mirror of
https://github.com/open-webui/open-webui
synced 2024-11-07 00:59:52 +00:00
refac
This commit is contained in:
parent
6d764ee55e
commit
677c36c3aa
@ -320,7 +320,7 @@ def get_rag_context(
|
|||||||
if file.get("context") == "full":
|
if file.get("context") == "full":
|
||||||
context = {
|
context = {
|
||||||
"documents": [[file["content"]]],
|
"documents": [[file["content"]]],
|
||||||
"metadatas": [[{"file_id": file["id"], "name": file["name"]}]],
|
"metadatas": [[{"file_id": file.get("id"), "name": file.get("name")}]],
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
context = None
|
context = None
|
||||||
|
Loading…
Reference in New Issue
Block a user