Skip to content

Commit 3061d35

Browse files
committed
Add changie and fix CI
1 parent 3b643ff commit 3061d35

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Under the Hood
2+
body: Update example with OpenAI to show tool calls
3+
time: 2025-08-19T19:40:52.220516+02:00

examples/openai_agent/main_streamable.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def print_tool_call(tool_name, params, color="yellow", show_params=True):
2727

2828

2929
def handle_event_printing(event, show_tools_calls=True):
30-
if type(event) == RunItemStreamEvent and show_tools_calls:
30+
if type(event) is RunItemStreamEvent and show_tools_calls:
3131
if event.name == "tool_called":
3232
print_tool_call(
3333
event.item.raw_item.name,
@@ -36,10 +36,10 @@ def handle_event_printing(event, show_tools_calls=True):
3636
show_params=True,
3737
)
3838

39-
if type(event) == RawResponsesStreamEvent:
40-
if type(event.data) == ResponseCompletedEvent:
39+
if type(event) is RawResponsesStreamEvent:
40+
if type(event.data) is ResponseCompletedEvent:
4141
for output in event.data.response.output:
42-
if type(output) == ResponseOutputMessage:
42+
if type(output) is ResponseOutputMessage:
4343
print(output.content[0].text)
4444

4545

0 commit comments

Comments
 (0)