File tree Expand file tree Collapse file tree 2 files changed +2
-29
lines changed
crates/chat-cli/src/cli/chat Expand file tree Collapse file tree 2 files changed +2
-29
lines changed Original file line number Diff line number Diff line change @@ -3337,38 +3337,12 @@ impl ChatContext {
3337
3337
tool_use_id,
3338
3338
name,
3339
3339
message,
3340
- time_elapsed ,
3340
+ ..
3341
3341
} => {
3342
3342
error ! (
3343
3343
recv_error. request_id,
3344
3344
tool_use_id, name, "The response stream ended before the entire tool use was received"
3345
3345
) ;
3346
- if self . interactive {
3347
- drop ( self . spinner . take ( ) ) ;
3348
- queue ! (
3349
- self . output,
3350
- terminal:: Clear ( terminal:: ClearType :: CurrentLine ) ,
3351
- cursor:: MoveToColumn ( 0 ) ,
3352
- style:: SetForegroundColor ( Color :: Yellow ) ,
3353
- style:: SetAttribute ( Attribute :: Bold ) ,
3354
- style:: Print ( format!(
3355
- "Warning: received an unexpected error from the model after {:.2}s" ,
3356
- time_elapsed. as_secs_f64( )
3357
- ) ) ,
3358
- ) ?;
3359
- if let Some ( request_id) = recv_error. request_id {
3360
- queue ! (
3361
- self . output,
3362
- style:: Print ( format!( "\n request_id: {}" , request_id) )
3363
- ) ?;
3364
- }
3365
- execute ! ( self . output, style:: Print ( "\n \n " ) , style:: SetAttribute ( Attribute :: Reset ) ) ?;
3366
- self . spinner = Some ( Spinner :: new (
3367
- Spinners :: Dots ,
3368
- "Trying to divide up the work..." . to_string ( ) ,
3369
- ) ) ;
3370
- }
3371
-
3372
3346
self . conversation_state . push_assistant_message ( * message, database) ;
3373
3347
let tool_results = vec ! [ ToolUseResult {
3374
3348
tool_use_id,
Original file line number Diff line number Diff line change @@ -202,7 +202,6 @@ impl ResponseParser {
202
202
// If we failed deserializing after waiting for a long time, then this is most
203
203
// likely bedrock responding with a stop event for some reason without actually
204
204
// including the tool contents. Essentially, the tool was too large.
205
- // Timeouts have been seen as short as ~1 minute, so setting the time to 30.
206
205
let time_elapsed = start. elapsed ( ) ;
207
206
let args = serde_json:: Value :: Object (
208
207
[ (
@@ -214,7 +213,7 @@ impl ResponseParser {
214
213
. into_iter ( )
215
214
. collect ( ) ,
216
215
) ;
217
- if self . peek ( ) . await ?. is_none ( ) && time_elapsed > Duration :: from_secs ( 30 ) {
216
+ if self . peek ( ) . await ?. is_none ( ) {
218
217
error ! (
219
218
"Received an unexpected end of stream after spending ~{}s receiving tool events" ,
220
219
time_elapsed. as_secs_f64( )
You can’t perform that action at this time.
0 commit comments