Functions

submit-tool-outputs-run

fn (thread-id: Str, run-id: Str, request: SubmitToolOuputsToRunRequest): SubmitToolOuputsToRunResponse
fn (thread-id: Str, run-id: Str, request: SubmitToolOuputsToRunRequest, opts: Map): SubmitToolOuputsToRunResponse

POST /threads/{thread_id}/runs/{run_id}/submit_tool_outputs - Submit tool call outputs to continue a run that requires action.

Example

run ::openai::submit/submit-tool-outputs-run("thread_abc123", "run_abc123", ::openai::submit/SubmitToolOuputsToRunRequest({
  tool_outputs: [{tool_call_id: "call_abc123", output: "42"}]
}))
run.status

Types

AssistantTool

AssistantTool type Map

AssistantsApiResponseFormatOption

AssistantsApiResponseFormatOption type Any

Metadata

Metadata type Map

ParallelToolCalls

ParallelToolCalls type Bool

RunCompletionUsage

RunCompletionUsage type {
    completion_tokens: Int,
    prompt_tokens: Int,
    total_tokens: Int
}

RunObject

RunObject type {
    id: Str,
    object: "thread.run",
    created_at: Int,
    thread_id: Str,
    assistant_id: Str?,
    status: RunStatus,
    required_action: Map?,
    last_error: Map?,
    expires_at: Int?,
    started_at: Int?,
    cancelled_at: Int?,
    failed_at: Int?,
    completed_at: Int?,
    incomplete_details: Map?,
    model: Str,
    instructions: Str?,
    tools: Vec<AssistantTool>,
    metadata: Metadata?,
    usage: RunCompletionUsage?,
    temperature: Dec?,
    top_p: Dec?,
    max_prompt_tokens: Int?,
    max_completion_tokens: Int?,
    truncation_strategy: Any,
    tool_choice: Any,
    parallel_tool_calls: ParallelToolCalls,
    response_format: AssistantsApiResponseFormatOption
}

RunStatus

RunStatus type Str

SubmitToolOuputsToRunRequest

SubmitToolOuputsToRunRequest type {
    tool_outputs: Vec<Map>,
    stream: Bool?
}

SubmitToolOuputsToRunResponse

SubmitToolOuputsToRunResponse type {
    id: Str,
    object: "thread.run",
    created_at: Int,
    thread_id: Str,
    assistant_id: Str?,
    status: RunStatus,
    required_action: Map?,
    last_error: Map?,
    expires_at: Int?,
    started_at: Int?,
    cancelled_at: Int?,
    failed_at: Int?,
    completed_at: Int?,
    incomplete_details: Map?,
    model: Str,
    instructions: Str?,
    tools: Vec<AssistantTool>,
    metadata: Metadata?,
    usage: RunCompletionUsage?,
    temperature: Dec?,
    top_p: Dec?,
    max_prompt_tokens: Int?,
    max_completion_tokens: Int?,
    truncation_strategy: Any,
    tool_choice: Any,
    parallel_tool_calls: ParallelToolCalls,
    response_format: AssistantsApiResponseFormatOption
}

SubmitToolOutputsRunRequest

SubmitToolOutputsRunRequest type {
    tool_outputs: Vec<Map>,
    stream: Bool?
}