OpenAIResponsesRequest

data class OpenAIResponsesRequest(val model: String, val input: OpenAIResponseInput, val instructions: String? = null, val maxOutputTokens: Int? = null, val maxToolCalls: Int? = null, val parallelToolCalls: Boolean? = null, val previousResponseId: String? = null, val metadata: OpenAIMetadata? = null, val background: Boolean = false, val reasoning: OpenAIReasoning? = null, val store: Boolean? = null, val temperature: Double? = null, val topP: Double? = null, val truncation: OpenAITruncation? = null, val text: OpenAIResponsesText? = null, val toolChoice: OpenAIToolChoice? = null, val serviceTier: OpenAIServiceTier? = null, val user: String? = null, val safetyIdentifier: String? = null, val promptCacheKey: String? = null, val tools: List<OpenAIResponsesTool<*>> = emptyList(), val toolExecutionConfig: ToolExecutionConfig = ToolExecutionConfig()) : DtoMapper<OpenAIResponsesRequestDto>

A request to the OpenAI Responses API.

System-managed fields (streaming, conversation chaining on the server side) are intentionally not exposed for client-side processing.

Constructors

Link copied to clipboard
constructor(model: String, input: OpenAIResponseInput, instructions: String? = null, maxOutputTokens: Int? = null, maxToolCalls: Int? = null, parallelToolCalls: Boolean? = null, previousResponseId: String? = null, metadata: OpenAIMetadata? = null, background: Boolean = false, reasoning: OpenAIReasoning? = null, store: Boolean? = null, temperature: Double? = null, topP: Double? = null, truncation: OpenAITruncation? = null, text: OpenAIResponsesText? = null, toolChoice: OpenAIToolChoice? = null, serviceTier: OpenAIServiceTier? = null, user: String? = null, safetyIdentifier: String? = null, promptCacheKey: String? = null, tools: List<OpenAIResponsesTool<*>> = emptyList(), toolExecutionConfig: ToolExecutionConfig = ToolExecutionConfig())

Properties

Link copied to clipboard

Whether to run the response as a background job. Defaults to false.

Link copied to clipboard

The conversation input: plain text or a list of input items.

Link copied to clipboard

The system/developer prompt for the model. null uses provider default.

Link copied to clipboard

An upper bound for the number of tokens generated. null uses provider default.

Link copied to clipboard

An upper bound for the number of tool calls generated. null uses provider default.

Link copied to clipboard

Up to 16 key-value pairs attached to the request. null when not set.

Link copied to clipboard

The model identifier (e.g. "gpt-5.6-sol"). Required.

Link copied to clipboard

Whether the model can run tool calls in parallel. null uses provider default.

Link copied to clipboard

The ID of the previous response to chain from (multi-turn). null starts a new conversation.

Link copied to clipboard

A cache key used to route the request for prompt caching. null when not set.

Link copied to clipboard

The reasoning configuration for reasoning models. null uses provider default.

Link copied to clipboard

A stable identifier used for safety/abuse tracking. null when not set.

Link copied to clipboard

The processing tier used to serve the request. null uses provider default.

Link copied to clipboard

Whether to store the response for later retrieval. null uses provider default.

Link copied to clipboard

Sampling temperature (0.0–2.0). null uses provider default.

Link copied to clipboard

Text output configuration (format, verbosity). null uses provider default.

Link copied to clipboard

Which (if any) tool the model is forced to call. null uses provider default.

Link copied to clipboard

How registered tools are executed by the client. Defaults to auto-execute.

Link copied to clipboard

The tools available to the model. Defaults to an empty list.

Link copied to clipboard
val topP: Double?

Nucleus sampling parameter (0.0–1.0). null uses provider default.

Link copied to clipboard

The truncation strategy for the context window. null uses provider default.

Link copied to clipboard
val user: String?

A stable identifier for the end user. null when not set.

Functions

Link copied to clipboard
Link copied to clipboard
open override fun toDto(): OpenAIResponsesRequestDto