autogen icon indicating copy to clipboard operation
autogen copied to clipboard

[Feature Request] allow list of messages as system_messages

Open ekzhu opened this issue 2 years ago • 6 comments

Right now ConversableAgent only allows str type for system_message argument in constructor. We should support a list of messages as system messages that can contain multiple in context learning examples. This is useful especially for smaller open weight models.

system_messages do not need to be system roles, they can have user or assistant role.

ekzhu avatar Mar 25 '24 06:03 ekzhu

This is also what I need. Do you have a development plan for this task recently?

wlhgtc avatar Mar 26 '24 09:03 wlhgtc

We are organizing this into our roadmaps. https://github.com/microsoft/autogen/issues?q=is%3Aopen+is%3Aissue+label%3Aroadmap

Would you like to help with this one?

ekzhu avatar Mar 26 '24 13:03 ekzhu

I'm working on it now. Which models can I test this against that supports arrays of system messages?

jtoy avatar Mar 26 '24 16:03 jtoy

@jtoy We can test it on GPT-4 first. But I believe most models with OpenAI compatible API can support list of system messages.

ekzhu avatar Mar 28 '24 17:03 ekzhu

Just note that some open source models/inference engines require alternating roles for messages, so some wouldn't support two or more system messages in a row.

marklysze avatar Apr 25 '24 03:04 marklysze

Just note that some open source models/inference engines require alternating roles for messages, so some wouldn't support two or more system messages in a row.

Right. We need to highlight that the system messages can have any roles.

ekzhu avatar Apr 25 '24 05:04 ekzhu

Hi! Is this issue still open?

prithvi2226 avatar May 31 '24 05:05 prithvi2226