Make usage of `name` field in OpenAI messages optional in `OpenAIChatCompletionClient`
Confirmation
- [x] I confirm that I am a maintainer and so can use this template. If I am not, I understand this issue will be closed and I will be asked to use a different template.
Issue body
Many "openai-compatible" model providers don't support the name field in message.
e.g, https://console.groq.com/docs/openai
Add include_name_in_message parameter to BaseOpenAIChatCompletionClient, and add to BaseOpenAIClientConfiguration. Default should be True.
Then, in user_message_to_oai and assistant_message_to_oai, we decide whether to use the name field based on the option set.
https://github.com/microsoft/autogen/blob/483532180a109d12c639160cb6a40e678a56e6ed/python/packages/autogen-ext/src/autogen_ext/models/openai/_openai_client.py#L182-L183
https://github.com/microsoft/autogen/blob/483532180a109d12c639160cb6a40e678a56e6ed/python/packages/autogen-ext/src/autogen_ext/models/openai/_openai_client.py#L222
For model APIs that don't support this field, we document in the usage guide about this option.
Can I work on this issue?
Sure.
@ekzhu Is this issue assigned? If not , I would be glad to implement this
@gmivan thanks! Though I think @tongyu0924 already has a PR for it, which needs to be updated to work with the new transformation code.
@SongChiYoung can provide some guidance in how to make changes to the model client.
@gmivan thanks! Though I think @tongyu0924 already has a PR for it, which needs to be updated to work with the new transformation code.
@SongChiYoung can provide some guidance in how to make changes to the model client.
Thanks for the note! I initially opened a PR for this, but I won’t be able to follow up with the required updates due to time constraints. Feel free to let someone else take over.
I can take over if you don't mind. Thank you
Please do
@gmivan I hope everything is going well. Please feel free to tag me if I can assist in any way.
@SongChiYoung working on it. Prepared commit. How should I push: make a new branch with issue name and push into it? I think I have no rights for this
@ekzhu Is this issue solved
@ashutoshsom1 no it has not been resolved.