次の方法で共有


ThreadMessageOptions Class

Definition

A single message within an agent thread, as provided during that thread's creation for its initial state.

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

Constructors

ThreadMessageOptions(MessageRole, String)

Initializes a new instance of ThreadMessageOptions.

Properties

Attachments

A list of files attached to the message, and the tools they should be added to.

Content

The textual content of the initial message. Currently, robust input including images and annotated text may only be provided via a separate call to the create message API.

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 of the entity that is creating the message. Allowed values include:

  • user: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.
  • assistant: Indicates the message is generated by the agent. Use this value to insert messages from the agent into the conversation.

Methods

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)

Explicit Interface Implementations

IJsonModel<ThreadMessageOptions>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<ThreadMessageOptions>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ThreadMessageOptions>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ThreadMessageOptions>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<ThreadMessageOptions>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to