We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c38709 commit 42aeffcCopy full SHA for 42aeffc
src/agents/models/openai_chatcompletions.py
@@ -208,8 +208,10 @@ async def stream_response(
208
continue
209
210
delta = chunk.choices[0].delta
211
- reasoning_content = getattr(delta, "reasoning_content")
212
- content = reasoning_content if reasoning_content else delta.content
+ if hasattr(delta, "reasoning_content"):
+ content = delta.reasoning_content if delta.reasoning_content else delta.content
213
+ else:
214
+ content = delta.content
215
216
# Handle text
217
if content:
0 commit comments