重排序¶
本节列出该能力下当前已实现的接口。
文档重排序¶
POST /v1/rerank
根据查询对文档列表进行相关性重排序
鉴权¶
- Bearer Token (
Authorization: Bearer <token>)
请求体¶
- Content-Type:
application/json - Schema:
RerankRequest
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| model | string | yes | - |
| query | string | yes | 查询文本 |
| documents | array | yes | 要重排序的文档列表 |
| top_n | integer | no | 返回前 N 个结果 |
| return_documents | boolean | no | - |
返回¶
| 状态码 | 说明 | Schema |
|---|---|---|
| 200 | 成功重排序 | RerankResponse |