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

x/openai/resources/beta/mod.ts>Threads

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

Properties

messages: MessagesAPI.Messages
runs: RunsAPI.Runs

Methods

create(body?: ThreadCreateParams, options?: Core.RequestOptions): Core.APIPromise<Thread>

Create a thread.

create(options?: Core.RequestOptions): Core.APIPromise<Thread>
createAndRun(body: ThreadCreateAndRunParams, options?: Core.RequestOptions): Core.APIPromise<RunsAPI.Run>

Create a thread and run it in one request.

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

Delete a thread.

retrieve(threadId: string, options?: Core.RequestOptions): Core.APIPromise<Thread>

Retrieves a thread.

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

Modifies a thread.