API中文文档
  1. 聊天(Chat)
API中文文档
  • 介绍
  • 项目说明
  • 导言
  • 身份验证
  • 参数详情
  • 音频(Audio)
    • 创建语音
      POST
    • 创建转录
      POST
    • 创建翻译
      POST
  • 聊天(Chat)
    • 聊天完成对象
    • 聊天完成块对象
    • 创建聊天补全
      POST
  • 自动补全(Completions)
    • 完成对象
    • 创建完成
      POST
  • 模型(Models)
    • 模型对象
    • 列出模型
      GET
    • 检索模型
      GET
  1. 聊天(Chat)

聊天完成块对象

参数类型描述
idstring聊天完成的唯一标识符。每个块具有相同的ID
choicesarray聊天完成选项列表。如果n大于1,可以有多个选项
createdinteger创建聊天完成的Unix时间戳(秒)。每个块具有相同的时间戳
modelstring生成完成的模型
system_fingerprintstring该指纹表示模型运行的后端配置
objectstring对象类型,总是 chat.completion.chunk
{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-3.5-turbo-0613", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}]}

{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-3.5-turbo-0613", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"content":"Hello"},"finish_reason":null}]}

{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-3.5-turbo-0613", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"content":"!"},"finish_reason":null}]}

....

{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-3.5-turbo-0613", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"content":" today"},"finish_reason":null}]}

{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-3.5-turbo-0613", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"content":"?"},"finish_reason":null}]}

{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-3.5-turbo-0613", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
上一页
聊天完成对象
下一页
创建聊天补全
Built with