Submit feedback for an AI invocation
PATCH/v1/ai/invoke/:invocation_identifier/feedback
Stores thumbs up/down and an optional comment for an invocation. When message_id is omitted, feedback is stored on the last assistant message in the invocation.
Request
Parameters (JSON)
{
"parameters": [
{
"schema": {
"type": "string"
},
"in": "path",
"name": "invocation_identifier",
"required": true,
"description": "A unique identifier for the invocation."
}
]
}Request body schema (JSON)
{
"title": "Body",
"body": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message_id": {
"description": "The identifier of the assistant message to rate. When omitted, feedback is stored on the last assistant message in the invocation (recommended).",
"type": "string"
},
"feedback_rating": {
"type": "string",
"enum": [
"positive",
"negative"
],
"description": "The feedback rating for the AI invocation response."
},
"feedback_comment": {
"description": "Optional free-text comment accompanying the feedback.",
"type": "string"
}
},
"required": [
"feedback_rating"
]
}
}
},
"required": true
}
}Responses
- 200
- 404
- 500
Default Response
Default Response
Default Response
Responses (JSON)
{
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
},
"required": [
"ok"
],
"additionalProperties": false
}
}
}
},
"404": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"details": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false
}
}
}
},
"500": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"details": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false
}
}
}
}
}
}