CreateResponseRequest

data class CreateResponseRequest(val model: String, val input: Input? = null, val metadata: Map<String, String>? = null, val temperature: Double? = 1.0, val topP: Double? = 1.0, val user: String? = null, val previousResponseId: String? = null, val reasoning: Reasoning? = null, val maxOutputTokens: Int? = null, val instructions: String? = null, val text: TextConfig? = null, val tools: List<Tool>? = null, val toolChoice: String? = null, val truncation: Truncation? = Truncation.DISABLED, val include: List<String>? = null, val parallelToolCalls: Boolean? = true, val store: Boolean? = true, val stream: Boolean? = false) : Record(source)

Represents a request to create a response in the OpenAI API.

Author

Konstantin Pavlov

Constructors

Link copied to clipboard
constructor(model: String, input: Input? = null, metadata: Map<String, String>? = null, temperature: Double? = 1.0, topP: Double? = 1.0, user: String? = null, previousResponseId: String? = null, reasoning: Reasoning? = null, maxOutputTokens: Int? = null, instructions: String? = null, text: TextConfig? = null, tools: List<Tool>? = null, toolChoice: String? = null, truncation: Truncation? = Truncation.DISABLED, include: List<String>? = null, parallelToolCalls: Boolean? = true, store: Boolean? = true, stream: Boolean? = false)

Properties

Link copied to clipboard
@SerialName(value = "include")
val include: List<String>?

Optional additional output data to include.

Link copied to clipboard
@SerialName(value = "input")
val input: Input?

The input for the response (text, messages, etc.).

Link copied to clipboard
@SerialName(value = "instructions")
val instructions: String?

Optional instructions for the model.

Link copied to clipboard
@SerialName(value = "max_output_tokens")
val maxOutputTokens: Int?

Optional maximum number of tokens to generate.

Link copied to clipboard
@SerialName(value = "metadata")
val metadata: Map<String, String>?

Optional metadata for the request.

Link copied to clipboard
@SerialName(value = "model")
val model: String

The model to use for generating the response.

Link copied to clipboard
@SerialName(value = "parallel_tool_calls")
val parallelToolCalls: Boolean?

Whether to allow parallel tool calls.

Link copied to clipboard
@SerialName(value = "previous_response_id")
val previousResponseId: String?

Optional ID of the previous response.

Link copied to clipboard
@SerialName(value = "reasoning")
val reasoning: Reasoning?

Optional reasoning configuration.

Link copied to clipboard
@SerialName(value = "store")
val store: Boolean?

Whether to store the response.

Link copied to clipboard
@SerialName(value = "stream")
val stream: Boolean?

Whether to stream the response.

Link copied to clipboard
@SerialName(value = "temperature")
val temperature: Double?

Controls the randomness of the response.

Link copied to clipboard
@SerialName(value = "text")
val text: TextConfig?

Optional text configuration including format settings.

Link copied to clipboard
@SerialName(value = "tool_choice")
val toolChoice: String?

Optional control for which function is called.

Link copied to clipboard
@SerialName(value = "tools")
val tools: List<Tool>?

Optional tools the model may call.

Link copied to clipboard
@SerialName(value = "top_p")
val topP: Double?

Controls the diversity of the response.

Link copied to clipboard
@SerialName(value = "truncation")
val truncation: Truncation?

Optional truncation strategy.

Link copied to clipboard
@SerialName(value = "user")
val user: String?

Optional user identifier.