autogenhub / autogen

A programming framework for agentic AI. Discord: https://discord.gg/pAbnFJrkgZ
https://autogenhub.github.io/autogen/
Apache License 2.0
119 stars 23 forks source link

Fix Anthropic system messages #5

Closed marklysze closed 2 months ago

marklysze commented 3 months ago

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)