OpenAI(ChatGPT)
  • 介绍
  • 项目说明
  • 导言
  • 身份验证
  • 发出请求
  • 参数详情
  • 音频(Audio)
  • 聊天(Chat)
  • 自动补全(Completions)
  • 嵌入(Embeddings)
  • 微调(Fine-tuning)
  • 文件(Files)
  • 图像(Images)
  • 模型(Models)
  • 审查(Moderations)
  • 助手测试版(AssistantsBeta)
  • 线程数(Threads)
  • 留言(Messages)
    • 消息对象
    • 消息文件对象
    • 创建消息POST
    • 检索消息GET
    • 修改留言POST
    • 列出消息GET
    • 检索消息文件GET
    • 列出消息文件GET
  • 运行(Runs)
  • 已弃用-音频(Audio)
Powered by Apifox

    消息对象

    代表线程内的消息。

    参数 类型 描述
    id string 标识符,可以在API端点中引用
    object string 对象类型,总是thread.message
    created_at integer 创建消息的Unix时间戳(秒)
    thread_id string 此消息所属的线程ID
    role string 产生消息的实体。user或assistant之一
    content array 消息内容,文本和/或图像的数组
    assistant_id string 或 null 如果适用,创作此消息的助手的ID
    run_id string 或 null 如果适用,与创作此消息相关联的运行的ID
    file_ids array 助手应使用的文件ID列表。对于可以访问文件(如检索和code_interpreter)的工具很有用。每个消息最多可以附加10个文件
    metadata map 最多可以设置16对键值对,以便以结构化格式将其他信息附加到对象。键的最大长度为64个字符,值的最大长度为512个字符
    {
      "id": "msg_dKYDWyQvtjDBi3tudL1yWKDa",
      "object": "thread.message",
      "created_at": 1698983503,
      "thread_id": "thread_RGUhOuO9b2nrktrmsQ2uSR6I",
      "role": "assistant",
      "content": [
        {
          "type": "text",
          "text": {
            "value": "Hi! How can I help you today?",
            "annotations": []
          }
        }
      ],
      "file_ids": [],
      "assistant_id": "asst_ToSF7Gb04YMj8AMMm50ZLLtY",
      "run_id": "run_BjylUJgDqYK9bOhy4yjAiMrn",
      "metadata": {}
    }
    

    扫码加入 Open AI(ChatGPT)微信交流群

    欢迎加入 Open AI(ChatGPT) 交流群!让大家可以分享和讨论有关 Open AI(ChatGPT)API 的开发和使用等相关话题。

    扫码加入交流群
    修改时间 1 个月前
    下一页
    消息文件对象