Skip to content

Commit f6ed7c7

Browse files
authored
fix handling of non textual responses in Agent.to_cli cli tools (#1823)
1 parent 29e9aa9 commit f6ed7c7

File tree

1 file changed

+1
-1
lines changed
  • pydantic_ai_slim/pydantic_ai

1 file changed

+1
-1
lines changed

pydantic_ai_slim/pydantic_ai/_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ async def ask_agent(
284284
stack.enter_context(live) # entering multiple times is idempotent
285285

286286
async for content in handle_stream.stream_output(debounce_by=None):
287-
live.update(Markdown(content, code_theme=code_theme))
287+
live.update(Markdown(str(content), code_theme=code_theme))
288288

289289
assert agent_run.result is not None
290290
return agent_run.result.all_messages()

0 commit comments

Comments
 (0)