|
|
|
@@ -126,8 +126,8 @@ class FunctionCallAgentRunner(BaseAgentRunner): |
|
|
|
tool_call_inputs = json.dumps( |
|
|
|
{tool_call[1]: tool_call[2] for tool_call in tool_calls}, ensure_ascii=False |
|
|
|
) |
|
|
|
except json.JSONDecodeError: |
|
|
|
# ensure ascii to avoid encoding error |
|
|
|
except TypeError: |
|
|
|
# fallback: force ASCII to handle non-serializable objects |
|
|
|
tool_call_inputs = json.dumps({tool_call[1]: tool_call[2] for tool_call in tool_calls}) |
|
|
|
|
|
|
|
if chunk.delta.message and chunk.delta.message.content: |
|
|
|
@@ -153,8 +153,8 @@ class FunctionCallAgentRunner(BaseAgentRunner): |
|
|
|
tool_call_inputs = json.dumps( |
|
|
|
{tool_call[1]: tool_call[2] for tool_call in tool_calls}, ensure_ascii=False |
|
|
|
) |
|
|
|
except json.JSONDecodeError: |
|
|
|
# ensure ascii to avoid encoding error |
|
|
|
except TypeError: |
|
|
|
# fallback: force ASCII to handle non-serializable objects |
|
|
|
tool_call_inputs = json.dumps({tool_call[1]: tool_call[2] for tool_call in tool_calls}) |
|
|
|
|
|
|
|
if result.usage: |