Delen via


ChatRequestAssistantMessage Class

Definition

A request chat message representing response or action from the assistant.

public class ChatRequestAssistantMessage : Azure.AI.Inference.ChatRequestMessage, System.ClientModel.Primitives.IJsonModel<Azure.AI.Inference.ChatRequestAssistantMessage>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Inference.ChatRequestAssistantMessage>
type ChatRequestAssistantMessage = class
    inherit ChatRequestMessage
    interface IJsonModel<ChatRequestAssistantMessage>
    interface IPersistableModel<ChatRequestAssistantMessage>
Public Class ChatRequestAssistantMessage
Inherits ChatRequestMessage
Implements IJsonModel(Of ChatRequestAssistantMessage), IPersistableModel(Of ChatRequestAssistantMessage)
Inheritance
ChatRequestAssistantMessage
Implements

Constructors

ChatRequestAssistantMessage(ChatCompletions)

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

ChatRequestAssistantMessage(IEnumerable<ChatCompletionsToolCall>, String)

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

ChatRequestAssistantMessage(String)

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

Properties

Content

The content of the message.

ParticipantName

An optional name associated with the assistant message. This is typically defined with a system message and is used to differentiate between multiple participants of the same role.

ToolCalls

The tool calls that must be resolved and have their outputs appended to subsequent input messages for the chat completions request to resolve as configured. Please note ChatCompletionsToolCall 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 Azure.AI.Inference.ChatCompletionsFunctionToolCall.

Explicit Interface Implementations

IJsonModel<ChatRequestAssistantMessage>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<ChatRequestAssistantMessage>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IJsonModel<ChatRequestMessage>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

(Inherited from ChatRequestMessage)
IJsonModel<ChatRequestMessage>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from ChatRequestMessage)
IPersistableModel<ChatRequestAssistantMessage>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ChatRequestAssistantMessage>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<ChatRequestAssistantMessage>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

IPersistableModel<ChatRequestMessage>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from ChatRequestMessage)
IPersistableModel<ChatRequestMessage>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

(Inherited from ChatRequestMessage)
IPersistableModel<ChatRequestMessage>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from ChatRequestMessage)

Applies to