File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Filter options
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(
1519
1519
1520
1520
if stream :
1521
1521
remaining_tokens = completion_tokens [returned_tokens :]
1522
- all_text = self .detokenize (
1522
+ remaining_text = self .detokenize (
1523
1523
remaining_tokens ,
1524
1524
prev_tokens = prompt_tokens + completion_tokens [:returned_tokens ],
1525
1525
)
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 ]
1527
1527
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 )
1529
1529
else :
1530
- end = len (all_text )
1530
+ end = len (remaining_text )
1531
1531
1532
1532
token_end_position = 0
1533
1533
for token in remaining_tokens :
You can’t perform that action at this time.
0 commit comments