mirror of
https://github.com/open-webui/open-webui
synced 2024-11-26 22:09:51 +00:00
fixhandle arguments in ollama
This commit is contained in:
parent
b4f1ea6013
commit
0de6419a29
@ -595,7 +595,11 @@ async def handle_nonstreaming_response(request: Request, response: Response,
|
||||
if not tool_call["function"]["arguments"]:
|
||||
tool_function_params = {}
|
||||
else:
|
||||
tool_function_params = json.loads(tool_call["function"]["arguments"])
|
||||
if is_openai:
|
||||
tool_function_params = json.loads(tool_call["function"]["arguments"])
|
||||
if is_ollama:
|
||||
tool_function_params = tool_call["function"]["arguments"]
|
||||
|
||||
|
||||
try:
|
||||
tool_output = await tools[tool_function_name]["callable"](**tool_function_params)
|
||||
|
Loading…
Reference in New Issue
Block a user