Class ChatMessage
ChatMessage class
A chat completion message generated by the model.
Constructors
Name | Description |
---|
ChatMessage() | Initializes a new instance of the ChatMessage class. |
ChatMessage(string, string) | Initializes a new instance of the ChatMessage class. |
Properties
Name | Description |
---|
Content { get; set; } | Gets or sets the contents of the message. |
Name { get; set; } | Gets or sets an optional name for the participant. Provides the model information to differentiate between participants of the same role. |
Role { get; set; } | Gets or sets the role of the messages author. |
ToolCallId { get; set; } | Gets or sets tool call that this message is responding to. |
ToolCalls { get; set; } | Gets or sets the tool calls generated by the model, such as function calls. |
Methods
Name | Description |
---|
static FromAssistant(string) | Creates a new ChatMessage object representing an assistant message. |
static FromSystem(string) | Creates a new ChatMessage object representing a system message. |
static FromUser(string) | Creates a new ChatMessage object representing a user message. |
See Also