ThreadMessage interface

A single, existing message within an assistant thread.

Properties

assistantId

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

content

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

createdAt

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

fileIds

The IDs for the files associated with this message.

id

The identifier, which can be referenced in API endpoints.

metadata

A set of key/value pairs used to store additional information about the object.

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.

Property Details

assistantId

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

assistantId?: string

Property Value

string

content

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

content: MessageContent[]

Property Value

createdAt

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

createdAt?: Date

Property Value

Date

fileIds

The IDs for the files associated with this message.

fileIds?: string[]

Property Value

string[]

id

The identifier, which can be referenced in API endpoints.

id?: string

Property Value

string

metadata

A set of key/value pairs used to store additional information about the object.

metadata: null | Record<string, string>

Property Value

null | Record<string, string>

role

The role associated with the assistant thread message.

role: string

Property Value

string

runId

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

runId?: string

Property Value

string

threadId

The ID of the thread that this message belongs to.

threadId?: string

Property Value

string