from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.responses.update(response_id="resp_abc123", metadata={
"status": "reviewed",
"reviewer": "john_doe",
})
# Handle response
print(res){
"id": "resp_abc123",
"object": "response",
"created_at": 1735689600,
"completed_at": 1735689601,
"status": "completed",
"error": null,
"incomplete_details": null,
"background": false,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": 30,
"metadata": {
"status": "reviewed",
"reviewer": "john_doe"
},
"model": "meetkai:functionary-urdu-mini-pak",
"output": [
{
"type": "message",
"id": "msg_abc123",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "The capital of France is Paris.",
"annotations": []
}
],
"status": "completed"
}
],
"output_text": "The capital of France is Paris.",
"parallel_tool_calls": true,
"previous_response_id": null,
"reasoning": {
"effort": null,
"summary": null
},
"service_tier": "auto",
"store": true,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [],
"truncation": "auto",
"usage": {
"input_tokens": 8,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 7,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 15
},
"user": null
}Actualizar los metadatos de una respuesta.
from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.responses.update(response_id="resp_abc123", metadata={
"status": "reviewed",
"reviewer": "john_doe",
})
# Handle response
print(res){
"id": "resp_abc123",
"object": "response",
"created_at": 1735689600,
"completed_at": 1735689601,
"status": "completed",
"error": null,
"incomplete_details": null,
"background": false,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": 30,
"metadata": {
"status": "reviewed",
"reviewer": "john_doe"
},
"model": "meetkai:functionary-urdu-mini-pak",
"output": [
{
"type": "message",
"id": "msg_abc123",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "The capital of France is Paris.",
"annotations": []
}
],
"status": "completed"
}
],
"output_text": "The capital of France is Paris.",
"parallel_tool_calls": true,
"previous_response_id": null,
"reasoning": {
"effort": null,
"summary": null
},
"service_tier": "auto",
"store": true,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [],
"truncation": "auto",
"usage": {
"input_tokens": 8,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 7,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 15
},
"user": null
}Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
El identificador único de la respuesta, formateado como 'resp_' o 'resp-' seguido de caracteres alfanuméricos.
^resp[-_][a-zA-Z0-9]+$Esquema de solicitud para actualizar los metadatos de una respuesta.
Show child attributes
El objeto de respuesta actualizado.
El estado general de la generación de respuestas. 'completado' significa finalizado con éxito, 'fallido' significa que ocurrió un error, 'en_proceso' significa que se está procesando actualmente, 'cancelado' significa cancelado por el usuario, 'en_colas' significa esperando para comenzar, 'incompleto' significa finalización parcial.
completed, failed, in_progress, cancelled, queued, incomplete Show child attributes
Show child attributes
-9007199254740991 <= x <= 9007199254740991null
-9007199254740991 <= x <= 9007199254740991Show child attributes
Elemento de mensaje de entrada: Un mensaje con rol y contenido. Utiliza esto para turnos de usuario, asistente, sistema o desarrollador en entradas estructuradas.
Show child attributes
Show child attributes
Modo de elección de herramienta: Selecciona cómo el modelo decide el uso de herramientas. Usa ninguno, automático o requerido.
none, auto, required Definición de herramienta de función: Define una herramienta de función callable. Proporcione un nombre de herramienta y un esquema de parámetros, con descripción opcional y carga diferida.
Show child attributes
auto, disabled Show child attributes
Show child attributes
Show child attributes
Show child attributes
auto, default, flex, priority 0 <= x <= 20 <= x <= 200 <= x <= 1Show child attributes
¿Esta página le ayudó?