mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 10:55:17 +00:00
Fix TypeError
This commit is contained in:
parent
f198e6fa09
commit
97f2b6f736
1 changed files with 1 additions and 1 deletions
|
|
@ -167,7 +167,7 @@ class TokenHandler:
|
||||||
encoder_estimate = len(self.encoder.encode(patch, disallowed_special=()))
|
encoder_estimate = len(self.encoder.encode(patch, disallowed_special=()))
|
||||||
|
|
||||||
if force_accurate:
|
if force_accurate:
|
||||||
return self.get_token_count_by_model_type(patch, encoder_estimate=encoder_estimate)
|
return self.get_token_count_by_model_type(patch, encoder_estimate)
|
||||||
|
|
||||||
# If an estimate is enough (for example, in cases where the maximal allowed tokens is way below the known limits), return it.
|
# If an estimate is enough (for example, in cases where the maximal allowed tokens is way below the known limits), return it.
|
||||||
return encoder_estimate
|
return encoder_estimate
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue