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

Fix Anthropic system messages #5

Merged
merged 2 commits into from
Sep 4, 2024
Merged

Conversation

marklysze
Copy link
Collaborator

At the moment if the set of messages for inference has more than one system message, only the last system message will be put into the Anthropic API system parameter.

During some testing of group chats I noticed there are multiple system messages for speaker selection in auto mode. So this meant the speaker selection was losing context and failing.

This PR simply concatenates the system messages together and it proves effective.

Why are these changes needed?

Group Chat doesn't work effectively with Anthropic models when in auto mode without it.

Related issue number

None raised.

Checks

(3392)

autogen/oai/anthropic.py Outdated Show resolved Hide resolved
@sonichi sonichi merged commit 17394ce into main Sep 4, 2024
140 of 152 checks passed
@sonichi sonichi deleted the anthropic-system-messages-fix branch September 4, 2024 15:53
odoochain pushed a commit to odoochain/autogen that referenced this pull request Nov 10, 2024
odoochain pushed a commit to odoochain/autogen that referenced this pull request Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alt-models Non-OpenAI Models / Client Classes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants