cURL
curl --request POST \ --url https://api.tkhub.ai/v1/rerank \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "rerank-english-v2.0", "query": "<string>", "documents": [ "<string>" ], "top_n": 123, "return_documents": false } '
{ "id": "<string>", "results": [ { "index": 123, "relevance_score": 123, "document": {} } ], "meta": {} }
根据查询对文档列表进行相关性重排序
Documentation IndexFetch the complete documentation index at: https://docs.tkhub.ai/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: https://docs.tkhub.ai/llms.txt
Use this file to discover all available pages before exploring further.
使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx
Authorization: Bearer sk-xxxxxx
"rerank-english-v2.0"
查询文本
要重排序的文档列表
返回前 N 个结果
成功重排序
Show child attributes
Was this page helpful?