Share via


RunsOperations interface

Interface representing a Runs operations.

Properties

cancel

Cancels a run of an in‐progress thread.

create

Creates a new run for an agent thread.

createAndPoll

Creates a new run for an agent thread with polling.

createThreadAndRun

Creates a new thread and run for an agent.

get

Gets an existing run from an existing thread.

list

Gets a list of runs for a specified thread.

submitToolOutputs

Submits outputs from tools as requested by tool calls in a run.

update

Modifies an existing thread run.

Property Details

cancel

Cancels a run of an in‐progress thread.

cancel: (threadId: string, runId: string, options?: RunsCancelRunOptionalParams) => Promise<ThreadRun>

Property Value

(threadId: string, runId: string, options?: RunsCancelRunOptionalParams) => Promise<ThreadRun>

create

Creates a new run for an agent thread.

create: (threadId: string, assistantId: string, options?: RunsCreateRunOptionalParams) => AgentRunResponse

Property Value

(threadId: string, assistantId: string, options?: RunsCreateRunOptionalParams) => AgentRunResponse

createAndPoll

Creates a new run for an agent thread with polling.

createAndPoll: (threadId: string, assistantId: string, options?: RunsCreateRunOptionalParams) => PollerLike<OperationState<ThreadRun>, ThreadRun>

Property Value

(threadId: string, assistantId: string, options?: RunsCreateRunOptionalParams) => PollerLike<OperationState<ThreadRun>, ThreadRun>

createThreadAndRun

Creates a new thread and run for an agent.

createThreadAndRun: (assistantId: string, options?: CreateThreadAndRunOptionalParams) => AgentRunResponse

Property Value

(assistantId: string, options?: CreateThreadAndRunOptionalParams) => AgentRunResponse

get

Gets an existing run from an existing thread.

get: (threadId: string, runId: string, options?: RunsGetRunOptionalParams) => Promise<ThreadRun>

Property Value

(threadId: string, runId: string, options?: RunsGetRunOptionalParams) => Promise<ThreadRun>

list

Gets a list of runs for a specified thread.

list: (threadId: string, options?: RunsListRunsOptionalParams) => PagedAsyncIterableIterator<ThreadRun, ThreadRun[], PageSettings>

Property Value

(threadId: string, options?: RunsListRunsOptionalParams) => PagedAsyncIterableIterator<ThreadRun, ThreadRun[], PageSettings>

submitToolOutputs

Submits outputs from tools as requested by tool calls in a run.

submitToolOutputs: (threadId: string, runId: string, toolOutputs: ToolOutput[], options?: RunsSubmitToolOutputsToRunOptionalParams) => AgentRunResponse

Property Value

(threadId: string, runId: string, toolOutputs: ToolOutput[], options?: RunsSubmitToolOutputsToRunOptionalParams) => AgentRunResponse

update

Modifies an existing thread run.

update: (threadId: string, runId: string, options?: RunsUpdateRunOptionalParams) => Promise<ThreadRun>

Property Value

(threadId: string, runId: string, options?: RunsUpdateRunOptionalParams) => Promise<ThreadRun>