diff --git a/reme2/component/as_token_counter/estimate_token_counter.py b/reme2/component/as_token_counter/estimate_token_counter.py index f95b6f62..c36da7aa 100644 --- a/reme2/component/as_token_counter/estimate_token_counter.py +++ b/reme2/component/as_token_counter/estimate_token_counter.py @@ -19,7 +19,7 @@ class EstimatedTokenCounter(TokenCounterBase): Default 4 assumes roughly 4 characters per token. Use 2-3 for Chinese/Japanese text, 4-5 for English. """ - if estimate_divisor == 0: + if estimate_divisor <= 0: raise ValueError("estimate_divisor cannot be zero") self.estimate_divisor: float = estimate_divisor