Response Params
Everything about a Responses API call except the conversation itself.
The Responses API is stateless, so the same parameters are reused turn after turn while only the input grows:
val params = responseParams { instructions = "You are a helpful assistant." }
val history = mutableListOf<ResponseItem>(MessageItem(ResponseRole.USER, "Hi"))
val first = client.createResponse(params, history)
history += first.outputEvery constraint the API documents is checked on construction, so an invalid combination fails here rather than as a 400 from the server.
See also
Types
Builder for creating ResponseParams with standard (non-streaming) configuration.
Builder for creating ResponseParams configured for streaming responses.
Properties
System-level instruction, inserted as the first system message of the model's context. Either this or an input is required.
Ceiling on the tokens generated for the response, counting both the visible answer and the reasoning. At least 1.
The DeepSeek model to use; defaults to ChatModel.DEEPSEEK_FLASH.
Thinking-mode configuration; see ReasoningConfig.
Sampling temperature between 0.0 and 2.0; has no effect in thinking mode.
Shape of the answer, including JSON-Schema-constrained output; see TextConfig.
Which tool, if any, the model must call.
Tools the model may use — functions, and the server-side web search.
How many most likely tokens to report at each position; 0 to 20.
Functions
Creates a copy of these parameters with optional changes to specific properties.
Creates a ResponseRequest with no input, driven by instructions alone.
Creates a ResponseRequest carrying a single user message.
Creates a ResponseRequest carrying a conversation.
Creates a ResponseRequest from an already-shaped input.