Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion astrbot/core/provider/sources/bailian_rerank_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def _parse_results(self, data: dict) -> list[RerankResult]:
f"百炼 API 错误: {data.get('code')} – {data.get('message', '')}"
)

results = data.get("output", {}).get("results", [])
# 兼容旧版 API (output.results) 和新版 compatible API (results)
results = data.get("output", {}).get("results") or data.get("results", [])
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
Outdated
Comment thread
RC-CHN marked this conversation as resolved.
Outdated
if not results:
logger.warning(f"百炼 Rerank 返回空结果: {data}")
return []
Expand Down
Loading