跳轉到主要內容

總覽

使用此端點回報快取回應有誤、過期、無關,或其他不適合重複使用的情況。 當某個項目累積到足夠多的負面回饋後,LemonData 可以自動將其失效。

注意

  • 驗證需要標準的 inference API key。
  • feedback_type 支援 wrong_answeroutdatedirrelevantother
  • request_id 為選填,有助於將回饋關聯回原始請求紀錄。
  • description 為選填的自由格式內容,方便營運與稽核。

請求 / 回應

請使用上方的互動式 OpenAPI 面板查看準確的 schema 與回應欄位。

範例

curl -X POST "https://api.lemondata.cc/v1/cache/feedback" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "cache_entry_id": "abc123",
    "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
  }
}