Skip to content

Commit

Permalink
🐛 Bug: Fix the bug in calculating the number of PDF tokens.
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed Oct 8, 2024
1 parent 8224202 commit 4361551
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="modelmerge",
version="0.11.51",
version="0.11.52",
description="modelmerge is a multi-large language model API aggregator.",
long_description=Path.open(Path("README.md"), encoding="utf-8").read(),
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion src/ModelMerge/utils/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def get_encode_text(text, model_name):
tiktoken.get_encoding("cl100k_base")
model_name = "gpt-3.5-turbo"
encoding = tiktoken.encoding_for_model(model_name)
encode_text = encoding.encode(text)
encode_text = encoding.encode(text, disallowed_special=())
return encoding, encode_text

def get_text_token_len(text, model_name):
Expand Down

0 comments on commit 4361551

Please sign in to comment.