We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent4bc33e3 commita714cf4Copy full SHA for a714cf4
src/agents/models/chatcmpl_stream_handler.py
@@ -150,6 +150,12 @@ async def handle_stream(
150
)
151
152
ifreasoning_contentandstate.reasoning_content_index_and_output:
153
+# Ensure summary list has at least one element
154
+ifnotstate.reasoning_content_index_and_output[1].summary:
155
+state.reasoning_content_index_and_output[1].summary= [
156
+Summary(text="",type="summary_text")
157
+ ]
158
+
159
yieldResponseReasoningSummaryTextDeltaEvent(
160
delta=reasoning_content,
161
item_id=FAKE_RESPONSES_ID,
@@ -201,7 +207,7 @@ async def handle_stream(
201
207
202
208
203
209
# Create a new summary with updated text
204
-ifstate.reasoning_content_index_and_output[1].contentisNone:
210
+ifnotstate.reasoning_content_index_and_output[1].content:
205
211
state.reasoning_content_index_and_output[1].content= [
206
212
Content(text="",type="reasoning_text")
213
]