ChatCompletionsOptions.Messages Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The collection of context messages associated with this chat completions request. Typical usage begins with a chat message for the System role that provides instructions for the behavior of the assistant, followed by alternating messages between the User and Assistant roles. Please note ChatRequestMessage is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include ChatRequestAssistantMessage, ChatRequestFunctionMessage, ChatRequestSystemMessage, ChatRequestToolMessage and ChatRequestUserMessage.
public System.Collections.Generic.IList<Azure.AI.OpenAI.ChatRequestMessage> Messages { get; }
member this.Messages : System.Collections.Generic.IList<Azure.AI.OpenAI.ChatRequestMessage>
Public ReadOnly Property Messages As IList(Of ChatRequestMessage)
Property Value
Remarks
This is the full set of chat messages for the history of a conversation between an assistant and user. Typical usage begins with a chat message for the System role that provides instructions for the behavior of the assistant followed by alternating messages between the User role and Assistant role.
Applies to
Azure SDK for .NET
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for