Example
json
// Trigger a response with the default Conversation and no special parameters
{
"type": "response.create",
}
// Trigger an out-of-band response that does not write to the default Conversation
{
"type": "response.create",
"response": {
"instructions": "Provide a concise answer.",
"tools": [], // clear any session tools
"conversation": "none",
"output_modalities": ["text"],
"metadata": {
"response_purpose": "summarization"
},
"input": [
{
"type": "item_reference",
"id": "item_12345"
},
{
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "Summarize the above message in one sentence."
}
]
}
]
}
}response.cancel
Send this event to cancel an in-progress response. The server will respond with a response.done event with a status of response.status=cancelled. If there is no response to cancel, the server will respond with an error. It's safe to call response.cancel even if no response is in progress, an error will be returned the session will remain unaffected.