Skip to content
Closed
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
3 changes: 1 addition & 2 deletions pydantic_ai_slim/pydantic_ai/models/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]:
continue

# Handle the text part of the response
content = choice.delta.content
if content is not None:
if (delta := choice.delta) is not None and (content := delta.content) is not None:
yield self._parts_manager.handle_text_delta(vendor_part_id='content', content=content)

for dtc in choice.delta.tool_calls or []:
Expand Down
Loading