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

x/openai/resources/beta/threads/runs/mod.ts>Runs

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

Properties

steps: StepsAPI.Steps

Methods

cancel(
threadId: string,
runId: string,
options?: Core.RequestOptions,
): Core.APIPromise<Run>

Cancels a run that is in_progress.

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

Create a run.

list(
threadId: string,
query?: RunListParams,
options?: Core.RequestOptions,
): Core.PagePromise<RunsPage, Run>

Returns a list of runs belonging to a thread.

list(threadId: string, options?: Core.RequestOptions): Core.PagePromise<RunsPage, Run>
retrieve(
threadId: string,
runId: string,
options?: Core.RequestOptions,
): Core.APIPromise<Run>

Retrieves a run.

submitToolOutputs(
threadId: string,
runId: string,
options?: Core.RequestOptions,
): Core.APIPromise<Run>

When a run has the status: "requires_action" and required_action.type is submit_tool_outputs, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.

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

Modifies a run.