Skip to main content
Module

x/openai/resources/beta/threads/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.21.0/resources/beta/threads/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.