Skip to content
Merged
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
4 changes: 2 additions & 2 deletions examples/basic/stream_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def main():
continue
elif event.type == "run_item_stream_event":
if event.item.type == "tool_call_item":
print("-- Tool was called")
print(f"-- Tool was called: {getattr(event.item.raw_item, 'name', 'Unknown Tool')}")
elif event.item.type == "tool_call_output_item":
print(f"-- Tool output: {event.item.output}")
elif event.item.type == "message_output_item":
Expand All @@ -47,7 +47,7 @@ async def main():

# === Run starting ===
# Agent updated: Joker
# -- Tool was called
# -- Tool was called: how_many_jokes
# -- Tool output: 4
# -- Message output:
# Sure, here are four jokes for you:
Expand Down