Update API docs: document judge_language in all score endpoints

- POST /api/score: add judge_language section with default/usage

- POST /api/score/async: mention judge_language in docstring

- POST /api/score/session_async: add to description string + JSON example

- ScoreRequest / SessionScoreRequest: add judge_language to schema example

- request_summary snapshots: include judge_language for observability

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
wangwei
2026-07-01 20:21:04 +08:00
co-authored by Copilot
parent 24a8688a34
commit 3a82d8c487
6 changed files with 20 additions and 3 deletions
+4 -1
View File
@@ -45,10 +45,13 @@ def submit_async_score(request: ScoreRequest) -> AsyncScoreJobResponse:
**适合 Dify 工作流**:HTTP 节点无需等待评分完成(无超时风险),
工作流立即继续,评分结果在 RAGAS 平台「运行列表」中查看。
评分完成后自动生成:
接受与 `POST /api/score` 完全相同的请求体(含 `judge_language`),
但以异步方式在后台运行,完成后自动生成:
- 各指标得分(`scores.csv`
- 摘要报告(`summary.md`
- LLM 优化建议(`optimization_advice.md`
**`judge_language`**:传 `"zh"` 开启中文评判 prompt;默认 `null`(使用全局配置,出厂为 `"en"`)。
"""
logger.info(
"[score_async] submit metrics=%s has_ctx=%s has_gt=%s",