curl -X POST https://www.geeknow.top/v1/rerank \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "bge-reranker-large", "query": "如何开启流式对话?", "documents": [ "Chat Completions 请求中传入 stream true 后返回 SSE。", "Embedding 接口用于生成文本向量。", "模型列表接口用于查询可用模型。" ], "top_n": 2, "return_documents": true }'
{ "id": "rerank_abc123", "results": [ { "index": 0, "relevance_score": 0.982, "document": { "text": "Chat Completions 请求中传入 stream true 后返回 SSE。" } }, { "index": 2, "relevance_score": 0.417, "document": { "text": "模型列表接口用于查询可用模型。" } } ], "usage": { "total_tokens": 36 } }
对候选文档按查询相关性重新排序。
Documentation IndexFetch the complete documentation index at: https://mercury-eab3b728.mintlify.app/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: https://mercury-eab3b728.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.