refac
This commit is contained in:
1 parent
576ee92438
commit
4ab831b259
1 file changed
+1
@@ -4163,6 +4163,7 @@ async def streaming_chat_response_handler(response, ctx):
|
||||
tool_args = tool_call.get("function", {}).get("arguments", "{}")
|
||||
|
||||
tool_function_params = {}
|
||||
if tool_args and tool_args.strip():
|
||||
try:
|
||||
# json.loads cannot be used because some models do not produce valid JSON
|
||||
tool_function_params = ast.literal_eval(tool_args)
|
||||
|
||||
Reference in new issue
Block a user