Skip to content
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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

bassmang
Copy link
Collaborator

@bassmang bassmang commented Jan 7, 2025

No description provided.

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 70.58824% with 5 lines in your changes missing coverage. Please review.

Project coverage is 68.48%. Comparing base (79b0b6d) to head (e1885fa).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...t/src/autogen_agentchat/agents/_assistant_agent.py 70.00% 3 Missing ⚠️
...xt/src/autogen_ext/models/openai/_openai_client.py 50.00% 2 Missing ⚠️
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     
Flag Coverage Δ
unittests 68.48% <70.58%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bassmang bassmang changed the title fix: remove system messages for o1-family models feat: add developer message for o1 models Jan 9, 2025
@@ -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,
Copy link
Member

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.

Copy link
Member

@jackgerrits jackgerrits Jan 9, 2025

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:
Copy link
Member

@afourney afourney Jan 9, 2025

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants