mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
refac
This commit is contained in:
parent
3d6f5f418d
commit
049b3136e8
1 changed files with 3 additions and 3 deletions
|
|
@ -284,6 +284,7 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
|
|||
context = ""
|
||||
|
||||
for tool_id in data["tool_ids"]:
|
||||
print(tool_id)
|
||||
response = await get_function_call_response(
|
||||
prompt=prompt,
|
||||
tool_id=tool_id,
|
||||
|
|
@ -291,10 +292,9 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
|
|||
task_model_id=task_model_id,
|
||||
user=user,
|
||||
)
|
||||
print(response)
|
||||
|
||||
if response:
|
||||
context = ("\n" if context != "" else "") + response
|
||||
context += ("\n" if context != "" else "") + response
|
||||
|
||||
if context != "":
|
||||
system_prompt = rag_template(
|
||||
|
|
|
|||
Loading…
Reference in a new issue