RunStatus

Represents the current state of a Run. You can view the current status of a run by looking at the Run.status field.

Entries

Link copied to clipboard

When Runs are first created or when you complete the RequiredAction, they are moved to this 'queued' status. They should almost immediately move to IN_PROGRESS.

Link copied to clipboard

While IN_PROGRESS, the Assistant uses the mode and tools to perform steps. You can view progress being made by the Run by examining the RunSteps.

Link copied to clipboard

When using the Tool.FunctionTool, the Run will move to a REQUIRED_ACTION state once the model determines the names and arguments of the functions to be called. You must then run those functions and submit the outputs using RunHandler.submitToolOutputs before the run proceeds. If the outputs are not provided before the Run.expiresAt timestamp passes (roughly 10 minutes past creation), the run will move to an EXPIRED status.

Link copied to clipboard

You can attempt to cancel an IN_PROGRESS using RunHandler.cancel. Once the attempt to cancel succeeds, status of the Run moves to CANCELLED. Cancellation is attempted but not guarenteed.

Link copied to clipboard

The Run was successfully cancelled.

Link copied to clipboard

You can view the reason for the failure by looking at the Run.lastError object in the run (see RunError). The timestamp for the failure is recorded under the Run.failedAt.

Link copied to clipboard

The Run successfully completed! You can now view all ThreadMessages the Assistant added to the Thread, and all the steps the Run took. You can also continue the conversation by adding more ThreadMessages to the Thread and creating another Run.

Link copied to clipboard

This happens when the function calling outputs were not submitted before Run.expiresAt and the Run expires. Additionally, if the runs take too long to execute and go beyond the time stated in Run.expiresAt, OpenAI's systems will expire the Run.

Functions

Link copied to clipboard
fun valueOf(value: String): RunStatus

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.

Properties

Link copied to clipboard

Whether the OpenAI API is "done," and expecting you to take some action.

Link copied to clipboard
Link copied to clipboard