请求头
枚举值:
application/json
Bearer 身份验证格式: Bearer {{API 秘钥}}。
请求体
要使用的模型名称。
搜索查询。
文档列表。
返回的最相关文档或索引的数量。
响应
ID
Tokens 使用统计。
curl --request POST \
--url https://api.jiekou.ai/openai/v1/rerank \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '{
"model": "<string>",
"query": "<string>",
"documents": [
"<string>"
],
"top_n": 123
}'
{
"id": "<string>",
"results": [
{
"document": {
"text": "<string>"
},
"index": 123,
"relevance_score": 123
}
],
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
}
}
curl --request POST \
--url https://api.jiekou.ai/openai/v1/rerank \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '{
"model": "<string>",
"query": "<string>",
"documents": [
"<string>"
],
"top_n": 123
}'
{
"id": "<string>",
"results": [
{
"document": {
"text": "<string>"
},
"index": 123,
"relevance_score": 123
}
],
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
}
}
application/json