-
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
feat: add developer message for o1 models #4923
base: main
Are you sure you want to change the base?
Conversation
python/packages/autogen-ext/src/autogen_ext/models/openai/_openai_client.py
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4923 +/- ##
==========================================
+ Coverage 68.45% 68.48% +0.02%
==========================================
Files 156 156
Lines 10060 10074 +14
==========================================
+ Hits 6887 6899 +12
- Misses 3173 3175 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
python/packages/autogen-ext/src/autogen_ext/models/openai/_openai_client.py
Outdated
Show resolved
Hide resolved
python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py
Outdated
Show resolved
Hide resolved
@@ -238,15 +239,20 @@ def __init__( | |||
system_message: ( | |||
str | None | |||
) = "You are a helpful AI assistant. Solve tasks using your tools. Reply with TERMINATE when the task has been completed.", | |||
developer_message: (str | None) = None, |
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.
At this level, an agent, I think we can combine system and developer messages. Maybe it needs a new name or something, but ideally by the time we've made it this high up the stack, we've decided that either model can be used OR we've created a separate variant of this agent for the o1 models -- whatever testing shows is appropriate.
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.
Maybe at this level of abstraction it is an "instruction" message, or simply agent instructions
reflect_on_tool_use: bool = False, | ||
tool_call_summary_format: str = "{result}", | ||
): | ||
super().__init__(name=name, description=description) | ||
self._model_client = model_client | ||
if system_message is None: | ||
if system_message is None or developer_message is not None: |
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.
Rather than checking which system message type we've received, we should be checking which model family we were given. We can then load defaults accordingly, and we can turn the system message into a developer message as needed (again, I might recommend a name like sys_or_dev_message
-- but that would be a breaking change I guess)
No description provided.