Skip to content

Commit

Permalink
Update pr_agent/algo/utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com>
  • Loading branch information
mrT23 and qodo-merge-pro[bot] authored Jul 28, 2024
1 parent 6ba7b3e commit 27d6560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pr_agent/algo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ def get_max_tokens(model):
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")
raise Exception(f"Ensure {model} is defined in MAX_TOKENS in ./pr_agent/algo/__init__.py or set a positive value for it in config.custom_model_max_tokens")

if settings.config.max_model_tokens and settings.config.max_model_tokens > 0:
max_tokens_model = min(settings.config.max_model_tokens, max_tokens_model)
Expand Down

0 comments on commit 27d6560

Please sign in to comment.