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

x/openai_deno/mod.ts>Run

OpenAI API wrapper for deno.
Latest
interface Run
implements HasMetadata
Re-export
import { type Run } 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.run"

The object type, which is always thread.run.

createdAt: number

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

threadID: string

The ID of the thread that was executed on as a part of this run.

assistantID: string

The ID of the assistant used for execution of this run.

status:
| "queued"
| "inProgress"
| "requiresAction"
| "cancelling"
| "cancelled"
| "failed"
| "completed"
| "expired"

The status of the run, which can be either queued, inProgress, requiresAction, cancelling, cancelled, failed, completed, or expired.

optional
requiredAction: { type: "submitToolOutputs" | string; submitToolOutputs: { toolCalls: { id: string; type: "function" | string; function: { name: string; arguments: string; }; }[]; }; } | null

Details on the action required to continue the run. Will be null if no action is required.

optional
lastError: { code: "serverError" | "rateLimitExceeded" | string; message: string; } | null

The last error associated with this run. Will be null if there are no errors.

expiresAt: number

The Unix timestamp (in seconds) for when the run will expire.

optional
startedAt: number | null

The Unix timestamp (in seconds) for when the run was started.

optional
cancelledAt: number | null

The Unix timestamp (in seconds) for when the run was cancelled.

optional
failedAt: number | null

The Unix timestamp (in seconds) for when the run failed.

optional
completedAt: number | null

The Unix timestamp (in seconds) for when the run was completed.

model: string

The model that the assistant used for this run.

instructions: string

The instructions that the assistant used for this run.

tools: ({ type: "codeInterpreter"; } | { type: "retrieval"; } | { type: "function"; function: Function; })[]

The list of tools that the assistant used for this run.

fileIDs: string[]

The list of File IDs the assistant used for this run.