@@ -1717,7 +1717,8 @@ def act(
1717
1717
([TextPart (text = step .text )] if step .text else [])
1718
1718
+ (step .reasoning_parts if step .reasoning_parts else [])
1719
1719
+ (step .tool_calls or [])
1720
- )
1720
+ ),
1721
+ response_id = step .response_id
1721
1722
)
1722
1723
result_messages .append (assistant_msg )
1723
1724
if step .tool_results :
@@ -1874,6 +1875,7 @@ def act_stream(
1874
1875
tool_calls = tool_calls if tool_calls else None ,
1875
1876
finish_reason = act_response .finish_reason ,
1876
1877
usage = act_response .usage ,
1878
+ response_id = act_response .message .response_id if act_response .message .response_id else None
1877
1879
)
1878
1880
1879
1881
# Check if there are tool calls
@@ -2135,7 +2137,8 @@ async def act(
2135
2137
([TextPart (text = step .text )] if step .text else [])
2136
2138
+ (step .reasoning_parts if step .reasoning_parts else [])
2137
2139
+ (step .tool_calls or [])
2138
- )
2140
+ ),
2141
+ response_id = step .response_id
2139
2142
)
2140
2143
result_messages .append (assistant_msg )
2141
2144
if step .tool_results :
@@ -2292,6 +2295,7 @@ async def act_stream(
2292
2295
tool_calls = tool_calls if tool_calls else None ,
2293
2296
finish_reason = act_response .finish_reason ,
2294
2297
usage = act_response .usage ,
2298
+ response_id = act_response .message .response_id if act_response .message .response_id else None
2295
2299
)
2296
2300
2297
2301
# Check if there are tool calls
0 commit comments