AssistantsModelFactory.ThreadMessage Method

Definition

Initializes a new instance of ThreadMessage.

public static Azure.AI.OpenAI.Assistants.ThreadMessage ThreadMessage (string id = default, DateTimeOffset createdAt = default, string threadId = default, Azure.AI.OpenAI.Assistants.MessageRole role = default, System.Collections.Generic.IEnumerable<Azure.AI.OpenAI.Assistants.MessageContent> contentItems = default, string assistantId = default, string runId = default, System.Collections.Generic.IEnumerable<string> fileIds = default, System.Collections.Generic.IReadOnlyDictionary<string,string> metadata = default);
static member ThreadMessage : string * DateTimeOffset * string * Azure.AI.OpenAI.Assistants.MessageRole * seq<Azure.AI.OpenAI.Assistants.MessageContent> * string * string * seq<string> * System.Collections.Generic.IReadOnlyDictionary<string, string> -> Azure.AI.OpenAI.Assistants.ThreadMessage
Public Shared Function ThreadMessage (Optional id As String = Nothing, Optional createdAt As DateTimeOffset = Nothing, Optional threadId As String = Nothing, Optional role As MessageRole = Nothing, Optional contentItems As IEnumerable(Of MessageContent) = Nothing, Optional assistantId As String = Nothing, Optional runId As String = Nothing, Optional fileIds As IEnumerable(Of String) = Nothing, Optional metadata As IReadOnlyDictionary(Of String, String) = Nothing) As ThreadMessage

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.

role
MessageRole

The role associated with the assistant thread message.

contentItems
IEnumerable<MessageContent>

The list of content items associated with the assistant thread message.

assistantId
String

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

runId
String

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

fileIds
IEnumerable<String>

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

metadata
IReadOnlyDictionary<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.

Returns

A new ThreadMessage instance for mocking.

Applies to