Condividi tramite


ThreadMessage Class

Definition

A single, existing message within an assistant thread.

public class ThreadMessage : System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Assistants.ThreadMessage>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Assistants.ThreadMessage>
type ThreadMessage = class
    interface IJsonModel<ThreadMessage>
    interface IPersistableModel<ThreadMessage>
Public Class ThreadMessage
Implements IJsonModel(Of ThreadMessage), IPersistableModel(Of ThreadMessage)
Inheritance
ThreadMessage
Implements

Properties

AssistantId

If applicable, the ID of the assistant that authored this message.

ContentItems

The list of content items associated with the assistant thread message. Please note MessageContent 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 MessageImageFileContent and MessageTextContent.

CreatedAt

The Unix timestamp, in seconds, representing when this object was created.

FileIds

A list of file IDs that the assistant should use. Useful for tools like retrieval and code_interpreter that can access files.

Id

The identifier, which can be referenced in API endpoints.

Metadata

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

Role

The role associated with the assistant thread message.

RunId

If applicable, the ID of the run associated with the authoring of this message.

ThreadId

The ID of the thread that this message belongs to.

Explicit Interface Implementations

IJsonModel<ThreadMessage>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<ThreadMessage>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ThreadMessage>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ThreadMessage>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<ThreadMessage>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to