Skip to content

Commit 8d4d0db

Browse files
committed
fix: tool_call dump ascii bug
1 parent 7818f2c commit 8d4d0db

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

veadk/tracing/telemetry/attributes/extractors/tool_attributes_extractors.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ def tool_cozeloop_input(params: ToolAttributesParams) -> ExtractorResponse:
4444
"description": params.tool.description,
4545
"parameters": params.args,
4646
}
47-
return ExtractorResponse(content=json.dumps(tool_input) or "<unknown_tool_input>")
47+
return ExtractorResponse(
48+
content=json.dumps(tool_input, ensure_ascii=False) or "<unknown_tool_input>"
49+
)
4850

4951

5052
def tool_gen_ai_tool_name(params: ToolAttributesParams) -> ExtractorResponse:
@@ -60,7 +62,9 @@ def tool_cozeloop_output(params: ToolAttributesParams) -> ExtractorResponse:
6062
"name": function_response["name"],
6163
"response": function_response["response"],
6264
}
63-
return ExtractorResponse(content=json.dumps(tool_output) or "<unknown_tool_output>")
65+
return ExtractorResponse(
66+
content=json.dumps(tool_output, ensure_ascii=False) or "<unknown_tool_output>"
67+
)
6468

6569

6670
TOOL_ATTRIBUTES = {

0 commit comments

Comments
 (0)