你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ThreadMessage Constructor

Definition

Initializes a new instance of ThreadMessage.

public ThreadMessage (string id, DateTimeOffset createdAt, string threadId, Azure.AI.Projects.MessageStatus status, Azure.AI.Projects.MessageIncompleteDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, Azure.AI.Projects.MessageRole role, System.Collections.Generic.IEnumerable<Azure.AI.Projects.MessageContent> contentItems, string assistantId, string runId, System.Collections.Generic.IEnumerable<Azure.AI.Projects.MessageAttachment> attachments, System.Collections.Generic.IDictionary<string,string> metadata);
new Azure.AI.Projects.ThreadMessage : string * DateTimeOffset * string * Azure.AI.Projects.MessageStatus * Azure.AI.Projects.MessageIncompleteDetails * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Azure.AI.Projects.MessageRole * seq<Azure.AI.Projects.MessageContent> * string * string * seq<Azure.AI.Projects.MessageAttachment> * System.Collections.Generic.IDictionary<string, string> -> Azure.AI.Projects.ThreadMessage
Public Sub New (id As String, createdAt As DateTimeOffset, threadId As String, status As MessageStatus, incompleteDetails As MessageIncompleteDetails, completedAt As Nullable(Of DateTimeOffset), incompleteAt As Nullable(Of DateTimeOffset), role As MessageRole, contentItems As IEnumerable(Of MessageContent), assistantId As String, runId As String, attachments As IEnumerable(Of MessageAttachment), metadata As IDictionary(Of String, String))

Parameters

id
String

The identifier, which can be referenced in API endpoints.

createdAt
DateTimeOffset

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

threadId
String

The ID of the thread that this message belongs to.

status
MessageStatus

The status of the message.

incompleteDetails
MessageIncompleteDetails

On an incomplete message, details about why the message is incomplete.

completedAt
Nullable<DateTimeOffset>

The Unix timestamp (in seconds) for when the message was completed.

incompleteAt
Nullable<DateTimeOffset>

The Unix timestamp (in seconds) for when the message was marked as incomplete.

role
MessageRole

The role associated with the agent thread message.

contentItems
IEnumerable<MessageContent>

The list of content items associated with the agent 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.

assistantId
String

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

runId
String

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

attachments
IEnumerable<MessageAttachment>

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

metadata
IDictionary<String,String>

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.

Exceptions

id, threadId or contentItems is null.

Applies to