mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-02 03:40: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
|
||||
|
||||
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