Skip to content

Commit

Permalink
Merge pull request #2 from eltociear/patch-1
Browse files Browse the repository at this point in the history
Update sentencepiece.py
  • Loading branch information
Bam4d authored Apr 17, 2024
2 parents b9cee1c + 07ea0ab commit fcf0316
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mistral_common/tokens/tokenizers/sentencepiece.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def encode_user_message(
system_prompt: Optional[str] = None,
) -> List[int]:
assert message.content is not None
assert isinstance(message.content, str), "Message content must be nornmalized"
assert isinstance(message.content, str), "Message content must be normalized"
content = ""
if is_first and system_prompt:
content = system_prompt + "\n\n" + message.content
Expand Down Expand Up @@ -208,7 +208,7 @@ def encode_user_message(
system_prompt: Optional[str] = None,
) -> List[int]:
assert message.content is not None
assert isinstance(message.content, str), "Message content must be nornmalized"
assert isinstance(message.content, str), "Message content must be normalized"
content = ""
tools_tokens: List[int] = []
if is_last and available_tools:
Expand Down

0 comments on commit fcf0316

Please sign in to comment.