请求头
枚举值:
application/json
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
请求体
要使用的模型名称。
查询内容。
文档列表。
返回最相关文档或索引的数量。
响应参数
ID
Token 使用统计信息。
curl --request POST \
--url https://api.ppinfra.com/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.ppinfra.com/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