Run

@Serializable
data class Run(val id: RunId, val createdAt: Int, val threadId: ThreadId, val assistantId: AssistantId, val status: Status, val requiredAction: RequiredAction? = null, val lastError: LastError? = null, val expiresAt: Int? = null, val startedAt: Int? = null, val cancelledAt: Int? = null, val failedAt: Int? = null, val completedAt: Int? = null, val model: ModelId, val instructions: String? = null, val tools: List<AssistantTool>? = null, val fileIds: List<String>? = null, val metadata: Map<String, String>? = null)

Represents an execution run on a thread.

Constructors

Link copied to clipboard
constructor(id: RunId, createdAt: Int, threadId: ThreadId, assistantId: AssistantId, status: Status, requiredAction: RequiredAction? = null, lastError: LastError? = null, expiresAt: Int? = null, startedAt: Int? = null, cancelledAt: Int? = null, failedAt: Int? = null, completedAt: Int? = null, model: ModelId, instructions: String? = null, tools: List<AssistantTool>? = null, fileIds: List<String>? = null, metadata: Map<String, String>? = null)

Properties

Link copied to clipboard

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

Link copied to clipboard
val cancelledAt: Int? = null

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

Link copied to clipboard
val completedAt: Int? = null

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

Link copied to clipboard

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

Link copied to clipboard
val expiresAt: Int? = null

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

Link copied to clipboard
val failedAt: Int? = null

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

Link copied to clipboard
val fileIds: List<String>? = null

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

Link copied to clipboard
val id: RunId

The identifier, which can be referenced in API endpoints.

Link copied to clipboard
val instructions: String? = null

The instructions that the assistant used for this run.

Link copied to clipboard
val lastError: LastError? = null

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

Link copied to clipboard
val metadata: Map<String, String>? = null

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long, and values can be a maximum of 512 characters long.

Link copied to clipboard

The model that the assistant used for this run.

Link copied to clipboard

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

Link copied to clipboard
val startedAt: Int? = null

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

Link copied to clipboard

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

Link copied to clipboard
val tools: List<AssistantTool>? = null

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