RunHandler

interface RunHandler

Handler used to interact with a Run objects.

Inheritors

Functions

Link copied to clipboard
open fun cancel(run: Run): Run

Cancels the given run that is RunStatus.IN_PROGRESS.

abstract fun cancel(id: String): Run

Cancels the run with the given id that is RunStatus.IN_PROGRESS.

Link copied to clipboard
abstract fun create(request: CreateRunRequest): Run

Creates (and starts) a new Run object.

Link copied to clipboard
Link copied to clipboard
@Contract(pure = true)
open fun list(): ListRunsResponse

Lists the 20 most recent runs for the thread.

@Contract(pure = true)
abstract fun list(request: ListRunsRequest?): ListRunsResponse

Lists runs for the thread.

Link copied to clipboard
open fun modify(run: Run, request: ModifyRunRequest): Run

Modifies the given run to have the given updated values.

abstract fun modify(id: String, request: ModifyRunRequest): Run

Modifies the run with the given id to have the given updated values.

Link copied to clipboard
@Contract(pure = true)
open fun retrieve(run: Run): Run

Retrieves the updated run object from the given run.

@Contract(pure = true)
abstract fun retrieve(id: String): Run

Retrieves the run with the given id.

Link copied to clipboard
@Contract(pure = true)
open fun steps(run: Run): RunStepHandler

Returns a handler for interacting with the steps in the given run.

@Contract(pure = true)
abstract fun steps(id: String): RunStepHandler

Returns a handler for interacting with the steps in the run with the given id.

Link copied to clipboard
open fun submitToolOutputs(run: Run, submission: SubmitToolOutputs): Run
abstract fun submitToolOutputs(id: String, submission: SubmitToolOutputs): Run

When a run has the status RunStatus.REQUIRED_ACTION and the action type is RequiredAction.Type.SUBMIT_TOOL_CALLS, this method 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.

Properties

Link copied to clipboard
abstract val threadId: String

The ID of the thread this handler is for.