Skip to content

Commit

Permalink
Update O1_MODEL_PREFIX to o1 based on new models released
Browse files Browse the repository at this point in the history
  • Loading branch information
KennyDizi committed Dec 22, 2024
1 parent 8d78252 commit 23678c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pr_agent/algo/ai_handlers/litellm_ai_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ async def chat_completion(self, model: str, system: str, user: str, temperature:
messages[1]["content"] = [{"type": "text", "text": messages[1]["content"]},
{"type": "image_url", "image_url": {"url": img_path}}]

# Currently O1 does not support separate system and user prompts
O1_MODEL_PREFIX = 'o1-'
# Currently, model OpenAI o1 series does not support a separate system and user prompts
O1_MODEL_PREFIX = 'o1'
model_type = model.split('/')[-1] if '/' in model else model
if model_type.startswith(O1_MODEL_PREFIX):
user = f"{system}\n\n\n{user}"
Expand Down

0 comments on commit 23678c1

Please sign in to comment.