Share via


ChatCompletionsOptions Constructors

Definition

Overloads

ChatCompletionsOptions()

Initializes a new instance of ChatCompletionsOptions.

ChatCompletionsOptions(IEnumerable<ChatRequestMessage>)

Initializes a new instance of ChatCompletionsOptions.

ChatCompletionsOptions()

Source:
ChatCompletionsOptions.cs

Initializes a new instance of ChatCompletionsOptions.

public ChatCompletionsOptions ();
Public Sub New ()

Applies to

ChatCompletionsOptions(IEnumerable<ChatRequestMessage>)

Source:
ChatCompletionsOptions.cs

Initializes a new instance of ChatCompletionsOptions.

public ChatCompletionsOptions (System.Collections.Generic.IEnumerable<Azure.AI.Inference.ChatRequestMessage> messages);
new Azure.AI.Inference.ChatCompletionsOptions : seq<Azure.AI.Inference.ChatRequestMessage> -> Azure.AI.Inference.ChatCompletionsOptions
Public Sub New (messages As IEnumerable(Of ChatRequestMessage))

Parameters

messages
IEnumerable<ChatRequestMessage>

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, ChatRequestSystemMessage, ChatRequestToolMessage and ChatRequestUserMessage.

Exceptions

messages is null.

Applies to