Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/openai_deno/mod.ts>Message

OpenAI API wrapper for deno.
Latest
interface Message
implements HasMetadata
Re-export
import { type Message } from "https://deno.land/x/openai_deno@v0.9.8/mod.ts";

Properties

id: string

The identifier, which can be referenced in API endpoints.

object: "thread.message"

The object type, which is always thread.message.

createdAt: number

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

threadID: string

The thread ID that this message belongs to.

role: "user" | "assistant"

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

content: ({ type: "imageFile"; fileID: string; } | { type: "text"; value: string; annotations: ({ type: "fileCitation"; text: string; fileID: string; quote: string; startIndex: number; endIndex: number; } | { type: "filePath"; text: string; fileID: string; startIndex: number; endIndex: number; })[]; })[]

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

optional
assistantID: string | null

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

optional
runID: string | null

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

fileIDs: string[]

A list of file IDs that the assistant should use.

Useful for tools like retrieval and codeInterpreter that can access files.

A maximum of 10 files can be attached to a message.