OpenAI(ChatGPT
  1. 聊天(Chat)
OpenAI(ChatGPT
  • 发出请求
  • 参数详情
  • 音频(Audio)
    • 创建语音
      POST
    • 创建转录
      POST
    • 创建翻译
      POST
  • 聊天(Chat)
    • Chat Completions 对象
    • Chat Completions 对象块
    • 创建 Chat Completions
      POST
    • Chat(流式返回)
      POST
    • 图像 + 文本联合输入接口
      POST
    • Chat(分析图片)
      POST
    • Chat(调用工具 / 函数)
      POST
    • Chat(生成图片)
      POST
    • Chat(修改图片)
      POST
  • 自动补全(Completions)
    • Completions 对象
    • 创建 Completions
      POST
  • 嵌入(Embeddings)
    • 嵌入对象
    • 创建嵌入
      POST
  • 图像(Images)
    • README
    • 图像对象
    • 创建图像
      POST
    • 创建图片编辑
      POST
    • 创建图像变体
      POST
  • 模型(Models)
    • 模型对象
    • 列出模型
      GET
    • 检索模型
      GET
  1. 聊天(Chat)

Chat Completions 对象块

参数类型描述
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"}]}
修改于 2025-05-04 19:18:35
上一页
Chat Completions 对象
下一页
创建 Chat Completions
Built with