mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 21:00:40 +08:00
fix condition
This commit is contained in:
@ -705,7 +705,7 @@ def get_max_tokens(model):
|
|||||||
settings = get_settings()
|
settings = get_settings()
|
||||||
if model in MAX_TOKENS:
|
if model in MAX_TOKENS:
|
||||||
max_tokens_model = MAX_TOKENS[model]
|
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
|
max_tokens_model = settings.config.custom_model_max_tokens
|
||||||
else:
|
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"MAX_TOKENS must be set for model {model} in ./pr_agent/algo/__init__.py, or set config.custom_model_max_tokens")
|
||||||
|
Reference in New Issue
Block a user