File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -239,18 +239,11 @@ def append_output(self, output) -> None:
239239 # beginning of a new message
240240 self .first_tok_of_message = output .finished
241241 tok = output .outputs [0 ].token_ids [0 ]
242- try :
243- self .parser .process (tok )
244- # Only update these if parsing succeeded
245- self ._update_num_output_tokens (output .outputs [0 ].token_ids )
246- # Check if the current token is part of reasoning content
247- self ._update_num_reasoning_tokens ([tok ])
248- self .last_tok = tok
249- except Exception as e :
250- # Log the error but continue processing to avoid breaking stream
251- logger .warning ("Parser error processing token %s: %s" , tok , e )
252- # Skip this token to avoid parser state corruption
253- # Don't update last_tok or token counts for failed tokens
242+ self .parser .process (tok )
243+ self ._update_num_output_tokens (output .outputs [0 ].token_ids )
244+ # Check if the current token is part of reasoning content
245+ self ._update_num_reasoning_tokens ([tok ])
246+ self .last_tok = tok
254247 else :
255248 # Handle the case of tool output in direct message format
256249 assert len (output ) == 1 , "Tool output should be a single message"
You can’t perform that action at this time.
0 commit comments