共用方式為


ChatMessageContentItem Class

Definition

An abstract representation of a structured content item within a chat message. Please note ChatMessageContentItem 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 ChatMessageImageContentItem and ChatMessageTextContentItem.

[System.ClientModel.Primitives.PersistableModelProxy(typeof(Azure.AI.Inference.UnknownChatMessageContentItem))]
public abstract class ChatMessageContentItem : System.ClientModel.Primitives.IJsonModel<Azure.AI.Inference.ChatMessageContentItem>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Inference.ChatMessageContentItem>
[<System.ClientModel.Primitives.PersistableModelProxy(typeof(Azure.AI.Inference.UnknownChatMessageContentItem))>]
type ChatMessageContentItem = class
    interface IJsonModel<ChatMessageContentItem>
    interface IPersistableModel<ChatMessageContentItem>
Public MustInherit Class ChatMessageContentItem
Implements IJsonModel(Of ChatMessageContentItem), IPersistableModel(Of ChatMessageContentItem)
Inheritance
ChatMessageContentItem
Derived
Attributes
Implements

Constructors

ChatMessageContentItem()

Initializes a new instance of ChatMessageContentItem.

Explicit Interface Implementations

IJsonModel<ChatMessageContentItem>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<ChatMessageContentItem>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ChatMessageContentItem>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ChatMessageContentItem>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<ChatMessageContentItem>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to