Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/agents/extensions/models/litellm_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def get_response(
logger.debug("Received model response")
else:
logger.debug(
f"LLM resp:\n{json.dumps(response.choices[0].message.model_dump(), indent=2)}\n"
f"LLM resp:\n{json.dumps(response.choices[0].message.model_dump(), indent=2, ensure_ascii=False)}\n"
)

if hasattr(response, "usage"):
Expand Down Expand Up @@ -269,8 +269,8 @@ async def _fetch_response(
else:
logger.debug(
f"Calling Litellm model: {self.model}\n"
f"{json.dumps(converted_messages, indent=2)}\n"
f"Tools:\n{json.dumps(converted_tools, indent=2)}\n"
f"{json.dumps(converted_messages, indent=2, ensure_ascii=False)}\n"
f"Tools:\n{json.dumps(converted_tools, indent=2, ensure_ascii=False)}\n"
f"Stream: {stream}\n"
f"Tool choice: {tool_choice}\n"
f"Response format: {response_format}\n"
Expand Down
6 changes: 3 additions & 3 deletions src/agents/models/openai_chatcompletions.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async def get_response(
if message is not None:
logger.debug(
"LLM resp:\n%s\n",
json.dumps(message.model_dump(), indent=2),
json.dumps(message.model_dump(), indent=2, ensure_ascii=False),
)
else:
finish_reason = first_choice.finish_reason if first_choice else "-"
Expand Down Expand Up @@ -256,8 +256,8 @@ async def _fetch_response(
logger.debug("Calling LLM")
else:
logger.debug(
f"{json.dumps(converted_messages, indent=2)}\n"
f"Tools:\n{json.dumps(converted_tools, indent=2)}\n"
f"{json.dumps(converted_messages, indent=2, ensure_ascii=False)}\n"
f"Tools:\n{json.dumps(converted_tools, indent=2, ensure_ascii=False)}\n"
f"Stream: {stream}\n"
f"Tool choice: {tool_choice}\n"
f"Response format: {response_format}\n"
Expand Down
6 changes: 3 additions & 3 deletions src/agents/models/openai_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async def get_response(
else:
logger.debug(
"LLM resp:\n"
f"{json.dumps([x.model_dump() for x in response.output], indent=2)}\n"
f"{json.dumps([x.model_dump() for x in response.output], indent=2, ensure_ascii=False)}\n"
)

usage = (
Expand Down Expand Up @@ -249,8 +249,8 @@ async def _fetch_response(
else:
logger.debug(
f"Calling LLM {self.model} with input:\n"
f"{json.dumps(list_input, indent=2)}\n"
f"Tools:\n{json.dumps(converted_tools.tools, indent=2)}\n"
f"{json.dumps(list_input, indent=2, ensure_ascii=False)}\n"
f"Tools:\n{json.dumps(converted_tools.tools, indent=2, ensure_ascii=False)}\n"
f"Stream: {stream}\n"
f"Tool choice: {tool_choice}\n"
f"Response format: {response_format}\n"
Expand Down