Skip to content

Commit

Permalink
fix: remove unnecessary stop sequence (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsorber authored Jan 6, 2025
1 parent d1e1f39 commit 479121e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/raglite/_chatml_function_calling.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ def chatml_function_calling_with_streaming(
# Collect the llama.create_completion keyword arguments so we don't have to repeat these with
# each completion call
stop = (
[stop, "<|im_end|>", "|im_end|>"]
[stop, "<|im_end|>"]
if isinstance(stop, str)
else [*stop, "<|im_end|>", "|im_end|>"]
else [*stop, "<|im_end|>"]
if stop
else ["<|im_end|>", "|im_end|>"]
else ["<|im_end|>"]
)
grammar = ( # It is assumed the grammar applies to messages only, not tool calls
grammar
Expand Down

0 comments on commit 479121e

Please sign in to comment.