MetaChat API
  1. 聊天(Chat)
MetaChat API
  • 概述
  • Midjourney
    • 接入说明
    • 模型价格
    • 图像生成
      • 图像生成
    • 图像变换
      • 图像拆分
      • 图像微调(四宫格)
      • 图像重绘
      • 图像高清
      • 图像微调(单图)
      • 图像变焦
      • 图像平移
    • 图像处理
      • 图像描述
      • 图像融合
    • 任务查询
      • 查询结果
  • FLUX.1
    • 接入说明
    • 模型价格
    • 图像生成
      • 图像生成
    • 任务查询
      • 查询结果
  • OpenAI
    • 接入说明
    • 模型价格
    • 聊天(Chat)
      • Chat Completions 对象
      • Chat Completions 对象块
      • 创建 Chat Completions
        POST
    • 图像(Images)
      • 图像对象
      • 图像生成
      • 图片编辑
  • Claude
    • 接入说明
    • 模型价格
    • 聊天(Messages)
      • 消息
  • Gemini
    • 接入说明
    • 模型价格
    • 文本生成
      • 文档理解
      • 文字输入
      • 图片输入
      • 流式输出
      • 多轮对话
      • 多轮对话(流式)
      • 配置参数
    • 图像生成
      • 使用 Gemini 生成图像
      • 使用 Gemini 编辑图像
      • 使用 Imagen 生成图像
  • DeepSeek
    • 接入说明
    • 模型价格
    • 普通聊天
      • 多轮对话
      • 对话补全
    • 推理聊天
      • 推理模型
  1. 聊天(Chat)

Chat Completions 对象块

Chat Completions 对象块(chunk) 主要用于流模式(streaming)时的模型输出。
参数类型描述
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-4.1", "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-4.1", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"content":"Hello"},"finish_reason":null}]}

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

....

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

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

{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-4.1", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
修改于 2025-06-17 16:59:32
上一页
Chat Completions 对象
下一页
创建 Chat Completions
Built with