From 6ba7b3eea24be52a470336e09df5def80752ab4f Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 28 Jul 2024 08:57:39 +0300 Subject: [PATCH] fix condition --- pr_agent/algo/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_agent/algo/utils.py b/pr_agent/algo/utils.py index e759d78c..dd010921 100644 --- a/pr_agent/algo/utils.py +++ b/pr_agent/algo/utils.py @@ -705,7 +705,7 @@ def get_max_tokens(model): settings = get_settings() if model in MAX_TOKENS: max_tokens_model = MAX_TOKENS[model] - elif model in settings.config.custom_model_max_tokens > 0: + elif settings.config.custom_model_max_tokens > 0: max_tokens_model = settings.config.custom_model_max_tokens else: raise Exception(f"MAX_TOKENS must be set for model {model} in ./pr_agent/algo/__init__.py, or set config.custom_model_max_tokens")