Make usage of name
field in OpenAI messages optional in OpenAIChatCompletionClient
#6034
Open
1 task done
Labels
Milestone
Confirmation
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 toBaseOpenAIChatCompletionClient
, and add toBaseOpenAIClientConfiguration
. Default should beTrue
.Then, in
user_message_to_oai
andassistant_message_to_oai
, we decide whether to use thename
field based on the option set.autogen/python/packages/autogen-ext/src/autogen_ext/models/openai/_openai_client.py
Lines 182 to 183 in 4835321
autogen/python/packages/autogen-ext/src/autogen_ext/models/openai/_openai_client.py
Line 222 in 4835321
For model APIs that don't support this field, we document in the usage guide about this option.
The text was updated successfully, but these errors were encountered: