Feedback REST API

Use this API to collect feedback about Cortex Agents from end users.

Collect feedback about a Cortex Agent

POST /api/v2/databases/{database}/schemas/{schema}/agents/{name}:feedback

Creates a feedback event for a Cortex Agent response.

请求

路径参数

参数

描述

database

(Required) Identifier for the database to which the resource belongs. You can use the /api/v2/databases GET request to get a list of available databases.

schema

(Required) Identifier for the schema to which the resource belongs. You can use the /api/v2/databases/{database}/schemas GET request to get a list of available schemas for the specified database.

name

(Required) Identifier for the agent.

请求标头

标头

描述

Authorization

(必需)授权令牌。有关更多信息,请参阅 身份验证

Content-Type

(必需)应用程序/json

请求正文

The request body contains the feedback details for the agent response.

字段

类型

描述

request_id

字符串

Request ID associated with the feedback.

positive

布尔

Whether the response was good (true) or bad (false).

feedback_message

字符串

The text for the detailed feedback message.

categories

array of strings

List of categories for the feedback. Each category is a string that represents a specific category of feedback.

thread_id

整数

The id of the thread.

Example request body

{
  "categories": [
    "Something worked well"
  ],
  "feedback_message": "this is fantastic!",
  "positive": true
}
Copy

响应

A successful response returns a confirmation message.

Response headers

标头

描述

X-Snowflake-Request-ID

Unique ID of the API request.

Response body

{
  "status": "Feedback submitted successfully"
}
Copy
语言: 中文