Skip to content

Commit 0542cfc

Browse files
committed
avoid encode ascii
1 parent 979d3c4 commit 0542cfc

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/agents/mcp/util.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,7 @@ async def invoke_mcp_tool(
116116
if len(result.content) == 1:
117117
tool_output = result.content[0].model_dump_json()
118118
elif len(result.content) > 1:
119-
tool_output = json.dumps(
120-
[item.model_dump() for item in result.content],
121-
ensure_ascii=False
122-
)
119+
tool_output = json.dumps([item.model_dump() for item in result.content])
123120
else:
124121
logger.error(f"Errored MCP tool result: {result}")
125122
tool_output = "Error running tool."

src/agents/models/chatcmpl_converter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,7 @@ def ensure_assistant_message() -> ChatCompletionAssistantMessageParam:
393393
{
394394
"queries": file_search.get("queries", []),
395395
"status": file_search.get("status"),
396-
},
397-
ensure_ascii=False
396+
}
398397
),
399398
},
400399
)

0 commit comments

Comments
 (0)