mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 13:20:39 +08:00
Merge pull request #7 from Codium-ai/algo/fix_speacial_tokens
Fix encoding error on special_tokens
This commit is contained in:
@ -21,4 +21,4 @@ class TokenHandler:
|
|||||||
return system_prompt_tokens + user_prompt_tokens
|
return system_prompt_tokens + user_prompt_tokens
|
||||||
|
|
||||||
def count_tokens(self, patch: str) -> int:
|
def count_tokens(self, patch: str) -> int:
|
||||||
return len(self.encoder.encode(patch))
|
return len(self.encoder.encode(patch, disallowed_special=()))
|
Reference in New Issue
Block a user