mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 20:07:49 +01:00
refac
This commit is contained in:
@@ -284,6 +284,7 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
|
|||||||
context = ""
|
context = ""
|
||||||
|
|
||||||
for tool_id in data["tool_ids"]:
|
for tool_id in data["tool_ids"]:
|
||||||
|
print(tool_id)
|
||||||
response = await get_function_call_response(
|
response = await get_function_call_response(
|
||||||
prompt=prompt,
|
prompt=prompt,
|
||||||
tool_id=tool_id,
|
tool_id=tool_id,
|
||||||
@@ -291,10 +292,9 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
|
|||||||
task_model_id=task_model_id,
|
task_model_id=task_model_id,
|
||||||
user=user,
|
user=user,
|
||||||
)
|
)
|
||||||
print(response)
|
|
||||||
|
|
||||||
if response:
|
if response:
|
||||||
context = ("\n" if context != "" else "") + response
|
context += ("\n" if context != "" else "") + response
|
||||||
|
|
||||||
if context != "":
|
if context != "":
|
||||||
system_prompt = rag_template(
|
system_prompt = rag_template(
|
||||||
|
|||||||
Reference in New Issue
Block a user