mirror of
https://github.com/open-webui/open-webui
synced 2025-03-04 11:29:59 +00:00
Merge pull request #5777 from smonux/dev
Fix: sanitize function calling json
This commit is contained in:
commit
9636913de0
@ -448,6 +448,7 @@ async def chat_completion_tools_handler(
|
||||
if not content:
|
||||
return body, {}
|
||||
|
||||
content = content[content.find("{") : content.rfind("}") + 1]
|
||||
result = json.loads(content)
|
||||
|
||||
tool_function_name = result.get("name", None)
|
||||
|
Loading…
Reference in New Issue
Block a user