| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
query |
string | 选填 | - | 查询文本,最大 4000 Token |
documents |
array | 选填 | - | 待排序候选文档字符串数组,最多 500 条 |
top_n |
int | 选填 | - | 只返回相关度最高的前 N 条,默认返回全部 |
return_documents |
bool | 选填 | false |
是否在结果中返回文档原文,默认 false |
instruct |
string | 选填 | - | 检索任务说明(英文撰写更佳),仅 qwen3 系列生效 |
model |
string | 选填 | qwen3-rerank |
重排模型,默认 qwen3-rerank,长文本大候选可选 qwen3.7-text-rerank |
| 字段名 | 类型 | 说明 |
|---|---|---|
code | int | 状态码,0=成功 |
desc | string | 状态描述 |
data− |
object | 业务数据(成功时返回) |
model |
string | 实际使用的模型名称 |
total_tokens |
int | 本次消耗 Token 总数 |
results− |
array | 重排结果,按 relevance_score 从高到低 |
index |
int | 对应入参 documents 中的原始位置 |
relevance_score |
float | 相关性得分 0.0~1.0,仅批次内相对 |
document |
object | 文档原文对象(仅 return_documents=true 时返回) |
request_id | string | 请求追踪ID |
{
"code": 0,
"desc": "success",
"data": { ... },
"request_id": "abc123..."
}
{
"code": 999,
"desc": "错误描述",
"request_id": "abc123..."
}
© 网程科技(林州网程科技有限公司) | 豫ICP备2025120409号-2 | 豫B2-20230220 | 豫公网安备 41058102000262号