Chat OpenAI(ChatGPT)中文文档
  1. Rerank API
Chat OpenAI(ChatGPT)中文文档
  • 发出请求
  • 模型接口
    • 完成对象
    • OpenAI接口(Chat)
      • 列出模型
      • 聊天接口(通用)
      • 官方Function calling调用
      • 官方N测试
      • 官方最新response_format
      • 识图接口(通用)
    • Anthropic Claude
      • 官方Function calling调用
      • 聊天接口
      • 聊天接口(原生API格式请求)
      • 识图接口
    • 谷歌Gemini
      • 聊天接口
      • 识图接口
    • Midjourney
      • 提交swap_face任务
      • 执行Action动作
      • 根据ID列表查询任务
      • 提交Blend任务
      • 指定ID获取任务
      • 提交Describe任务
      • 获取任务图片的seed
      • 提交Imagine任务
      • 提交Modal
      • 上传文件到discord
    • GPTs 相关
      • GPTs对话
      • 搜索相关 GPTs
      • 查询 GPTs 详情
      • 批量查询 GPTs 详情
      • gpt-4-all(分析图片)
      • gpt-4-all(生成图片)
    • 文生音乐 Suno
      • 生成歌曲(API格式)
      • 生成歌词(API格式)
      • 查询单个任务(API格式)
      • 文生音乐(Chat格式)
    • 文生视频
      • 智谱清言GLM
      • 文生视频(luma)
      • 文生视频(runway)
    • Rerank API
      • Rerank API
        POST
    • 自动补全接口(Completions)
      • 内容补全接口
    • 文生图接口
      • DALL·E 3
      • Flux(OpenAI dall-e-3格式)
      • ideogram
      • Stable-Diffusion
    • 向量生成接口(Embeddings)
      • 创建嵌入
    • 音频接口(Audio)
      • 创建转录
      • 创建翻译
      • TTS文本转语音
    • 审查(Moderations)
      • 创建内容审核
  • 帮助中心
    • 常见问题及解决办法
  • 数据模型
    • 示例数据模型
      • Pet
      • Category
      • Tag
    • Schemas
      • Blend提交参数
      • CheckActivationDTO
      • Describe提交参数
      • CustomAccountFilter
      • Discord账号
      • Imagine提交参数
      • Map«string,object»
      • Filter
      • Message«Discord账号»
      • Message«Map«string,object»»
      • Message«Void»
      • Message«string»
      • Message«List«string»»
      • Modal提交参数
      • Option
      • Pageable
      • Page«Map«string,object»»
      • Page«任务»
      • Shorten提交参数
      • Sort
      • TaskQueryDTO
      • 任务
      • 任务查询参数
      • 变化任务提交参数
      • SwapFace提交参数
      • 变化任务提交参数-simple
      • 可执行按钮
      • 可执行按钮_1
      • 执行动作参数
      • 提交结果
      • 激活服务参数
      • 账号修改参数
      • 账号创建参数
      • 账号查询参数
      • 文件上传参数
      • 账号筛选条件
  1. Rerank API

Rerank API

POST
/rerank
模型供应商选择Jina,按要求填写模型信息即可接入Dify。

请求参数

Header 参数

Body 参数application/json

示例
{
  "model": "rerank-multilingual-v3.0",
  "query": "What is the capital of the United States?",
  "top_n": 3,
  "documents": [
    "Carson City is the capital city of the American state of Nevada.",
    "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.",
    "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.",
    "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.",
    "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."
  ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://gitaigc.com/v1/rerank' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'Authorization: Bearer ' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "rerank-multilingual-v3.0",
  "query": "What is the capital of the United States?",
  "top_n": 3,
  "documents": [
    "Carson City is the capital city of the American state of Nevada.",
    "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.",
    "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.",
    "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.",
    "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."
  ]
}'

返回响应

🟢200OK
application/json
Body

示例
{
    "id": "chatcmpl-123",
    "object": "chat.completion",
    "created": 1677652288,
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "\n\nHello there, how may I assist you today?"
            },
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 9,
        "completion_tokens": 12,
        "total_tokens": 21
    }
}
修改于 2024-10-18 18:48:40
上一页
文生视频(runway)
下一页
内容补全接口
Built with