Input Builder
class InputBuilder
DSL for building the input of a Responses API call.
Appends items in call order. Because the API is stateless, a previous response's output is appended verbatim with items to continue the conversation.
Example:
client.createResponse {
input {
user("What is the weather in Tokyo?")
items(previous.output)
functionCallOutput(callId, """{"temp_c": 21}""")
}
}Content copied to clipboard
Functions
Link copied to clipboard
Appends a function call, replaying one the model emitted earlier.
Link copied to clipboard
Appends the result of running a function, as content parts — which lets a tool hand the model an image it produced.
Appends the result of running a function the model called.
Link copied to clipboard
Appends a ready-made item.
Link copied to clipboard
Appends ready-made items, typically the output of a previous response.
Link copied to clipboard
Appends a message with an arbitrary role.
Link copied to clipboard
Appends a multimodal user message assembled by a ContentBuilder DSL.
Appends a user message.