mirror of
https://github.com/open-webui/open-webui
synced 2025-05-19 12:51:35 +00:00
dont delete files and tool_ids
This commit is contained in:
parent
c89df923c5
commit
9652c8f8af
@ -371,7 +371,7 @@ async def chat_completion_tools_handler(
|
|||||||
body: dict, user: UserModel, extra_params: dict
|
body: dict, user: UserModel, extra_params: dict
|
||||||
) -> tuple[dict, dict]:
|
) -> tuple[dict, dict]:
|
||||||
# If tool_ids field is present, call the functions
|
# If tool_ids field is present, call the functions
|
||||||
tool_ids = body.pop("tool_ids", None)
|
tool_ids = body.get("tool_ids", None)
|
||||||
if not tool_ids:
|
if not tool_ids:
|
||||||
return body, {}
|
return body, {}
|
||||||
|
|
||||||
@ -464,7 +464,7 @@ async def chat_completion_files_handler(body) -> tuple[dict, dict[str, list]]:
|
|||||||
contexts = []
|
contexts = []
|
||||||
citations = []
|
citations = []
|
||||||
|
|
||||||
if files := body.pop("files", None):
|
if files := body.get("files", None):
|
||||||
contexts, citations = get_rag_context(
|
contexts, citations = get_rag_context(
|
||||||
files=files,
|
files=files,
|
||||||
messages=body["messages"],
|
messages=body["messages"],
|
||||||
|
Loading…
Reference in New Issue
Block a user