Enum ChatRole
public enum ChatRole
Fields
Assistant = 3Messages sent by the model in response to user messages.
The Google equivalent for this role is 'model', and it is converted to 'assistant' with the JsonConverter.
System = 1Tool = 4Messages sent by the model. The message includes the function calls the model wants to make.
Google Gemini equivalent for this role is 'function', and it is converted to 'tool' with the JsonConverter.
[2025-04-12]
Important: OpenAI has deprecated this role for tool calls. These are replaced by 'tools' within assistant messages.
However, the role is still used for returning tool outputs from the client side to the model.Unset = 0User = 2Messages sent by an end user, containing prompts or additional context information.