Package-level declarations

Types

Link copied to clipboard
@Serializable
data class CodeInterpreterImage(val fileId: FileId)

Code interpreter image

Link copied to clipboard
@Serializable
data class CodeInterpreterToolCall(val input: String, val outputs: List<CodeInterpreterToolCallOutput>)
Link copied to clipboard
@Serializable
interface CodeInterpreterToolCallOutput
Link copied to clipboard
@Serializable
data class FunctionToolCallStep(val name: String, val arguments: String, val output: String? = null)
Link copied to clipboard
@Serializable
data class MessageCreation(val messageId: MessageId)

Details of the message that occurred during the run step.

Link copied to clipboard
@Serializable
data class MessageCreationStep(val id: RunStepId, val createdAt: Int, val assistantId: AssistantId, val threadId: ThreadId, val runId: RunId, val status: Status, val stepDetails: MessageCreationStepDetails, val lastError: LastError? = null, val expiredAt: Int? = null, val cancelledAt: Int? = null, val failedAt: Int? = null, val completedAt: Int? = null, val metadata: Map<String, String>? = null) : RunStep
Link copied to clipboard
@Serializable
data class MessageCreationStepDetails(val messageCreation: MessageCreation) : RunStepDetails

Details of the message creation by the run step.

Link copied to clipboard
@Serializable
interface RequiredAction

Details on the action required to continue the run.

Link copied to clipboard
@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.

Link copied to clipboard
@Serializable
value class RunId(val id: String)

A run id.

Link copied to clipboard
@Serializable
data class RunRequest(val assistantId: AssistantId, val model: ModelId? = null, val instructions: String? = null, val additionalInstructions: String? = null, val tools: List<AssistantTool>? = null, val metadata: Map<String, String>? = null)

Create a run request.

Link copied to clipboard

Builder for RunRequest.

Link copied to clipboard
@Serializable
interface RunStep
Link copied to clipboard
@Serializable
interface RunStepDetails

A run step object.

Link copied to clipboard
@Serializable
value class RunStepId(val id: String)

A run step id.

Link copied to clipboard
@Serializable
data class ThreadRunRequest(val assistantId: AssistantId, val thread: ThreadRequest? = null, val model: ModelId? = null, val instructions: String? = null, val tools: List<AssistantTool>? = null, val metadata: Map<String, String>? = null)

Create a thread and run it in one request.

Link copied to clipboard

Create a thread and run it in one request.

Link copied to clipboard
@Serializable
data class ToolCallsStep(val id: RunStepId, val createdAt: Int, val assistantId: AssistantId, val threadId: ThreadId, val runId: RunId, val status: Status, val stepDetails: ToolCallStepDetails, val lastError: LastError? = null, val expiredAt: Int? = null, val cancelledAt: Int? = null, val failedAt: Int? = null, val completedAt: Int? = null, val metadata: Map<String, String>? = null) : RunStep
Link copied to clipboard
@Serializable
interface ToolCallStep
Link copied to clipboard
@Serializable
data class ToolCallStepDetails(val toolCalls: List<ToolCallStep>? = null) : RunStepDetails

Details of the tool call.

Link copied to clipboard
@Serializable
value class ToolCallStepId(val id: String)

Tool call step identifier.

Link copied to clipboard
@Serializable
data class ToolOutput(val toolCallId: ToolId? = null, val output: String? = null)

Represents a tool output.

Link copied to clipboard

A tool output builder.

Link copied to clipboard
@Serializable
data class ToolOutputs(val toolCalls: List<ToolCall>)

Details on the tool outputs needed for this run to continue.

Functions

Link copied to clipboard

Create a run request.

Link copied to clipboard

Create a thread and run it in one request.

Link copied to clipboard

Creates a ToolOutput instance using the provided builder block.