Skip to content

Commit 0756a2d

Browse files
committed
Now the last token sent when stream=True
1 parent 3687262 commit 0756a2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama_cpp/llama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ def _create_completion(
953953
token_end_position += len(self.detokenize([token]))
954954
# Check if stop sequence is in the token
955955
if token_end_position >= (
956-
remaining_length - first_stop_position - 1
956+
remaining_length - first_stop_position
957957
):
958958
break
959959
logprobs_or_none: Optional[CompletionLogprobs] = None

0 commit comments

Comments
 (0)