-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove system messages for o1-family models #4923
base: main
Are you sure you want to change the base?
Conversation
if self.model_info["family"] == "o1": | ||
messages = prepare_o1_messages(messages) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should make this configurable, since doesn't o1 support system messages? It's just tricky since it blocks requests sometimes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Developer messages are the new system messages: Starting with o1-2024-12-17, o1 models support developer messages rather than system
This seems to be the new standard, I can try just converting to developer message instead
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4923 +/- ##
==========================================
- Coverage 68.14% 68.07% -0.08%
==========================================
Files 161 161
Lines 10171 10185 +14
==========================================
+ Hits 6931 6933 +2
- Misses 3240 3252 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
raise ValueError("No UserMessage found to append SystemMessage content.") | ||
|
||
# Prepend the collected system content to the first user message | ||
user_messages[0].content = f"{system_content.strip()}\n\n{user_messages[0].content.strip()}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't think the client should be translating message types. If the client is being handed a system message, and the model is not compatible, this is an error.
Model family adjustments should be made at the Agent or application level.
No description provided.