File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1519,15 +1519,15 @@ def logit_bias_processor(
15191519
15201520 if stream :
15211521 remaining_tokens = completion_tokens [returned_tokens :]
1522- all_text = self .detokenize (
1522+ remaining_text = self .detokenize (
15231523 remaining_tokens ,
15241524 prev_tokens = prompt_tokens + completion_tokens [:returned_tokens ],
15251525 )
1526- any_stop = [s for s in stop_sequences if s in all_text ]
1526+ any_stop = [s for s in stop_sequences if s in remaining_text ]
15271527 if len (any_stop ) > 0 :
1528- end = min (all_text .index (stop ) for stop in any_stop )
1528+ end = min (remaining_text .index (stop ) for stop in any_stop )
15291529 else :
1530- end = len (all_text )
1530+ end = len (remaining_text )
15311531
15321532 token_end_position = 0
15331533 for token in remaining_tokens :
You can’t perform that action at this time.
0 commit comments