Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/openai/resources/beta/threads/messages/messages.ts>ThreadMessage

Deno build of the official Typescript library for the OpenAI API. Source: https://github.com/openai/openai-node
Extremely Popular
Go to Latest
interface ThreadMessage
import { type ThreadMessage } from "https://deno.land/x/openai@v4.19.1/resources/beta/threads/messages/messages.ts";

Represents a message within a thread.

Properties

id: string

The identifier, which can be referenced in API endpoints.

assistant_id: string | null

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

The content of the message in array of text and/or images.

created_at: number

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

file_ids: Array<string>

A list of file IDs that the assistant should use. Useful for tools like retrieval and code_interpreter that can access files. A maximum of 10 files can be attached to a message.

metadata: unknown | null

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.

object: "thread.message"

The object type, which is always thread.message.

role: "user" | "assistant"

The entity that produced the message. One of user or assistant.

run_id: string | null

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

thread_id: string

The thread ID that this message belongs to.