Documentation Index
Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
Use this file to discover all available pages before exploring further.
使用此端点报告缓存响应存在错误、过期、无关或其他不适合复用的情况。
当某个条目累计到足够多的负面反馈后,TokenLab 可以自动使其失效。
- 认证需要标准的 inference API key。
cache_entry_id 必须是当前 API Key 所属组织拥有的缓存命中 request/cache entry 标识;任意 ID 会返回 404,其他组织的 ID 会返回 403。
feedback_type 支持 wrong_answer、outdated、irrelevant 或 other。
request_id 为可选项;如果提供,必须与 cache_entry_id 相同。
description 为可选的自由格式上下文,便于运营和审计。
请求 / 响应
请使用上方的交互式 OpenAPI 面板查看准确的 schema 和响应字段。
curl -X POST "https://api.tokenlab.sh/v1/cache/feedback" \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"cache_entry_id": "req_1234567890",
"feedback_type": "wrong_answer",
"request_id": "req_1234567890",
"description": "The cached answer referenced an outdated pricing table."
}'
{
"object": "cache.feedback",
"recorded": true,
"invalidated": false,
"stats": {
"negative_feedback_count": 1,
"total_hit_count": 18,
"negative_feedback_rate": 0.0556
}
}