mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 12:50:38 +08:00
disabling 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