mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 10:55:17 +00:00
Add a null check for user_message_only_models before using it
This commit is contained in:
parent
7eb26b3220
commit
48377e3c81
1 changed files with 2 additions and 2 deletions
|
|
@ -198,8 +198,8 @@ class LiteLLMAIHandler(BaseAiHandler):
|
||||||
{"type": "image_url", "image_url": {"url": img_path}}]
|
{"type": "image_url", "image_url": {"url": img_path}}]
|
||||||
|
|
||||||
# Currently, some models do not support a separate system and user prompts
|
# Currently, some models do not support a separate system and user prompts
|
||||||
user_message_only_models = get_settings().config.user_message_only_models
|
user_message_only_models = get_settings().config.user_message_only_models or []
|
||||||
if user_message_only_models and any(entry in model for entry in user_message_only_models):
|
if user_message_only_models and any(entry.lower() in model.lower() for entry in user_message_only_models):
|
||||||
user = f"{system}\n\n\n{user}"
|
user = f"{system}\n\n\n{user}"
|
||||||
system = ""
|
system = ""
|
||||||
get_logger().info(f"Using model {model}, combining system and user prompts")
|
get_logger().info(f"Using model {model}, combining system and user prompts")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue