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

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

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
class Messages
extends APIResource
import { Messages } from "https://deno.land/x/openai@v4.61.1/resources/beta/threads/messages.ts";

Methods

create(
threadId: string,
options?: Core.RequestOptions,
): Core.APIPromise<Message>

Create a message.

del(
threadId: string,
messageId: string,
options?: Core.RequestOptions,
): Core.APIPromise<MessageDeleted>

Deletes a message.

list(
threadId: string,
options?: Core.RequestOptions,
): Core.PagePromise<MessagesPage, Message>

Returns a list of messages for a given thread.

list(threadId: string, options?: Core.RequestOptions): Core.PagePromise<MessagesPage, Message>
retrieve(
threadId: string,
messageId: string,
options?: Core.RequestOptions,
): Core.APIPromise<Message>

Retrieve a message.

update(
threadId: string,
messageId: string,
options?: Core.RequestOptions,
): Core.APIPromise<Message>

Modifies a message.