Delen via


ChatRequestAssistantMessage Constructors

Definition

Overloads

ChatRequestAssistantMessage(ChatCompletions)

Creates a new instance of ChatRequestAssistantMessage from a ChatCompletions with an assistant role response.

ChatRequestAssistantMessage(String)

Creates a new instance of ChatRequestAssistantMessage that represents ordinary text content and does not feature tool or function calls.

ChatRequestAssistantMessage(IEnumerable<ChatCompletionsToolCall>, String)

Creates a new instance of ChatRequestAssistantMessage that represents tool_calls that were provided by the model.

ChatRequestAssistantMessage(ChatCompletions)

Source:
ChatRequestAssistantMessage.cs

Creates a new instance of ChatRequestAssistantMessage from a ChatCompletions with an assistant role response.

public ChatRequestAssistantMessage (Azure.AI.Inference.ChatCompletions chatCompletions);
new Azure.AI.Inference.ChatRequestAssistantMessage : Azure.AI.Inference.ChatCompletions -> Azure.AI.Inference.ChatRequestAssistantMessage
Public Sub New (chatCompletions As ChatCompletions)

Parameters

chatCompletions
ChatCompletions

The ChatCompletions from which the conversation history request message should be created.

Exceptions

The role of the provided chat completion response was not Assistant.

Remarks

This constructor will copy the content, tool_calls, and function_call from a chat completion response into a new assistant role request message.

Applies to

ChatRequestAssistantMessage(String)

Source:
ChatRequestAssistantMessage.cs

Creates a new instance of ChatRequestAssistantMessage that represents ordinary text content and does not feature tool or function calls.

public ChatRequestAssistantMessage (string content);
new Azure.AI.Inference.ChatRequestAssistantMessage : string -> Azure.AI.Inference.ChatRequestAssistantMessage
Public Sub New (content As String)

Parameters

content
String

The text content of the message.

Applies to

ChatRequestAssistantMessage(IEnumerable<ChatCompletionsToolCall>, String)

Source:
ChatRequestAssistantMessage.cs

Creates a new instance of ChatRequestAssistantMessage that represents tool_calls that were provided by the model.

public ChatRequestAssistantMessage (System.Collections.Generic.IEnumerable<Azure.AI.Inference.ChatCompletionsToolCall> toolCalls, string content = default);
new Azure.AI.Inference.ChatRequestAssistantMessage : seq<Azure.AI.Inference.ChatCompletionsToolCall> * string -> Azure.AI.Inference.ChatRequestAssistantMessage
Public Sub New (toolCalls As IEnumerable(Of ChatCompletionsToolCall), Optional content As String = Nothing)

Parameters

toolCalls
IEnumerable<ChatCompletionsToolCall>

The tool_calls made by the model.

content
String

Optional text content associated with the message.

Applies to