{
  "openapi": "3.1.0",
  "info": {
    "title": "FastGPT System OpenAPI",
    "version": "0.1.0",
    "description": "FastGPT 开放 API 文档，仅包含支持 API key 鉴权的接口。"
  },
  "servers": [
    {
      "url": "https://cloud.fastgpt.cn/api",
      "description": "FastGPT 中国大陆云服务"
    },
    {
      "url": "{origin}/api",
      "description": "私有化部署实例（请将 origin 替换为你的 FastGPT 实例地址）",
      "variables": {
        "origin": {
          "default": "https://your-fastgpt-domain.com",
          "description": "自部署 FastGPT 实例的协议与域名（不含尾部斜杠）"
        }
      }
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "x-tagGroups": [
    {
      "name": "基础功能",
      "tags": [
        "模型管理"
      ]
    },
    {
      "name": "应用管理",
      "tags": [
        "应用日志"
      ]
    },
    {
      "name": "对话",
      "tags": [
        "会话管理",
        "对话管理",
        "反馈管理",
        "会话操作"
      ]
    },
    {
      "name": "知识库",
      "tags": [
        "知识库管理",
        "集合管理",
        "集合创建",
        "数据管理",
        "知识库搜索"
      ]
    }
  ],
  "paths": {
    "/core/app/logs/list": {
      "post": {
        "deprecated": true,
        "summary": "获取应用日志列表",
        "description": "分页获取应用的对话日志列表，支持按时间范围、来源、用户等条件筛选",
        "tags": [
          "应用日志"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "title": "显式指定应用",
                        "description": "个人密钥或登录态必须传 appId；应用 Key 始终以 Key 绑定的应用为准。",
                        "type": "object",
                        "properties": {
                          "appId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a05",
                                "description": "应用 ID",
                                "type": "string",
                                "minLength": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "appId"
                        ]
                      },
                      {
                        "title": "应用 API Key（无需 appId）",
                        "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                        "type": "object",
                        "properties": {}
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "title": "按偏移量获取",
                        "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                        "type": "object",
                        "properties": {
                          "offset": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "x-fastgpt-union-parameter": {
                              "label": "分页参数",
                              "position": "first"
                            },
                            "example": 0,
                            "description": "偏移量，从 0 开始",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "pageSize": {
                            "allOf": [
                              {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "分页参数"
                                },
                                "example": 20,
                                "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                "default": 20,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 500
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "分页参数",
                              "position": "last"
                            }
                          },
                          "feedbackType": {
                            "example": "good",
                            "description": "反馈类型：all-全部记录，has_feedback-包含反馈，good-包含赞，bad-包含踩",
                            "type": "string",
                            "enum": [
                              "all",
                              "has_feedback",
                              "good",
                              "bad"
                            ]
                          },
                          "unreadOnly": {
                            "example": false,
                            "description": "是否仅显示未读反馈（当 feedbackType 为 all 时忽略）",
                            "type": "boolean"
                          },
                          "errorFilter": {
                            "example": "has_error",
                            "description": "报错筛选：all-全部记录，has_error-仅看报错",
                            "type": "string",
                            "enum": [
                              "all",
                              "has_error"
                            ]
                          },
                          "dateStart": {
                            "example": "2024-01-01T00:00:00.000Z",
                            "description": "开始时间",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "dateEnd": {
                            "example": "2024-12-31T23:59:59.999Z",
                            "description": "结束时间",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "sources": {
                            "example": [
                              "api",
                              "online"
                            ],
                            "description": "对话来源筛选",
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "test",
                                "online",
                                "share",
                                "api",
                                "cronJob",
                                "feishu",
                                "official_account",
                                "wecom",
                                "wechat",
                                "mcp",
                                "dingtalk",
                                "unknown"
                              ]
                            }
                          },
                          "tmbIds": {
                            "example": [
                              "tmb123",
                              "tmb456"
                            ],
                            "description": "团队成员 ID 列表",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "outLinkUids": {
                            "example": [
                              "user123",
                              "user456"
                            ],
                            "description": "外部用户 ID 列表",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "chatSearch": {
                            "example": "hello",
                            "description": "对话内容搜索关键词",
                            "type": "string"
                          }
                        },
                        "required": [
                          "offset",
                          "dateStart",
                          "dateEnd"
                        ]
                      },
                      {
                        "title": "按页码获取",
                        "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                        "type": "object",
                        "properties": {
                          "pageNum": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "x-fastgpt-union-parameter": {
                              "label": "分页参数",
                              "position": "first"
                            },
                            "example": 1,
                            "description": "页码，从 1 开始；传入 offset 时忽略",
                            "default": 1,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "pageSize": {
                            "allOf": [
                              {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "分页参数"
                                },
                                "example": 20,
                                "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                "default": 20,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 500
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "分页参数",
                              "position": "last"
                            }
                          },
                          "feedbackType": {
                            "example": "good",
                            "description": "反馈类型：all-全部记录，has_feedback-包含反馈，good-包含赞，bad-包含踩",
                            "type": "string",
                            "enum": [
                              "all",
                              "has_feedback",
                              "good",
                              "bad"
                            ]
                          },
                          "unreadOnly": {
                            "example": false,
                            "description": "是否仅显示未读反馈（当 feedbackType 为 all 时忽略）",
                            "type": "boolean"
                          },
                          "errorFilter": {
                            "example": "has_error",
                            "description": "报错筛选：all-全部记录，has_error-仅看报错",
                            "type": "string",
                            "enum": [
                              "all",
                              "has_error"
                            ]
                          },
                          "dateStart": {
                            "example": "2024-01-01T00:00:00.000Z",
                            "description": "开始时间",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "dateEnd": {
                            "example": "2024-12-31T23:59:59.999Z",
                            "description": "结束时间",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "sources": {
                            "example": [
                              "api",
                              "online"
                            ],
                            "description": "对话来源筛选",
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "test",
                                "online",
                                "share",
                                "api",
                                "cronJob",
                                "feishu",
                                "official_account",
                                "wecom",
                                "wechat",
                                "mcp",
                                "dingtalk",
                                "unknown"
                              ]
                            }
                          },
                          "tmbIds": {
                            "example": [
                              "tmb123",
                              "tmb456"
                            ],
                            "description": "团队成员 ID 列表",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "outLinkUids": {
                            "example": [
                              "user123",
                              "user456"
                            ],
                            "description": "外部用户 ID 列表",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "chatSearch": {
                            "example": "hello",
                            "description": "对话内容搜索关键词",
                            "type": "string"
                          }
                        },
                        "required": [
                          "dateStart",
                          "dateEnd"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "offset": 0,
                "dateStart": "2024-01-01T00:00:00.000Z",
                "dateEnd": "2024-12-31T23:59:59.999Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功获取应用日志列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "example": {
                        "total": 100,
                        "list": []
                      },
                      "description": "应用对话日志列表",
                      "type": "object",
                      "properties": {
                        "total": {
                          "example": 100,
                          "description": "总记录数",
                          "type": "number"
                        },
                        "list": {
                          "description": "对话日志记录列表",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "publishSource": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "description": "最近一次运行的调用渠道类型；无法识别时归为 unknown",
                                    "example": "api",
                                    "default": "unknown",
                                    "type": "string",
                                    "enum": [
                                      "test",
                                      "online",
                                      "share",
                                      "api",
                                      "cronJob",
                                      "feishu",
                                      "official_account",
                                      "wecom",
                                      "wechat",
                                      "mcp",
                                      "dingtalk",
                                      "unknown"
                                    ]
                                  },
                                  "id": {
                                    "description": "渠道记录的数据库 ID；内部入口及无法恢复引用的历史数据可省略",
                                    "example": "6909d3c4b6a72185d0f08101",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  "name": {
                                    "description": "当前渠道名称，兼容历史来源名称",
                                    "example": "客服后端",
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "_id": {
                                "example": "68ad85a7463006c963799a05",
                                "description": "对话日志 ID",
                                "type": "string"
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "对话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "title": {
                                "example": "用户对话",
                                "description": "对话标题",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "customTitle": {
                                "example": "自定义标题",
                                "description": "自定义对话标题",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "source": {
                                "deprecated": true,
                                "description": "旧调用渠道类型，兼容保留；使用 publishSource.type",
                                "example": "api",
                                "default": "unknown",
                                "type": "string",
                                "enum": [
                                  "test",
                                  "online",
                                  "share",
                                  "api",
                                  "cronJob",
                                  "feishu",
                                  "official_account",
                                  "wecom",
                                  "wechat",
                                  "mcp",
                                  "dingtalk",
                                  "unknown"
                                ]
                              },
                              "sourceName": {
                                "example": "客服后端",
                                "deprecated": true,
                                "description": "旧渠道名称，兼容保留；使用 publishSource.name",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "updateTime": {
                                "example": "2024-01-01T00:30:00.000Z",
                                "description": "更新时间",
                                "type": "string"
                              },
                              "createTime": {
                                "example": "2024-01-01T00:00:00.000Z",
                                "description": "创建时间",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "messageCount": {
                                "example": 10,
                                "description": "消息数量",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userGoodFeedbackCount": {
                                "example": 3,
                                "description": "好评反馈数量",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userBadFeedbackCount": {
                                "example": 1,
                                "description": "差评反馈数量",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "customFeedbacksCount": {
                                "example": 2,
                                "description": "自定义反馈数量",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "markCount": {
                                "example": 0,
                                "description": "标记数量",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "averageResponseTime": {
                                "example": 1500,
                                "description": "平均响应时间(毫秒)",
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "errorCount": {
                                "example": 0,
                                "description": "错误次数",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "totalPoints": {
                                "example": 150.5,
                                "description": "总积分消耗",
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outLinkUid": {
                                "example": "outLink123",
                                "description": "使用者 ID，外链访客或 API customUid；非空时优先于 tmbId",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tmbId": {
                                "example": "tmb123",
                                "description": "本次实际鉴权成员 ID，代理调用时为被代理成员",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sourceMember": {
                                "description": "来源成员信息（兼容字段，分享来源可能为访客）",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "example": "张三",
                                        "description": "成员名称",
                                        "type": "string"
                                      },
                                      "avatar": {
                                        "description": "成员头像",
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "example": "active",
                                        "description": "成员状态",
                                        "type": "string",
                                        "enum": [
                                          "active",
                                          "leave",
                                          "forbidden"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "status"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "authMember": {
                                "description": "按 tmbId 解析的鉴权成员信息，仅用于展示",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "example": "张三",
                                        "description": "成员名称",
                                        "type": "string"
                                      },
                                      "avatar": {
                                        "description": "成员头像",
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "example": "active",
                                        "description": "成员状态",
                                        "type": "string",
                                        "enum": [
                                          "active",
                                          "leave",
                                          "forbidden"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "status"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "versionName": {
                                "example": "v1.0.0",
                                "description": "版本名称",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "originIp": {
                                "example": "192.168.1.1",
                                "description": "原始 IP 地址",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "region": {
                                "example": "中国",
                                "description": "区域",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "_id",
                              "chatId",
                              "source",
                              "updateTime"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "total",
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/app/logs/search": {
      "post": {
        "summary": "搜索应用日志列表",
        "description": "按游标搜索应用的对话日志列表，每页固定 50 条且不查询总数",
        "tags": [
          "应用日志"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "title": "显式指定应用",
                        "description": "个人密钥或登录态必须传 appId；应用 Key 始终以 Key 绑定的应用为准。",
                        "type": "object",
                        "properties": {
                          "appId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a05",
                                "description": "应用 ID",
                                "type": "string",
                                "minLength": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "appId"
                        ]
                      },
                      {
                        "title": "应用 API Key（无需 appId）",
                        "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                        "type": "object",
                        "properties": {}
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "feedbackType": {
                        "example": "good",
                        "description": "反馈类型：all-全部记录，has_feedback-包含反馈，good-包含赞，bad-包含踩",
                        "type": "string",
                        "enum": [
                          "all",
                          "has_feedback",
                          "good",
                          "bad"
                        ]
                      },
                      "unreadOnly": {
                        "example": false,
                        "description": "是否仅显示未读反馈（当 feedbackType 为 all 时忽略）",
                        "type": "boolean"
                      },
                      "errorFilter": {
                        "example": "has_error",
                        "description": "报错筛选：all-全部记录，has_error-仅看报错",
                        "type": "string",
                        "enum": [
                          "all",
                          "has_error"
                        ]
                      },
                      "dateStart": {
                        "example": "2024-01-01T00:00:00.000Z",
                        "description": "开始时间",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "dateEnd": {
                        "example": "2024-12-31T23:59:59.999Z",
                        "description": "结束时间",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "sources": {
                        "example": [
                          "api",
                          "online"
                        ],
                        "description": "对话来源筛选",
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "test",
                            "online",
                            "share",
                            "api",
                            "cronJob",
                            "feishu",
                            "official_account",
                            "wecom",
                            "wechat",
                            "mcp",
                            "dingtalk",
                            "unknown"
                          ]
                        }
                      },
                      "tmbIds": {
                        "example": [
                          "tmb123",
                          "tmb456"
                        ],
                        "description": "团队成员 ID 列表",
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "outLinkUids": {
                        "example": [
                          "user123",
                          "user456"
                        ],
                        "description": "外部用户 ID 列表",
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "chatSearch": {
                        "example": "chat123",
                        "description": "搜索关键词；与 searchType 共同指定标题搜索或会话 ID 精确匹配",
                        "type": "string"
                      },
                      "searchType": {
                        "description": "搜索类型：title 搜索标题，chatId 精确匹配会话 ID；省略时兼容旧搜索",
                        "example": "title",
                        "type": "string",
                        "enum": [
                          "title",
                          "chatId"
                        ]
                      },
                      "cursor": {
                        "example": {
                          "timestamp": 1735689600000,
                          "id": "68ad85a7463006c963799a05"
                        },
                        "description": "上一页响应中的 nextCursor；首屏请求省略，后续请求原样传入",
                        "type": "object",
                        "properties": {
                          "timestamp": {
                            "example": 1735689600000,
                            "description": "游标时间戳（毫秒）",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "id": {
                            "example": "68ad85a7463006c963799a05",
                            "description": "游标日志 ID",
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "timestamp",
                          "id"
                        ]
                      }
                    },
                    "required": [
                      "dateStart",
                      "dateEnd"
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "dateStart": "2024-01-01T00:00:00.000Z",
                "dateEnd": "2024-12-31T23:59:59.999Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功搜索应用日志列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "example": {
                        "list": []
                      },
                      "description": "应用对话日志搜索结果",
                      "type": "object",
                      "properties": {
                        "list": {
                          "description": "对话日志记录列表，固定返回 50 条",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "publishSource": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "description": "最近一次运行的调用渠道类型；无法识别时归为 unknown",
                                    "example": "api",
                                    "default": "unknown",
                                    "type": "string",
                                    "enum": [
                                      "test",
                                      "online",
                                      "share",
                                      "api",
                                      "cronJob",
                                      "feishu",
                                      "official_account",
                                      "wecom",
                                      "wechat",
                                      "mcp",
                                      "dingtalk",
                                      "unknown"
                                    ]
                                  },
                                  "id": {
                                    "description": "渠道记录的数据库 ID；内部入口及无法恢复引用的历史数据可省略",
                                    "example": "6909d3c4b6a72185d0f08101",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  "name": {
                                    "description": "当前渠道名称，兼容历史来源名称",
                                    "example": "客服后端",
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "_id": {
                                "example": "68ad85a7463006c963799a05",
                                "description": "对话日志 ID",
                                "type": "string"
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "对话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "title": {
                                "example": "用户对话",
                                "description": "对话标题",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "customTitle": {
                                "example": "自定义标题",
                                "description": "自定义对话标题",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "source": {
                                "deprecated": true,
                                "description": "旧调用渠道类型，兼容保留；使用 publishSource.type",
                                "example": "api",
                                "default": "unknown",
                                "type": "string",
                                "enum": [
                                  "test",
                                  "online",
                                  "share",
                                  "api",
                                  "cronJob",
                                  "feishu",
                                  "official_account",
                                  "wecom",
                                  "wechat",
                                  "mcp",
                                  "dingtalk",
                                  "unknown"
                                ]
                              },
                              "sourceName": {
                                "example": "客服后端",
                                "deprecated": true,
                                "description": "旧渠道名称，兼容保留；使用 publishSource.name",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "updateTime": {
                                "example": "2024-01-01T00:30:00.000Z",
                                "description": "更新时间",
                                "type": "string"
                              },
                              "createTime": {
                                "example": "2024-01-01T00:00:00.000Z",
                                "description": "创建时间",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "messageCount": {
                                "example": 10,
                                "description": "消息数量",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userGoodFeedbackCount": {
                                "example": 3,
                                "description": "好评反馈数量",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userBadFeedbackCount": {
                                "example": 1,
                                "description": "差评反馈数量",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "customFeedbacksCount": {
                                "example": 2,
                                "description": "自定义反馈数量",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "markCount": {
                                "example": 0,
                                "description": "标记数量",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "averageResponseTime": {
                                "example": 1500,
                                "description": "平均响应时间(毫秒)",
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "errorCount": {
                                "example": 0,
                                "description": "错误次数",
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "totalPoints": {
                                "example": 150.5,
                                "description": "总积分消耗",
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outLinkUid": {
                                "example": "outLink123",
                                "description": "使用者 ID，外链访客或 API customUid；非空时优先于 tmbId",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tmbId": {
                                "example": "tmb123",
                                "description": "本次实际鉴权成员 ID，代理调用时为被代理成员",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sourceMember": {
                                "description": "来源成员信息（兼容字段，分享来源可能为访客）",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "example": "张三",
                                        "description": "成员名称",
                                        "type": "string"
                                      },
                                      "avatar": {
                                        "description": "成员头像",
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "example": "active",
                                        "description": "成员状态",
                                        "type": "string",
                                        "enum": [
                                          "active",
                                          "leave",
                                          "forbidden"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "status"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "authMember": {
                                "description": "按 tmbId 解析的鉴权成员信息，仅用于展示",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "example": "张三",
                                        "description": "成员名称",
                                        "type": "string"
                                      },
                                      "avatar": {
                                        "description": "成员头像",
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "example": "active",
                                        "description": "成员状态",
                                        "type": "string",
                                        "enum": [
                                          "active",
                                          "leave",
                                          "forbidden"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "status"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "versionName": {
                                "example": "v1.0.0",
                                "description": "版本名称",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "originIp": {
                                "example": "192.168.1.1",
                                "description": "原始 IP 地址",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "region": {
                                "example": "中国",
                                "description": "区域",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "_id",
                              "chatId",
                              "source",
                              "updateTime"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "nextCursor": {
                          "description": "下一页游标；省略表示已加载全部",
                          "type": "object",
                          "properties": {
                            "timestamp": {
                              "example": 1735689600000,
                              "description": "游标时间戳（毫秒）",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "id": {
                              "example": "68ad85a7463006c963799a05",
                              "description": "游标日志 ID",
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          },
                          "required": [
                            "timestamp",
                            "id"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/proApi/core/app/logs/getTotalData": {
      "get": {
        "summary": "获取应用总体数据统计",
        "description": "获取应用的总体数据统计，包括总用户数、总对话数、总积分消耗",
        "tags": [
          "应用日志"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "anyOf": [
                {
                  "title": "显式指定应用",
                  "description": "个人密钥或登录态必须传 appId；应用 Key 始终以 Key 绑定的应用为准。",
                  "type": "object",
                  "properties": {
                    "appId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a05",
                          "description": "应用 ID",
                          "type": "string",
                          "minLength": 1
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    }
                  },
                  "required": [
                    "appId"
                  ]
                },
                {
                  "title": "应用 API Key（无需 appId）",
                  "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                  "type": "object",
                  "properties": {}
                }
              ]
            },
            "required": false,
            "style": "form",
            "explode": true,
            "examples": {
              "default": {
                "value": {
                  "appId": "68ad85a7463006c963799a05"
                },
                "x-disabled": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功获取应用总体数据",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalUsers": {
                          "example": 1000,
                          "description": "总用户数",
                          "type": "number"
                        },
                        "totalChats": {
                          "example": 5000,
                          "description": "总对话数",
                          "type": "number"
                        },
                        "totalPoints": {
                          "example": 15000,
                          "description": "总积分消耗",
                          "type": "number"
                        },
                        "totalInputTokens": {
                          "example": 500000,
                          "description": "总输入 Token 消耗",
                          "type": "number"
                        },
                        "totalOutputTokens": {
                          "example": 200000,
                          "description": "总输出 Token 消耗",
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalUsers",
                        "totalChats",
                        "totalPoints",
                        "totalInputTokens",
                        "totalOutputTokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/proApi/core/app/logs/getChartData": {
      "post": {
        "summary": "获取应用图表数据",
        "description": "严格按起止绝对时间查询，不扩展查询窗口；用户、对话及应用数据统一按开始时间自带的固定偏移分组，无偏移时使用服务器时区，不接收独立时区参数。",
        "tags": [
          "应用日志"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "显式指定应用",
                    "description": "个人密钥或登录态必须传 appId；应用 Key 始终以 Key 绑定的应用为准。",
                    "type": "object",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID",
                            "type": "string",
                            "minLength": 1
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "dateStart": {
                        "example": "2024-01-01T00:00:00.000Z",
                        "description": "开始时间（包含），ISO 字符串保留时区偏移及毫秒；统计使用该固定偏移，未带偏移时按服务器时区，Z 为 UTC",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "dateEnd": {
                        "example": "2024-12-31T23:59:59.999Z",
                        "description": "结束时间（包含），未带偏移时按服务器时区；保持客户端选择的边界，不额外扩展日期",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "source": {
                        "example": [
                          "api",
                          "online"
                        ],
                        "description": "对话来源筛选；省略表示全部来源，空数组表示无匹配",
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "test",
                            "online",
                            "share",
                            "api",
                            "cronJob",
                            "feishu",
                            "official_account",
                            "wecom",
                            "wechat",
                            "mcp",
                            "dingtalk",
                            "unknown"
                          ]
                        }
                      },
                      "offset": {
                        "example": 1,
                        "description": "用户留存偏移量，单位随 userTimespan 变化；未传时默认 1；仅统计所选时间范围内的后续活跃",
                        "default": 1,
                        "type": "number"
                      },
                      "userTimespan": {
                        "example": "day",
                        "description": "用户数据时间跨度",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      },
                      "chatTimespan": {
                        "example": "day",
                        "description": "对话数据时间跨度",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      },
                      "appTimespan": {
                        "example": "day",
                        "description": "应用数据时间跨度",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      }
                    },
                    "required": [
                      "appId",
                      "dateStart",
                      "dateEnd",
                      "userTimespan",
                      "chatTimespan",
                      "appTimespan"
                    ]
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "type": "object",
                    "properties": {
                      "dateStart": {
                        "example": "2024-01-01T00:00:00.000Z",
                        "description": "开始时间（包含），ISO 字符串保留时区偏移及毫秒；统计使用该固定偏移，未带偏移时按服务器时区，Z 为 UTC",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "dateEnd": {
                        "example": "2024-12-31T23:59:59.999Z",
                        "description": "结束时间（包含），未带偏移时按服务器时区；保持客户端选择的边界，不额外扩展日期",
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "source": {
                        "example": [
                          "api",
                          "online"
                        ],
                        "description": "对话来源筛选；省略表示全部来源，空数组表示无匹配",
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "test",
                            "online",
                            "share",
                            "api",
                            "cronJob",
                            "feishu",
                            "official_account",
                            "wecom",
                            "wechat",
                            "mcp",
                            "dingtalk",
                            "unknown"
                          ]
                        }
                      },
                      "offset": {
                        "example": 1,
                        "description": "用户留存偏移量，单位随 userTimespan 变化；未传时默认 1；仅统计所选时间范围内的后续活跃",
                        "default": 1,
                        "type": "number"
                      },
                      "userTimespan": {
                        "example": "day",
                        "description": "用户数据时间跨度",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      },
                      "chatTimespan": {
                        "example": "day",
                        "description": "对话数据时间跨度",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      },
                      "appTimespan": {
                        "example": "day",
                        "description": "应用数据时间跨度",
                        "type": "string",
                        "enum": [
                          "day",
                          "week",
                          "month",
                          "quarter"
                        ]
                      }
                    },
                    "required": [
                      "dateStart",
                      "dateEnd",
                      "userTimespan",
                      "chatTimespan",
                      "appTimespan"
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "dateStart": "2024-01-01T00:00:00.000Z",
                "dateEnd": "2024-12-31T23:59:59.999Z",
                "userTimespan": "day",
                "chatTimespan": "day",
                "appTimespan": "day"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功获取应用图表数据",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "userData": {
                          "description": "用户统计数据",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "timestamp": {
                                "example": 1704067200,
                                "description": "时间戳",
                                "type": "number"
                              },
                              "summary": {
                                "description": "当前时间桶内的用户统计汇总",
                                "type": "object",
                                "properties": {
                                  "userCount": {
                                    "example": 100,
                                    "description": "用户总数",
                                    "type": "number"
                                  },
                                  "newUserCount": {
                                    "example": 30,
                                    "description": "新用户数",
                                    "type": "number"
                                  },
                                  "retentionUserCount": {
                                    "example": 70,
                                    "description": "留存用户数",
                                    "type": "number"
                                  },
                                  "points": {
                                    "example": 1500,
                                    "description": "积分消耗",
                                    "type": "number"
                                  },
                                  "inputTokens": {
                                    "example": 50000,
                                    "description": "输入 Token 消耗",
                                    "type": "number"
                                  },
                                  "outputTokens": {
                                    "example": 20000,
                                    "description": "输出 Token 消耗",
                                    "type": "number"
                                  },
                                  "sourceCountMap": {
                                    "example": {
                                      "api": 50,
                                      "web": 30,
                                      "mobile": 20
                                    },
                                    "description": "各来源用户数量",
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {
                                      "type": "number"
                                    }
                                  }
                                },
                                "required": [
                                  "userCount",
                                  "newUserCount",
                                  "retentionUserCount",
                                  "points",
                                  "inputTokens",
                                  "outputTokens",
                                  "sourceCountMap"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "timestamp",
                              "summary"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "chatData": {
                          "description": "对话统计数据",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "timestamp": {
                                "example": 1704067200,
                                "description": "时间戳",
                                "type": "number"
                              },
                              "summary": {
                                "description": "当前时间桶内的对话统计汇总",
                                "type": "object",
                                "properties": {
                                  "chatItemCount": {
                                    "example": 500,
                                    "description": "消息总数",
                                    "type": "number"
                                  },
                                  "chatCount": {
                                    "example": 100,
                                    "description": "对话会话总数",
                                    "type": "number"
                                  },
                                  "errorCount": {
                                    "example": 5,
                                    "description": "报错消息数量",
                                    "type": "number"
                                  },
                                  "points": {
                                    "example": 800,
                                    "description": "积分消耗",
                                    "type": "number"
                                  },
                                  "inputTokens": {
                                    "example": 30000,
                                    "description": "输入 Token 消耗",
                                    "type": "number"
                                  },
                                  "outputTokens": {
                                    "example": 10000,
                                    "description": "输出 Token 消耗",
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "chatItemCount",
                                  "chatCount",
                                  "errorCount",
                                  "points",
                                  "inputTokens",
                                  "outputTokens"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "timestamp",
                              "summary"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "appData": {
                          "description": "应用统计数据",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "timestamp": {
                                "example": 1704067200,
                                "description": "时间戳",
                                "type": "number"
                              },
                              "summary": {
                                "description": "当前时间桶内的应用效果统计汇总",
                                "type": "object",
                                "properties": {
                                  "goodFeedBackCount": {
                                    "example": 25,
                                    "description": "好评反馈数量",
                                    "type": "number"
                                  },
                                  "badFeedBackCount": {
                                    "example": 3,
                                    "description": "差评反馈数量",
                                    "type": "number"
                                  },
                                  "chatCount": {
                                    "example": 100,
                                    "description": "对话数量",
                                    "type": "number"
                                  },
                                  "totalResponseTime": {
                                    "example": 120000,
                                    "description": "总响应时间(毫秒)",
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "goodFeedBackCount",
                                  "badFeedBackCount",
                                  "chatCount",
                                  "totalResponseTime"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "timestamp",
                              "summary"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "userData",
                        "chatData",
                        "appData"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/app/logs/getUsers": {
      "post": {
        "summary": "获取日志用户列表",
        "description": "获取应用日志中的用户列表，包括外链用户和团队成员，按对话数量排序，支持搜索和分页",
        "tags": [
          "应用日志"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "title": "显式指定应用",
                        "description": "个人密钥或登录态必须传 appId；应用 Key 始终以 Key 绑定的应用为准。",
                        "type": "object",
                        "properties": {
                          "appId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a05",
                                "description": "应用 ID",
                                "type": "string",
                                "minLength": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "appId"
                        ]
                      },
                      {
                        "title": "应用 API Key（无需 appId）",
                        "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                        "type": "object",
                        "properties": {}
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "title": "按偏移量获取",
                        "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                        "type": "object",
                        "properties": {
                          "offset": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "x-fastgpt-union-parameter": {
                              "label": "分页参数",
                              "position": "first"
                            },
                            "example": 0,
                            "description": "偏移量，从 0 开始",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "pageSize": {
                            "allOf": [
                              {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "分页参数"
                                },
                                "example": 20,
                                "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                "default": 20,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 500
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "分页参数",
                              "position": "last"
                            }
                          },
                          "dateStart": {
                            "example": "2024-01-01T00:00:00.000Z",
                            "description": "开始时间",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "dateEnd": {
                            "example": "2024-12-31T23:59:59.999Z",
                            "description": "结束时间",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "searchKey": {
                            "example": "user",
                            "description": "搜索用户名",
                            "type": "string"
                          },
                          "sources": {
                            "example": [
                              "online",
                              "share"
                            ],
                            "description": "来源筛选",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "offset",
                          "dateStart",
                          "dateEnd"
                        ]
                      },
                      {
                        "title": "按页码获取",
                        "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                        "type": "object",
                        "properties": {
                          "pageNum": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "x-fastgpt-union-parameter": {
                              "label": "分页参数",
                              "position": "first"
                            },
                            "example": 1,
                            "description": "页码，从 1 开始；传入 offset 时忽略",
                            "default": 1,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "pageSize": {
                            "allOf": [
                              {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "分页参数"
                                },
                                "example": 20,
                                "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                "default": 20,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 500
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "分页参数",
                              "position": "last"
                            }
                          },
                          "dateStart": {
                            "example": "2024-01-01T00:00:00.000Z",
                            "description": "开始时间",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "dateEnd": {
                            "example": "2024-12-31T23:59:59.999Z",
                            "description": "结束时间",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z||([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "searchKey": {
                            "example": "user",
                            "description": "搜索用户名",
                            "type": "string"
                          },
                          "sources": {
                            "example": [
                              "online",
                              "share"
                            ],
                            "description": "来源筛选",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "dateStart",
                          "dateEnd"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "offset": 0,
                "dateStart": "2024-01-01T00:00:00.000Z",
                "dateEnd": "2024-12-31T23:59:59.999Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功获取日志用户列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "分页使用者列表",
                      "type": "object",
                      "properties": {
                        "total": {
                          "default": 0,
                          "type": "number"
                        },
                        "list": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "outLinkUid": {
                                "example": "outLink123",
                                "description": "使用者 ID，外链访客或 API customUid；非空时优先于 tmbId",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tmbId": {
                                "example": "tmb123",
                                "description": "本次实际鉴权成员 ID，代理调用时为被代理成员",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "example": "用户名",
                                "description": "用户名称",
                                "type": "string"
                              },
                              "avatar": {
                                "example": "https://example.com/avatar.png",
                                "description": "头像",
                                "type": "string"
                              },
                              "count": {
                                "example": 10,
                                "description": "对话数量",
                                "type": "number"
                              }
                            },
                            "required": [
                              "outLinkUid",
                              "tmbId",
                              "name",
                              "count"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "total",
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v2/chat/completions": {
      "post": {
        "tags": [
          "会话操作"
        ],
        "summary": "发起会话 v2",
        "description": "v2 对话接口兼容 GPT 的接口规范。\n\n**密钥使用规范**\n\n- 使用 APIKey 鉴权。调用 `chat/completions` 时，推荐在请求体传入 `body.appId`。\n- 为兼容 OpenAI SDK，也支持 `Authorization: Bearer <apiKey>-<appId>`，此时不需要传递 `body.appId`。\n- 有些 SDK 调用时，`BaseUrl` 需要添加 `v1` 路径，有些不需要，如果出现 404 情况，可补充 `v1` 重试。\n- appId 的优先级：`body.appId` , `<apiKey>-<appId>` , `apikey 关联的 appId(旧版适配)`\n\n**注意事项**\n\n- 接入方后端可传入 `customUid` 标记自己的使用者，值会传递给工作流的 `userId`；它不改变 API Key 的鉴权成员，且与 `authProxy` 互斥。最长 1024 字符，空字符串使用默认成员身份。（FastGPT 4.18.0 及以上版本支持）\n- 如需通过 `authProxy` 代理团队成员身份，需要团队所有者在创建或编辑该 key 时开启 `authProxy`；代理身份仍需要具备目标应用和会话权限。（仅适用于 FastGPT >= v4.15.0）\n- 传入的 `model`，`temperature` 等参数字段均无效，这些字段由编排决定，不会根据 API 参数改变。\n- 不会返回实际消耗 `Token` 值，如果需要，可以设置 `detail=true`，并手动计算 `responseData` 里的 `tokens` 值。\n\n**chatId 行为**\n\n- 不传入（或为空）：不使用 FastGPT 提供的上下文功能，完全通过传入的 `messages` 构建上下文。\n- 非空字符串：使用 chatId 进行对话，自动从 FastGPT 数据库取会话中的对话，并使用 `messages` 数组最后一个内容作为用户问题，其余 message 会被忽略。请自行确保 chatId 唯一，长度最多 1024 字符。\n\n**stream / detail 组合**\n\n- `detail=false, stream=false`：返回精简 JSON（仅 `choices/usage/id` 等）。\n- `detail=false, stream=true`：返回兼容 GPT 的 SSE 流，只包含答案 chunk 和结束标记。\n- `detail=true, stream=false`：在 JSON 中额外包含 `responseData`（各节点详细信息）和 `newVariables`。\n- `detail=true, stream=true`：返回多 event 的 SSE 流（`answer` / `flowNodeStatus` / `flowNodeResponse` / `workflowDuration` 等）。\n\nShare 调用沿用相同的逐条事件协议，但会先按分享配置过滤公共字段；引用、运行状态和技能引用分别受 `showCite`、`showRunningStatus`、`showSkillReferences` 控制，知识库源文件下载仍受分享下载权限控制。\n\n**交互节点**\n\n如果工作流中包含交互节点，需要设置 `detail=true`：\n\n- `stream=true`：可从 `event=interactive` 数据中获取交互节点的配置。\n- `stream=false`：可从 `choices[].message.content` 中获取包含 `interactive` 字段的元素。\n\n非流式响应中的 `interactive` 只包含 `type` 和 `params`，会向下提取 children / loop / tool 包装中最深层的交互，并过滤 `entryNodeIds` / `memoryEdges` / `nodeOutputs` 等内部运行态字段。SSE 可能保留子流程包装，可沿 `params.childrenResponse` 读取内层交互；event 示例省略内部运行态字段，并分别展示不同载荷分支。\n\n接收到交互节点信息后，可以根据数据进行 UI 渲染并引导用户输入/选择，然后再次调用本接口继续工作流：\n\n- 用户选择：直接将选择结果作为 user message 的 content 传入。\n- 表单输入：将输入内容以对象形式序列化为字符串，作为 user message 的 content 传入；务必确保 `chatId` 一致。\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位应用，使用 API Key 或登录态鉴权。API Key 调用可省略 body.appId，由请求头的 apiKey-appId 后缀或旧 API Key 绑定应用补足；登录态调用必须传 appId。应用 Key 不支持代理团队成员。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID。APP API Key 忽略该字段及 SDK 后缀，以 Key 绑定应用为准；个人密钥按 body.appId > Authorization 的 key-appId 后缀解析。后缀不写入数据库",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "元数据",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "消息列表",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "问答输入类型",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "按题目顺序保存的用户回答",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "提问时的问题快照",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "确认方案并开始搭建",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "取消本次搭建",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案的具体意见，不能为空",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "工具调用",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "工具参数",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "工具名称",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "交互式响应（FastGPT 自定义扩展）"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "函数调用",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "工具参数",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "工具名称",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "是否流式返回",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "全局变量或插件输入",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                                "type": "string"
                              },
                              "detail": {
                                "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "是否保留数据集引用",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "是否显示技能引用",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": []
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "API Key 调用时由接入方后端提供的使用者 ID，FastGPT 4.18.0 及以上支持，最长 1024 字符；不改变鉴权成员，与 authProxy 互斥。新会话空字符串沿用默认使用者；已有会话必须与首次使用者一致，已绑定 customUid 后漏传、传空或更换均拒绝；分享链接使用 outLinkAuthData.outLinkUid，不使用此字段",
                                    "type": "string",
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "元数据",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "消息列表",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "问答输入类型",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "按题目顺序保存的用户回答",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "提问时的问题快照",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "确认方案并开始搭建",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "取消本次搭建",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案的具体意见，不能为空",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "工具调用",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "工具参数",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "工具名称",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "交互式响应（FastGPT 自定义扩展）"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "函数调用",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "工具参数",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "工具名称",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "是否流式返回",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "全局变量或插件输入",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                                "type": "string"
                              },
                              "detail": {
                                "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "是否保留数据集引用",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "是否显示技能引用",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "customUid"
                            ]
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "description": "API Key 代理调用身份，与 customUid 互斥，外链会话不支持。按团队成员 ID 或用户名指定；二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "type": "object",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "元数据",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "消息列表",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "问答输入类型",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "按题目顺序保存的用户回答",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "提问时的问题快照",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "确认方案并开始搭建",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "取消本次搭建",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案的具体意见，不能为空",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "工具调用",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "工具参数",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "工具名称",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "交互式响应（FastGPT 自定义扩展）"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "函数调用",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "工具参数",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "工具名称",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "是否流式返回",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "全局变量或插件输入",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                                "type": "string"
                              },
                              "detail": {
                                "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "是否保留数据集引用",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "是否显示技能引用",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "APP API Key（无需 appId）",
                    "description": "使用绑定应用的 APP API Key 时不需要 appId，直接使用 Key 的绑定；身份支持默认身份或 customUid，不支持 authProxy。兼容个人密钥的 OpenAI SDK key-appId 后缀，其代理身份规则同应用会话；普通个人密钥或登录态必须显式提供 appId。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "metadata": {
                            "description": "元数据",
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "messages": {
                            "description": "消息列表",
                            "default": [],
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "system"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "developer"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "user"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "select"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "select": {
                                                        "allOf": [
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "问答输入类型",
                                                                        "type": "string",
                                                                        "const": "agentAsk"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "questions": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "按题目顺序保存的用户回答",
                                                                        "minItems": 1,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "question": {
                                                                              "description": "提问时的问题快照",
                                                                              "type": "string"
                                                                            },
                                                                            "value": {
                                                                              "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "question",
                                                                            "value"
                                                                          ]
                                                                        }
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "questions"
                                                                ],
                                                                "description": ""
                                                              },
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "确认方案并开始搭建",
                                                                            "type": "string",
                                                                            "const": "confirm"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "取消本次搭建",
                                                                            "type": "string",
                                                                            "const": "cancel"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "修改方案",
                                                                            "type": "string",
                                                                            "const": "revise"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "reviseText": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "修改方案的具体意见，不能为空",
                                                                            "type": "string",
                                                                            "minLength": 1
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action",
                                                                      "reviseText"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "select"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "input_audio"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "input_audio": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "data": {
                                                                "type": "string"
                                                              },
                                                              "format": {
                                                                "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                                "type": "string",
                                                                "enum": [
                                                                  "mp3",
                                                                  "wav",
                                                                  "ogg",
                                                                  "m4a",
                                                                  "amr",
                                                                  "mpga"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "data"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "input_audio"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "video_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "video_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "video_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "file": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "file_data": {
                                                                "type": "string"
                                                              },
                                                              "file_id": {
                                                                "type": "string"
                                                              },
                                                              "filename": {
                                                                "type": "string"
                                                              }
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "file"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "name": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "url": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "fileType": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "audio",
                                                              "video",
                                                              "document",
                                                              "unknown",
                                                              "file"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "assistant"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "description": "Assistant message content",
                                          "example": "Hello, how are you?",
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "key": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "refusal"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "refusal": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_calls": {
                                      "allOf": [
                                        {
                                          "description": "工具调用",
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              },
                                              "type": {
                                                "type": "string",
                                                "const": "function"
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "arguments": {
                                                    "description": "工具参数",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "工具名称",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "arguments",
                                                  "name"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "type",
                                              "function"
                                            ]
                                          }
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "interactive": {
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": true,
                                          "description": "交互式响应（FastGPT 自定义扩展）"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "audio": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "function_call": {
                                      "allOf": [
                                        {
                                          "description": "函数调用",
                                          "deprecated": true,
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "arguments": {
                                                  "description": "工具参数",
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "description": "工具名称",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "arguments",
                                                "name"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "refusal": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "tool"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_call_id": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "tool_call_id"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "function"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "name": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "name"
                                  ],
                                  "description": ""
                                }
                              ],
                              "type": "object"
                            }
                          },
                          "stream": {
                            "description": "是否流式返回",
                            "default": false,
                            "type": "boolean"
                          },
                          "variables": {
                            "description": "全局变量或插件输入",
                            "default": {},
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "responseChatItemId": {
                            "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                            "type": "string"
                          },
                          "detail": {
                            "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                            "default": false,
                            "type": "boolean"
                          },
                          "retainDatasetCite": {
                            "description": "是否保留数据集引用",
                            "default": false,
                            "type": "boolean"
                          },
                          "showSkillReferences": {
                            "description": "是否显示技能引用",
                            "default": false,
                            "type": "boolean"
                          }
                        },
                        "required": []
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "API Key 调用时由接入方后端提供的使用者 ID，FastGPT 4.18.0 及以上支持，最长 1024 字符；不改变鉴权成员，与 authProxy 互斥。新会话空字符串沿用默认使用者；已有会话必须与首次使用者一致，已绑定 customUid 后漏传、传空或更换均拒绝；分享链接使用 outLinkAuthData.outLinkUid，不使用此字段",
                                "type": "string",
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "metadata": {
                            "description": "元数据",
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "messages": {
                            "description": "消息列表",
                            "default": [],
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "system"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "developer"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "user"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "select"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "select": {
                                                        "allOf": [
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "问答输入类型",
                                                                        "type": "string",
                                                                        "const": "agentAsk"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "questions": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "按题目顺序保存的用户回答",
                                                                        "minItems": 1,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "question": {
                                                                              "description": "提问时的问题快照",
                                                                              "type": "string"
                                                                            },
                                                                            "value": {
                                                                              "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "question",
                                                                            "value"
                                                                          ]
                                                                        }
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "questions"
                                                                ],
                                                                "description": ""
                                                              },
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "确认方案并开始搭建",
                                                                            "type": "string",
                                                                            "const": "confirm"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "取消本次搭建",
                                                                            "type": "string",
                                                                            "const": "cancel"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "修改方案",
                                                                            "type": "string",
                                                                            "const": "revise"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "reviseText": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "修改方案的具体意见，不能为空",
                                                                            "type": "string",
                                                                            "minLength": 1
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action",
                                                                      "reviseText"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "select"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "input_audio"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "input_audio": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "data": {
                                                                "type": "string"
                                                              },
                                                              "format": {
                                                                "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                                "type": "string",
                                                                "enum": [
                                                                  "mp3",
                                                                  "wav",
                                                                  "ogg",
                                                                  "m4a",
                                                                  "amr",
                                                                  "mpga"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "data"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "input_audio"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "video_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "video_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "video_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "file": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "file_data": {
                                                                "type": "string"
                                                              },
                                                              "file_id": {
                                                                "type": "string"
                                                              },
                                                              "filename": {
                                                                "type": "string"
                                                              }
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "file"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "name": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "url": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "fileType": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "audio",
                                                              "video",
                                                              "document",
                                                              "unknown",
                                                              "file"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "assistant"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "description": "Assistant message content",
                                          "example": "Hello, how are you?",
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "key": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "refusal"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "refusal": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_calls": {
                                      "allOf": [
                                        {
                                          "description": "工具调用",
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              },
                                              "type": {
                                                "type": "string",
                                                "const": "function"
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "arguments": {
                                                    "description": "工具参数",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "工具名称",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "arguments",
                                                  "name"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "type",
                                              "function"
                                            ]
                                          }
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "interactive": {
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": true,
                                          "description": "交互式响应（FastGPT 自定义扩展）"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "audio": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "function_call": {
                                      "allOf": [
                                        {
                                          "description": "函数调用",
                                          "deprecated": true,
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "arguments": {
                                                  "description": "工具参数",
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "description": "工具名称",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "arguments",
                                                "name"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "refusal": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "tool"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_call_id": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "tool_call_id"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "function"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "name": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "name"
                                  ],
                                  "description": ""
                                }
                              ],
                              "type": "object"
                            }
                          },
                          "stream": {
                            "description": "是否流式返回",
                            "default": false,
                            "type": "boolean"
                          },
                          "variables": {
                            "description": "全局变量或插件输入",
                            "default": {},
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "responseChatItemId": {
                            "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                            "type": "string"
                          },
                          "detail": {
                            "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                            "default": false,
                            "type": "boolean"
                          },
                          "retainDatasetCite": {
                            "description": "是否保留数据集引用",
                            "default": false,
                            "type": "boolean"
                          },
                          "showSkillReferences": {
                            "description": "是否显示技能引用",
                            "default": false,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "customUid"
                        ]
                      }
                    ]
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，使用者由 outLinkUid 及外链鉴权结果决定；优先于 appId 和请求头身份，受保护外链仍需 token/Cookie 校验登录态。外链校验失败时不会回退到普通应用鉴权，且不支持 authProxy。",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权对象，包含 shareId 和 outLinkUid。优先于 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                        "type": "string",
                        "maxLength": 1024
                      },
                      "metadata": {
                        "description": "元数据",
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "messages": {
                        "description": "消息列表",
                        "default": [],
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "system"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "text"
                                              },
                                              "text": {
                                                "type": "string"
                                              },
                                              "key": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "text"
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "developer"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "text"
                                              },
                                              "text": {
                                                "type": "string"
                                              },
                                              "key": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "text"
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "user"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "select"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "select": {
                                                    "allOf": [
                                                      {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "description": "问答输入类型",
                                                                    "type": "string",
                                                                    "const": "agentAsk"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "questions": {
                                                                "allOf": [
                                                                  {
                                                                    "description": "按题目顺序保存的用户回答",
                                                                    "minItems": 1,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "question": {
                                                                          "description": "提问时的问题快照",
                                                                          "type": "string"
                                                                        },
                                                                        "value": {
                                                                          "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "question",
                                                                        "value"
                                                                      ]
                                                                    }
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "questions"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "确认方案并开始搭建",
                                                                        "type": "string",
                                                                        "const": "confirm"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "取消本次搭建",
                                                                        "type": "string",
                                                                        "const": "cancel"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "修改方案",
                                                                        "type": "string",
                                                                        "const": "revise"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "reviseText": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "修改方案的具体意见，不能为空",
                                                                        "type": "string",
                                                                        "minLength": 1
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action",
                                                                  "reviseText"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "select"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "text"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "text": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "image_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "image_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          },
                                                          "detail": {
                                                            "type": "string",
                                                            "enum": [
                                                              "auto",
                                                              "low",
                                                              "high"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "image_url"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "input_audio"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "input_audio": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "data": {
                                                            "type": "string"
                                                          },
                                                          "format": {
                                                            "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                            "type": "string",
                                                            "enum": [
                                                              "mp3",
                                                              "wav",
                                                              "ogg",
                                                              "m4a",
                                                              "amr",
                                                              "mpga"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "data"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "input_audio"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "video_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "video_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "video_url"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "file"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "file": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "file_data": {
                                                            "type": "string"
                                                          },
                                                          "file_id": {
                                                            "type": "string"
                                                          },
                                                          "filename": {
                                                            "type": "string"
                                                          }
                                                        }
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "file"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "file_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "name": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "middle"
                                                    }
                                                  },
                                                  "url": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "middle"
                                                    }
                                                  },
                                                  "fileType": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "audio",
                                                          "video",
                                                          "document",
                                                          "unknown",
                                                          "file"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "url"
                                                ],
                                                "description": ""
                                              }
                                            ],
                                            "type": "object"
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "assistant"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "description": "Assistant message content",
                                      "example": "Hello, how are you?",
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "key": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "refusal"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "refusal": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "refusal"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "tool_calls": {
                                  "allOf": [
                                    {
                                      "description": "工具调用",
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "type": {
                                            "type": "string",
                                            "const": "function"
                                          },
                                          "function": {
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "description": "工具参数",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "工具名称",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "type",
                                          "function"
                                        ]
                                      }
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "interactive": {
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": true,
                                      "description": "交互式响应（FastGPT 自定义扩展）"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "audio": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "function_call": {
                                  "allOf": [
                                    {
                                      "description": "函数调用",
                                      "deprecated": true,
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "description": "工具参数",
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "工具名称",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "refusal": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "tool"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "text"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "text": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "image_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "image_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          },
                                                          "detail": {
                                                            "type": "string",
                                                            "enum": [
                                                              "auto",
                                                              "low",
                                                              "high"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "image_url"
                                                ],
                                                "description": ""
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "tool_call_id": {
                                  "allOf": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content",
                                "tool_call_id"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "function"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "name": {
                                  "allOf": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content",
                                "name"
                              ],
                              "description": ""
                            }
                          ],
                          "type": "object"
                        }
                      },
                      "stream": {
                        "description": "是否流式返回",
                        "default": false,
                        "type": "boolean"
                      },
                      "variables": {
                        "description": "全局变量或插件输入",
                        "default": {},
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "responseChatItemId": {
                        "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                        "type": "string"
                      },
                      "detail": {
                        "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                        "default": false,
                        "type": "boolean"
                      },
                      "retainDatasetCite": {
                        "description": "是否保留数据集引用",
                        "default": false,
                        "type": "boolean"
                      },
                      "showSkillReferences": {
                        "description": "是否显示技能引用",
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "outLinkAuthData"
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "对话 ID（chatId）",
                      "type": "string"
                    },
                    "title": {
                      "description": "未命名会话标题生成成功时返回的对话标题",
                      "type": "string"
                    },
                    "model": {
                      "description": "模型名称，v1 接口固定为空字符串",
                      "type": "string",
                      "const": ""
                    },
                    "usage": {
                      "description": "Token 用量。v1 接口为占位值，需要时请从 responseData 计算",
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "description": "固定为 1，需要从 detail 中计算每一个节点的token数",
                          "type": "number",
                          "const": 1
                        },
                        "completion_tokens": {
                          "description": "固定为 1，需要从 detail 中计算每一个节点的token数",
                          "type": "number",
                          "const": 1
                        },
                        "total_tokens": {
                          "description": "固定为 1，需要从 detail 中计算每一个节点的token数",
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "completion_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    },
                    "choices": {
                      "description": "回复选项列表",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "description": "助手消息",
                            "type": "object",
                            "properties": {
                              "role": {
                                "description": "消息角色",
                                "type": "string",
                                "const": "assistant"
                              },
                              "content": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": true
                                    }
                                  }
                                ],
                                "description": "消息内容。普通对话为字符串；detail=true 或工作流命中交互节点时，可能为按字段名区分的对象数组（如 text / interactive / tool / file / reasoning）。v1 会额外补充 type 字段，取值为 text / interactive / tool / file / reasoning；v2 不补充 type。当元素包含 interactive 字段时，只返回交互展示配置，不返回 entryNodeIds / memoryEdges / nodeOutputs 等内部运行态字段"
                              },
                              "reasoning_content": {
                                "description": "思考过程内容（仅推理模型有）",
                                "type": "string"
                              }
                            },
                            "required": [
                              "role",
                              "content"
                            ],
                            "additionalProperties": false
                          },
                          "finish_reason": {
                            "description": "完成原因，例如 stop",
                            "type": "string"
                          },
                          "index": {
                            "description": "选项索引",
                            "type": "number"
                          }
                        },
                        "required": [
                          "message",
                          "finish_reason",
                          "index"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "responseData": {
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      },
                      "description": "各节点详细响应数据（仅 detail=true 时返回）。每项是一个节点的执行结果，常见字段如 moduleName / moduleType / runningTime / quoteList 等",
                      "type": "array"
                    },
                    "newVariables": {
                      "description": "工作流执行后更新的变量（仅 detail=true 时返回）",
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "id",
                    "model",
                    "usage",
                    "choices"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "detailFalseStreamFalse": {
                    "summary": "精简 JSON",
                    "description": "detail=false, stream=false；仅包含基础回复字段。",
                    "value": {
                      "id": "adsfasf",
                      "title": "铃芽之旅导演",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": "电影《铃芽之旅》的导演是新海诚。"
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "detailTrueStreamFalse": {
                    "summary": "详细 JSON",
                    "description": "detail=true, stream=false；包含 responseData 和 newVariables。",
                    "value": {
                      "responseData": [
                        {
                          "moduleName": "Dataset Search",
                          "price": 1.2000000000000002,
                          "model": "Embedding-2",
                          "tokens": 6,
                          "similarity": 0.61,
                          "limit": 3
                        },
                        {
                          "moduleName": "AI Chat",
                          "price": 454.5,
                          "model": "FastAI-4k",
                          "tokens": 303,
                          "question": "导演是谁",
                          "answer": "电影《铃芽之旅》的导演是新海诚。",
                          "maxToken": 2050,
                          "quoteList": [
                            {
                              "dataset_id": "646627f4f7b896cfd8910e38",
                              "id": "8099",
                              "q": "本作的主人公是谁？",
                              "a": "本作的主人公是名叫铃芽的少女。",
                              "source": "手动修改"
                            },
                            {
                              "dataset_id": "646627f4f7b896cfd8910e38",
                              "id": "19339",
                              "q": "电影《铃芽之旅》的导演是谁？",
                              "a": "电影《铃芽之旅》的导演是新海诚。",
                              "source": "手动修改"
                            }
                          ],
                          "completeMessages": [
                            {
                              "obj": "System",
                              "value": "下面是知识库内容:\n1. [本作的主人公是谁？\n本作的主人公是名叫铃芽的少女。]\n2. [电影《铃芽之旅》的导演是谁？\n电影《铃芽之旅》的导演是新海诚。]\n"
                            },
                            {
                              "obj": "Human",
                              "value": "导演是谁"
                            },
                            {
                              "obj": "AI",
                              "value": "电影《铃芽之旅》的导演是新海诚。"
                            }
                          ]
                        }
                      ],
                      "newVariables": {
                        "uid": "asdfadsfasfd2323",
                        "name": "张三"
                      },
                      "id": "",
                      "title": "铃芽之旅导演",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": "电影《铃芽之旅》的导演是新海诚。"
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "interactiveUserSelect": {
                    "summary": "用户选择",
                    "description": "detail=true；从 choices[].message.content 获取 interactive 展示配置。",
                    "value": {
                      "id": "chatId",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": [
                              {
                                "interactive": {
                                  "type": "userSelect",
                                  "params": {
                                    "description": "测试",
                                    "userSelectOptions": [
                                      {
                                        "value": "Confirm",
                                        "key": "option1"
                                      },
                                      {
                                        "value": "Cancel",
                                        "key": "option2"
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "interactiveUserInput": {
                    "summary": "表单输入",
                    "description": "detail=true；按表单字段名提交序列化 JSON，并保持 chatId。",
                    "value": {
                      "id": "chatId",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": [
                              {
                                "interactive": {
                                  "type": "userInput",
                                  "params": {
                                    "description": "测试",
                                    "inputForm": [
                                      {
                                        "type": "input",
                                        "key": "测试 1",
                                        "label": "测试 1",
                                        "description": "",
                                        "value": "",
                                        "defaultValue": "",
                                        "valueType": "string",
                                        "required": false,
                                        "list": [
                                          {
                                            "label": "",
                                            "value": ""
                                          }
                                        ]
                                      },
                                      {
                                        "type": "numberInput",
                                        "key": "测试 2",
                                        "label": "测试 2",
                                        "description": "",
                                        "value": "",
                                        "defaultValue": "",
                                        "valueType": "number",
                                        "required": false,
                                        "list": [
                                          {
                                            "label": "",
                                            "value": ""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  }
                }
              },
              "text/event-stream": {
                "schema": {
                  "example": "event: answer\ndata: {\"choices\":[...]}\n\n",
                  "description": "工作流 SSE 事件流；v2 在 detail=true 时通过 flowNodeResponse 逐条发送节点响应，按 id + parentId 归并，最后以 [DONE] 结束",
                  "type": "string"
                },
                "examples": {
                  "detailFalseStreamTrue": {
                    "summary": "精简 SSE",
                    "description": "detail=false, stream=true；普通成功回答仅包含 data 帧，最后为 [DONE]。",
                    "value": "data: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"电影\"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"《铃芽之旅》的导演是新海诚。\"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
                  },
                  "detailTrueStreamTrue": {
                    "summary": "完整过程",
                    "description": "detail=true, stream=true；节点详情逐条通过 flowNodeResponse 发送。示意顺序不代表固定时序，标题可能提前产生。",
                    "value": "event: flowNodeStatus\ndata: {\"status\":\"running\",\"name\":\"知识库搜索\"}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"电影\"},\"index\":0,\"finish_reason\":null}]}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"《铃芽之旅》的导演是新海诚。\"},\"index\":0,\"finish_reason\":null}]}\n\nevent: flowNodeResponse\ndata: {\"id\":\"response-ai-1\",\"nodeId\":\"ai-1\",\"moduleType\":\"chatNode\",\"moduleName\":\"AI 对话\",\"runningTime\":1.86,\"textOutput\":\"电影《铃芽之旅》的导演是新海诚。\"}\n\nevent: updateVariables\ndata: {\"lastQuestion\":\"导演是谁\",\"searchCount\":1,\"found\":true,\"movieNames\":[\"铃芽之旅\"],\"director\":{\"name\":\"新海诚\"},\"nextPage\":null}\n\nevent: workflowDuration\ndata: {\"durationSeconds\":2.41}\n\nevent: chatTitle\ndata: {\"title\":\"铃芽之旅导演\"}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "interactiveUserSelect": {
                    "summary": "用户选择",
                    "description": "detail=true；收到 interactive 后展示选项，提交选择值继续执行。",
                    "value": "event: interactive\ndata: {\"interactive\":{\"type\":\"userSelect\",\"params\":{\"description\":\"测试\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "interactiveUserInput": {
                    "summary": "表单输入",
                    "description": "detail=true；收到 interactive 后展示表单，提交表单 JSON 字符串继续执行。",
                    "value": "event: interactive\ndata: {\"interactive\":{\"type\":\"userInput\",\"params\":{\"description\":\"测试\",\"inputForm\":[{\"type\":\"input\",\"key\":\"测试 1\",\"label\":\"测试 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"测试 2\",\"label\":\"测试 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}}}\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "event_answer": {
                    "summary": "answer · 回答增量",
                    "description": "包括空文本心跳、回答文本、reasoning_content 思考增量、stop 片段和 [DONE] 结束标记；下方分别展示。",
                    "value": ": 1. 空文本心跳\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"index\":0,\"finish_reason\":null}]}\n\n: 2. 回答文本\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"电影《铃芽之旅》的导演是新海诚。\"},\"index\":0,\"finish_reason\":null}]}\n\n: 3. 思考增量\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"reasoning_content\":\"先核对电影的导演信息。\"},\"index\":0,\"finish_reason\":null}]}\n\n: 4. 回答停止片段\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\n: 5. 整轮流结束\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "event_fastAnswer": {
                    "summary": "fastAnswer · 指定回复",
                    "description": "用于指定回复等即时输出；分别展示文本增量和停止片段。",
                    "value": ": 1. 指定回复文本\nevent: fastAnswer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"正在查询相关资料。\"},\"index\":0,\"finish_reason\":null}]}\n\n: 2. 指定回复停止片段\nevent: fastAnswer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\n"
                  },
                  "event_flowNodeStatus": {
                    "summary": "flowNodeStatus · 节点状态",
                    "description": "节点开始运行时发送；分享调用受运行状态展示权限控制。",
                    "value": "event: flowNodeStatus\ndata: {\"status\":\"running\",\"name\":\"知识库搜索\"}\n\n"
                  },
                  "event_flowNodeResponse": {
                    "summary": "flowNodeResponse · 节点响应",
                    "description": "v2 按节点逐条发送；分别展示顶层和内部子节点。按 id + parentId 归并，无 parentId 时为顶层节点。",
                    "value": ": 1. 顶层节点\nevent: flowNodeResponse\ndata: {\"id\":\"response-ai-1\",\"nodeId\":\"ai-1\",\"moduleType\":\"chatNode\",\"moduleName\":\"AI 对话\",\"runningTime\":1.86,\"textOutput\":\"电影《铃芽之旅》的导演是新海诚。\"}\n\n: 2. 内部子节点\nevent: flowNodeResponse\ndata: {\"id\":\"response-ai-child-1\",\"nodeId\":\"ai-1\",\"moduleType\":\"chatNode\",\"moduleName\":\"AI 对话\",\"runningTime\":1.86,\"textOutput\":\"电影《铃芽之旅》的导演是新海诚。\",\"parentId\":\"response-agent-1\"}\n\n"
                  },
                  "event_toolCall": {
                    "summary": "toolCall · 工具调用",
                    "description": "初始化工具卡片；分别展示普通调用和 hideDetails 隐藏详情的调用。",
                    "value": ": 1. 普通工具调用\nevent: toolCall\ndata: {\"tool\":{\"id\":\"call-search-1\",\"toolName\":\"知识库搜索\",\"toolAvatar\":\"/imgs/workflow/db.png\",\"functionName\":\"dataset_search\",\"params\":\"{\\\"query\\\":\\\"铃芽之旅导演\\\"}\"},\"responseValueId\":\"call-search-1\"}\n\n: 2. 隐藏工具参数和响应详情\nevent: toolCall\ndata: {\"tool\":{\"id\":\"call-search-1\",\"toolName\":\"知识库搜索\",\"toolAvatar\":\"/imgs/workflow/db.png\",\"functionName\":\"dataset_search\",\"params\":\"\",\"hideDetails\":true},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_toolParams": {
                    "summary": "toolParams · 工具参数增量",
                    "description": "按 tool.id 追加或合并工具参数，不代表工具已执行完成。",
                    "value": "event: toolParams\ndata: {\"tool\":{\"id\":\"call-search-1\",\"params\":\"{\\\"query\\\":\\\"铃芽之旅导演\\\"}\"},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_toolResponse": {
                    "summary": "toolResponse · 工具响应",
                    "description": "按 tool.id 关联工具执行结果；response 支持字符串或 null。",
                    "value": ": 1. 字符串响应\nevent: toolResponse\ndata: {\"tool\":{\"id\":\"call-search-1\",\"response\":\"导演：新海诚\"},\"responseValueId\":\"call-search-1\"}\n\n: 2. 空响应\nevent: toolResponse\ndata: {\"tool\":{\"id\":\"call-search-1\",\"response\":null},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_updateVariables": {
                    "summary": "updateVariables · 变量更新",
                    "description": "更新本轮工作流变量；变量值可以是字符串、数字、布尔值、数组、对象或 null。",
                    "value": "event: updateVariables\ndata: {\"lastQuestion\":\"导演是谁\",\"searchCount\":1,\"found\":true,\"movieNames\":[\"铃芽之旅\"],\"director\":{\"name\":\"新海诚\"},\"nextPage\":null}\n\n"
                  },
                  "event_workflowDuration": {
                    "summary": "workflowDuration · 执行耗时",
                    "description": "本轮工作流总耗时，durationSeconds 的单位为秒。",
                    "value": "event: workflowDuration\ndata: {\"durationSeconds\":2.41}\n\n"
                  },
                  "event_chatTitle": {
                    "summary": "chatTitle · 会话标题",
                    "description": "仅 detail=true、未命名会话标题生成成功时发送；不会覆盖手动标题。",
                    "value": "event: chatTitle\ndata: {\"title\":\"铃芽之旅导演\"}\n\n"
                  },
                  "event_interactive": {
                    "summary": "interactive · 交互配置",
                    "description": "分别展示用户选择、表单、Agent 追问、欠费暂停及子流程包装。包装类型通过 params.childrenResponse 取内层交互；示例省略工作流运行态字段，各分支不会在同一轮依次出现。",
                    "value": ": 1. 用户选择：userSelect\nevent: interactive\ndata: {\"interactive\":{\"type\":\"userSelect\",\"params\":{\"description\":\"测试\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}\n\n: 2. 表单输入：userInput\nevent: interactive\ndata: {\"interactive\":{\"type\":\"userInput\",\"params\":{\"description\":\"测试\",\"inputForm\":[{\"type\":\"input\",\"key\":\"测试 1\",\"label\":\"测试 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"测试 2\",\"label\":\"测试 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}}}\n\n: 3. Agent 追问：agentAsk\nevent: interactive\ndata: {\"interactive\":{\"type\":\"agentAsk\",\"params\":{\"toolCallId\":\"ask-1\",\"arguments\":\"{\\\"reason\\\":\\\"需要确认查询范围后继续。\\\",\\\"blockerType\\\":\\\"user_choice\\\",\\\"questions\\\":[{\\\"question\\\":\\\"要查询哪个范围？\\\",\\\"options\\\":[{\\\"summary\\\":\\\"只查询当前电影\\\",\\\"value\\\":\\\"current_movie\\\"},{\\\"summary\\\":\\\"查询导演的全部作品\\\",\\\"value\\\":\\\"all_movies\\\"}]}]}\"}}}\n\n: 4. 欠费暂停：paymentPause\nevent: interactive\ndata: {\"interactive\":{\"type\":\"paymentPause\",\"params\":{\"description\":\"积分不足，请充值后继续。\"}}}\n\n: 5. 子工作流包装：childrenInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"childrenInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userSelect\",\"params\":{\"description\":\"测试\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}}}\n\n: 6. 工具子流程包装：toolChildrenInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"toolChildrenInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userInput\",\"params\":{\"description\":\"测试\",\"inputForm\":[{\"type\":\"input\",\"key\":\"测试 1\",\"label\":\"测试 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"测试 2\",\"label\":\"测试 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}},\"toolCallId\":\"call-search-1\"}}}\n\n: 7. 循环子流程包装：loopInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"loopInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userSelect\",\"params\":{\"description\":\"测试\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}},\"currentIndex\":0,\"loopResult\":[]}}}\n\n: 8. 循环运行包装：loopRunInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"loopRunInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userInput\",\"params\":{\"description\":\"测试\",\"inputForm\":[{\"type\":\"input\",\"key\":\"测试 1\",\"label\":\"测试 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"测试 2\",\"label\":\"测试 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}},\"iteration\":1,\"loopHistory\":[]}}}\n\n"
                  },
                  "event_planStatus": {
                    "summary": "planStatus · 计划生成状态",
                    "description": "仅相关能力启用时发送；分别展示 generating 生成中和 updating 更新中。",
                    "value": ": 1. 生成计划\nevent: planStatus\ndata: {\"planStatus\":{\"status\":\"generating\"}}\n\n: 2. 更新计划\nevent: planStatus\ndata: {\"planStatus\":{\"status\":\"updating\"}}\n\n"
                  },
                  "event_plan": {
                    "summary": "plan · Agent 计划",
                    "description": "使用 plan.planId 标识计划，steps[].id 标识步骤，步骤状态随运行更新。",
                    "value": "event: plan\ndata: {\"plan\":{\"planId\":\"plan-1\",\"name\":\"查询导演信息\",\"steps\":[{\"id\":\"step-1\",\"name\":\"确认电影名称\",\"status\":\"done\"},{\"id\":\"step-2\",\"name\":\"检索电影资料\",\"status\":\"in_progress\"},{\"id\":\"step-3\",\"name\":\"整理导演信息\",\"status\":\"pending\"},{\"id\":\"step-4\",\"name\":\"核对付费资料\",\"status\":\"blocked\",\"note\":\"等待用户授权\"},{\"id\":\"step-5\",\"name\":\"补充无关作品\",\"status\":\"skipped\",\"note\":\"不在本次范围内\"}]}}\n\n"
                  },
                  "event_skillCall": {
                    "summary": "skillCall · 技能调用",
                    "description": "加载技能说明时发送技能展示信息，仅相关能力启用时出现。",
                    "value": "event: skillCall\ndata: {\"skill\":{\"id\":\"skill-call-1\",\"skillName\":\"资料检索\",\"skillAvatar\":\"/icon/logo.svg\",\"description\":\"查询相关资料\",\"skillMdPath\":\"/skills/search/SKILL.md\"}}\n\n"
                  },
                  "event_sandboxStatus": {
                    "summary": "sandboxStatus · 沙箱状态",
                    "description": "展示各个可见 phase；ready 表示可执行工具，failed 可携带 message，技能部署阶段可携带 skillName。这些是可选分支，并非固定执行顺序。",
                    "value": ": 1. 阶段：checkExisting\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"checkExisting\"}\n\n: 2. 阶段：connecting\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"connecting\",\"isWarmStart\":true}\n\n: 3. 阶段：fetchSkills\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"fetchSkills\"}\n\n: 4. 阶段：creatingContainer\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"creatingContainer\"}\n\n: 5. 阶段：deployingSkills\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"deployingSkills\",\"skillName\":\"资料检索\"}\n\n: 6. 阶段：downloadingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"downloadingPackage\",\"skillName\":\"资料检索\"}\n\n: 7. 阶段：uploadingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"uploadingPackage\",\"skillName\":\"资料检索\"}\n\n: 8. 阶段：extractingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"extractingPackage\",\"skillName\":\"资料检索\"}\n\n: 9. 阶段：lazyInit\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"lazyInit\"}\n\n: 10. 阶段：upgrading\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"upgrading\"}\n\n: 11. 阶段：ready\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"ready\",\"isWarmStart\":true}\n\n: 12. 阶段：failed\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"failed\",\"message\":\"沙箱初始化失败，请稍后重试。\"}\n\n"
                  },
                  "event_error": {
                    "summary": "error · 流式错误",
                    "description": "流已建立后的错误，包括仅 message 的通用错误，以及含 code / statusText / data 的业务错误；不能仅凭 HTTP 200 判断成功。",
                    "value": ": 1. 通用错误\nevent: error\ndata: {\"message\":\"模型请求失败，请稍后重试\"}\n\n: 2. 业务错误\nevent: error\ndata: {\"code\":510003,\"statusText\":\"runtimeUpgradeInProgress\",\"message\":\"沙箱正在升级，请稍后重试\",\"data\":null,\"httpStatus\":409}\n\n"
                  }
                }
              }
            }
          },
          "409": {
            "description": "同会话已有生成时拒绝本次发送，本次消息不会写入数据库。非流式请求返回 HTTP 409；流式请求通过 error 事件返回同一错误结构。data.responseChatItemId 是应恢复的已有 AI 消息 ID；交互续跑返回 data.reusePreviousAi=true，表示刷新记录后复用最新 AI。客户端应先回填被拒绝的输入，再恢复原有轮次。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "number",
                      "const": 504001
                    },
                    "statusText": {
                      "type": "string",
                      "const": "chatIsGenerating"
                    },
                    "message": {
                      "description": "错误展示文案，已知词条按请求语言翻译；业务判断应使用 code 或 statusText。缺省语言为英文，翻译不可用时保留原文或词条 key。",
                      "example": "common:code_error.chat_error.chat_generating",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "responseChatItemId": {
                          "description": "当前服务端生成轮次的 AI 消息 ID；被拒绝的新发送未创建消息，客户端应恢复此 ID",
                          "example": "active-ai-response-id",
                          "type": "string",
                          "minLength": 1
                        },
                        "reusePreviousAi": {
                          "description": "当前执行是复用最新 AI 消息的交互续跑；恢复前刷新记录，允许复用该 AI",
                          "example": true,
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v2/chat/stop": {
      "post": {
        "summary": "停止会话",
        "description": "为正在运行的会话写入停止标记并立即返回。客户端收到成功响应后应中断当前流式请求。\n  工作流会在后续安全检查点停止调度；HTTP 请求等无法主动中断的当前节点仍需等待其自行结束。",
        "tags": [
          "会话操作"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "example": {
                  "chatId": "1234567890",
                  "outLinkAuthData": {
                    "shareId": "1234567890",
                    "outLinkUid": "1234567890"
                  }
                },
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId"
                            ]
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key 代理调用身份。仅开启 authProxy 的个人密钥可用；按团队成员 ID 或用户名指定，二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill 调试会话",
                    "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId"
                    ]
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权数据，包含 shareId/outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId"
                    ]
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "会话ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          }
                        },
                        "required": [
                          "chatId"
                        ]
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "会话ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          }
                        },
                        "required": [
                          "chatId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "1234567890"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功写入工作流停止标记",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "example": {
                        "success": true,
                        "completed": false,
                        "chatGenerateStatus": 0
                      },
                      "type": "object",
                      "properties": {
                        "success": {
                          "description": "是否成功写入停止信号",
                          "example": true,
                          "type": "boolean"
                        },
                        "completed": {
                          "description": "是否已确认工作流完成停止；接口不等待后台收尾，因此当前固定为 false",
                          "example": false,
                          "deprecated": true,
                          "type": "boolean"
                        },
                        "chatGenerateStatus": {
                          "description": "兼容旧客户端的保守生成状态；不表示后台工作流仍会继续调度新节点",
                          "example": 0,
                          "deprecated": true,
                          "type": "number",
                          "enum": [
                            0,
                            1
                          ]
                        }
                      },
                      "required": [
                        "success",
                        "completed"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "tags": [
          "会话操作"
        ],
        "deprecated": true,
        "summary": "发起会话 v1",
        "description": "v1 对话接口兼容 GPT 的接口。如果你的项目使用的是标准的 GPT 官方接口，可以直接通过修改 BaseUrl 和 Authorization 来访问 FastGPT 应用。\n\n**注意事项**\n\n- 接入方后端可传入 `customUid` 标记自己的使用者，值会传递给工作流的 `userId`；它不改变 API Key 的鉴权成员，且与 `authProxy` 互斥。最长 1024 字符，空字符串使用默认成员身份。（FastGPT 4.18.0 及以上版本支持）\n- 传入的 `model`、`temperature` 等参数字段均无效，这些字段由编排决定，不会根据 API 参数改变。\n- 不会返回实际消耗 `Token` 值。如果需要，可以设置 `detail=true`，并手动计算 `responseData` 里的 `tokens` 值。\n\n**chatId 行为**\n\n- 不传入（或为空）：不使用 FastGPT 提供的上下文功能，完全通过传入的 `messages` 构建上下文。\n- 非空字符串：使用 chatId 进行对话，自动从 FastGPT 数据库取会话中的对话，并使用 `messages` 数组最后一个内容作为用户问题，其余 message 会被忽略。请自行确保 chatId 唯一，长度最多 1024 字符。\n\n**stream / detail 组合**\n\n- `detail=false, stream=false`：返回精简 JSON（仅 `choices/usage/id` 等）。\n- `detail=false, stream=true`：返回兼容 GPT 的 SSE 流，只包含答案 chunk 和结束标记。\n- `detail=true, stream=false`：在 JSON 中额外包含 `responseData`（各节点详细信息）和 `newVariables`。\n- `detail=true, stream=true`：返回多 event 的 SSE 流（`answer` / `flowNodeStatus` / `flowResponses` 等）。\n\n**交互节点**\n\n如果工作流中包含交互节点，需要设置 `detail=true`：\n\n- `stream=true`：可从 `event=interactive` 数据中获取交互节点的配置。\n- `stream=false`：可从 `choices[].message.content` 中获取包含 `interactive` 字段的元素。\n\n非流式响应中的 `interactive` 只包含 `type` 和 `params`，会向下提取 children / loop / tool 包装中最深层的交互，并过滤 `entryNodeIds` / `memoryEdges` / `nodeOutputs` 等内部运行态字段。SSE 可能保留子流程包装，可沿 `params.childrenResponse` 读取内层交互；event 示例省略内部运行态字段，并分别展示不同载荷分支。\n\n接收到交互节点信息后，可以根据数据进行 UI 渲染并引导用户输入/选择，然后再次调用本接口继续工作流：\n\n- 用户选择：直接将选择结果作为 user message 的 content 传入。\n- 表单输入：将输入内容以对象形式序列化为字符串，作为 user message 的 content 传入；务必确保 `chatId` 一致。\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位应用，使用 API Key 或登录态鉴权。API Key 调用可省略 body.appId，由请求头的 apiKey-appId 后缀或旧 API Key 绑定应用补足；登录态调用必须传 appId。应用 Key 不支持代理团队成员。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID。APP API Key 忽略该字段及 SDK 后缀，以 Key 绑定应用为准；个人密钥按 body.appId > Authorization 的 key-appId 后缀解析。后缀不写入数据库",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "元数据",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "消息列表",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "问答输入类型",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "按题目顺序保存的用户回答",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "提问时的问题快照",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "确认方案并开始搭建",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "取消本次搭建",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案的具体意见，不能为空",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "工具调用",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "工具参数",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "工具名称",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "交互式响应（FastGPT 自定义扩展）"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "函数调用",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "工具参数",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "工具名称",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "是否流式返回",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "全局变量或插件输入",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                                "type": "string"
                              },
                              "detail": {
                                "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "是否保留数据集引用",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "是否显示技能引用",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": []
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "API Key 调用时由接入方后端提供的使用者 ID，FastGPT 4.18.0 及以上支持，最长 1024 字符；不改变鉴权成员，与 authProxy 互斥。新会话空字符串沿用默认使用者；已有会话必须与首次使用者一致，已绑定 customUid 后漏传、传空或更换均拒绝；分享链接使用 outLinkAuthData.outLinkUid，不使用此字段",
                                    "type": "string",
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "元数据",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "消息列表",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "问答输入类型",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "按题目顺序保存的用户回答",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "提问时的问题快照",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "确认方案并开始搭建",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "取消本次搭建",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案的具体意见，不能为空",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "工具调用",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "工具参数",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "工具名称",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "交互式响应（FastGPT 自定义扩展）"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "函数调用",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "工具参数",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "工具名称",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "是否流式返回",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "全局变量或插件输入",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                                "type": "string"
                              },
                              "detail": {
                                "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "是否保留数据集引用",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "是否显示技能引用",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "customUid"
                            ]
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "description": "API Key 代理调用身份，与 customUid 互斥，外链会话不支持。按团队成员 ID 或用户名指定；二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "type": "object",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "metadata": {
                                "description": "元数据",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "messages": {
                                "description": "消息列表",
                                "default": [],
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "system"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "developer"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "const": "text"
                                                      },
                                                      "text": {
                                                        "type": "string"
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "user"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "select"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "select": {
                                                            "allOf": [
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "问答输入类型",
                                                                            "type": "string",
                                                                            "const": "agentAsk"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "questions": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "按题目顺序保存的用户回答",
                                                                            "minItems": 1,
                                                                            "type": "array",
                                                                            "items": {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "question": {
                                                                                  "description": "提问时的问题快照",
                                                                                  "type": "string"
                                                                                },
                                                                                "value": {
                                                                                  "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "question",
                                                                                "value"
                                                                              ]
                                                                            }
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "questions"
                                                                    ],
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "确认方案并开始搭建",
                                                                                "type": "string",
                                                                                "const": "confirm"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "取消本次搭建",
                                                                                "type": "string",
                                                                                "const": "cancel"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "const": "workflowBuilderPreview"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "only"
                                                                            }
                                                                          },
                                                                          "action": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案",
                                                                                "type": "string",
                                                                                "const": "revise"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "reviseText": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "修改方案的具体意见，不能为空",
                                                                                "type": "string",
                                                                                "minLength": 1
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "action",
                                                                          "reviseText"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "select"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "input_audio"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "input_audio": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "mp3",
                                                                      "wav",
                                                                      "ogg",
                                                                      "m4a",
                                                                      "amr",
                                                                      "mpga"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "input_audio"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "video_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "video_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "video_url"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "file": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                }
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "file"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "file_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "name": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "url": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "fileType": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "audio",
                                                                  "video",
                                                                  "document",
                                                                  "unknown",
                                                                  "file"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "assistant"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "description": "Assistant message content",
                                              "example": "Hello, how are you?",
                                              "anyOf": [
                                                {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "key": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "refusal"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "refusal": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "refusal"
                                                            ],
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_calls": {
                                          "allOf": [
                                            {
                                              "description": "工具调用",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "type": "string",
                                                    "const": "function"
                                                  },
                                                  "function": {
                                                    "type": "object",
                                                    "properties": {
                                                      "arguments": {
                                                        "description": "工具参数",
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "description": "工具名称",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "arguments",
                                                      "name"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "type",
                                                  "function"
                                                ]
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "interactive": {
                                          "allOf": [
                                            {
                                              "type": "object",
                                              "additionalProperties": true,
                                              "description": "交互式响应（FastGPT 自定义扩展）"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "audio": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "function_call": {
                                          "allOf": [
                                            {
                                              "description": "函数调用",
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "description": "工具参数",
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "description": "工具名称",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ]
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "refusal": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "tool"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "image_url"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "image_url": {
                                                            "allOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ]
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          },
                                                          "key": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "image_url"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "tool_call_id": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "tool_call_id"
                                      ],
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "allOf": [
                                            {
                                              "type": "string",
                                              "const": "function"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "content": {
                                          "allOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "middle"
                                          }
                                        },
                                        "name": {
                                          "allOf": [
                                            {
                                              "type": "string"
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "reasoning_content": {
                                          "type": "string"
                                        },
                                        "dataId": {
                                          "type": "string"
                                        },
                                        "hideInUI": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content",
                                        "name"
                                      ],
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "stream": {
                                "description": "是否流式返回",
                                "default": false,
                                "type": "boolean"
                              },
                              "variables": {
                                "description": "全局变量或插件输入",
                                "default": {},
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "responseChatItemId": {
                                "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                                "type": "string"
                              },
                              "detail": {
                                "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                                "default": false,
                                "type": "boolean"
                              },
                              "retainDatasetCite": {
                                "description": "是否保留数据集引用",
                                "default": false,
                                "type": "boolean"
                              },
                              "showSkillReferences": {
                                "description": "是否显示技能引用",
                                "default": false,
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "APP API Key（无需 appId）",
                    "description": "使用绑定应用的 APP API Key 时不需要 appId，直接使用 Key 的绑定；身份支持默认身份或 customUid，不支持 authProxy。兼容个人密钥的 OpenAI SDK key-appId 后缀，其代理身份规则同应用会话；普通个人密钥或登录态必须显式提供 appId。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "metadata": {
                            "description": "元数据",
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "messages": {
                            "description": "消息列表",
                            "default": [],
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "system"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "developer"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "user"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "select"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "select": {
                                                        "allOf": [
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "问答输入类型",
                                                                        "type": "string",
                                                                        "const": "agentAsk"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "questions": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "按题目顺序保存的用户回答",
                                                                        "minItems": 1,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "question": {
                                                                              "description": "提问时的问题快照",
                                                                              "type": "string"
                                                                            },
                                                                            "value": {
                                                                              "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "question",
                                                                            "value"
                                                                          ]
                                                                        }
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "questions"
                                                                ],
                                                                "description": ""
                                                              },
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "确认方案并开始搭建",
                                                                            "type": "string",
                                                                            "const": "confirm"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "取消本次搭建",
                                                                            "type": "string",
                                                                            "const": "cancel"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "修改方案",
                                                                            "type": "string",
                                                                            "const": "revise"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "reviseText": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "修改方案的具体意见，不能为空",
                                                                            "type": "string",
                                                                            "minLength": 1
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action",
                                                                      "reviseText"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "select"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "input_audio"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "input_audio": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "data": {
                                                                "type": "string"
                                                              },
                                                              "format": {
                                                                "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                                "type": "string",
                                                                "enum": [
                                                                  "mp3",
                                                                  "wav",
                                                                  "ogg",
                                                                  "m4a",
                                                                  "amr",
                                                                  "mpga"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "data"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "input_audio"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "video_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "video_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "video_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "file": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "file_data": {
                                                                "type": "string"
                                                              },
                                                              "file_id": {
                                                                "type": "string"
                                                              },
                                                              "filename": {
                                                                "type": "string"
                                                              }
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "file"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "name": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "url": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "fileType": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "audio",
                                                              "video",
                                                              "document",
                                                              "unknown",
                                                              "file"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "assistant"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "description": "Assistant message content",
                                          "example": "Hello, how are you?",
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "key": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "refusal"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "refusal": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_calls": {
                                      "allOf": [
                                        {
                                          "description": "工具调用",
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              },
                                              "type": {
                                                "type": "string",
                                                "const": "function"
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "arguments": {
                                                    "description": "工具参数",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "工具名称",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "arguments",
                                                  "name"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "type",
                                              "function"
                                            ]
                                          }
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "interactive": {
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": true,
                                          "description": "交互式响应（FastGPT 自定义扩展）"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "audio": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "function_call": {
                                      "allOf": [
                                        {
                                          "description": "函数调用",
                                          "deprecated": true,
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "arguments": {
                                                  "description": "工具参数",
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "description": "工具名称",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "arguments",
                                                "name"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "refusal": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "tool"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_call_id": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "tool_call_id"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "function"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "name": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "name"
                                  ],
                                  "description": ""
                                }
                              ],
                              "type": "object"
                            }
                          },
                          "stream": {
                            "description": "是否流式返回",
                            "default": false,
                            "type": "boolean"
                          },
                          "variables": {
                            "description": "全局变量或插件输入",
                            "default": {},
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "responseChatItemId": {
                            "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                            "type": "string"
                          },
                          "detail": {
                            "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                            "default": false,
                            "type": "boolean"
                          },
                          "retainDatasetCite": {
                            "description": "是否保留数据集引用",
                            "default": false,
                            "type": "boolean"
                          },
                          "showSkillReferences": {
                            "description": "是否显示技能引用",
                            "default": false,
                            "type": "boolean"
                          }
                        },
                        "required": []
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "API Key 调用时由接入方后端提供的使用者 ID，FastGPT 4.18.0 及以上支持，最长 1024 字符；不改变鉴权成员，与 authProxy 互斥。新会话空字符串沿用默认使用者；已有会话必须与首次使用者一致，已绑定 customUid 后漏传、传空或更换均拒绝；分享链接使用 outLinkAuthData.outLinkUid，不使用此字段",
                                "type": "string",
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "metadata": {
                            "description": "元数据",
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "messages": {
                            "description": "消息列表",
                            "default": [],
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "system"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "developer"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "text"
                                                  },
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "user"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "select"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "select": {
                                                        "allOf": [
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "问答输入类型",
                                                                        "type": "string",
                                                                        "const": "agentAsk"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "questions": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "按题目顺序保存的用户回答",
                                                                        "minItems": 1,
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "question": {
                                                                              "description": "提问时的问题快照",
                                                                              "type": "string"
                                                                            },
                                                                            "value": {
                                                                              "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "question",
                                                                            "value"
                                                                          ]
                                                                        }
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "questions"
                                                                ],
                                                                "description": ""
                                                              },
                                                              {
                                                                "oneOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "确认方案并开始搭建",
                                                                            "type": "string",
                                                                            "const": "confirm"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "取消本次搭建",
                                                                            "type": "string",
                                                                            "const": "cancel"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  },
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "type": {
                                                                        "allOf": [
                                                                          {
                                                                            "type": "string",
                                                                            "const": "workflowBuilderPreview"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "only"
                                                                        }
                                                                      },
                                                                      "action": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "修改方案",
                                                                            "type": "string",
                                                                            "const": "revise"
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "first"
                                                                        }
                                                                      },
                                                                      "reviseText": {
                                                                        "allOf": [
                                                                          {
                                                                            "description": "修改方案的具体意见，不能为空",
                                                                            "type": "string",
                                                                            "minLength": 1
                                                                          }
                                                                        ],
                                                                        "x-fastgpt-union-parameter": {
                                                                          "label": "",
                                                                          "position": "last"
                                                                        }
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "action",
                                                                      "reviseText"
                                                                    ],
                                                                    "additionalProperties": false,
                                                                    "description": ""
                                                                  }
                                                                ],
                                                                "type": "object"
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "select"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "input_audio"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "input_audio": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "data": {
                                                                "type": "string"
                                                              },
                                                              "format": {
                                                                "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                                "type": "string",
                                                                "enum": [
                                                                  "mp3",
                                                                  "wav",
                                                                  "ogg",
                                                                  "m4a",
                                                                  "amr",
                                                                  "mpga"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "data"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "input_audio"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "video_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "video_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "video_url"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "file": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "file_data": {
                                                                "type": "string"
                                                              },
                                                              "file_id": {
                                                                "type": "string"
                                                              },
                                                              "filename": {
                                                                "type": "string"
                                                              }
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "file"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "file_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "name": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "url": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "fileType": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "audio",
                                                              "video",
                                                              "document",
                                                              "unknown",
                                                              "file"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "assistant"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "description": "Assistant message content",
                                          "example": "Hello, how are you?",
                                          "anyOf": [
                                            {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "oneOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "text"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "text": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "middle"
                                                            }
                                                          },
                                                          "key": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "description": ""
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "allOf": [
                                                              {
                                                                "type": "string",
                                                                "const": "refusal"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "first"
                                                            }
                                                          },
                                                          "refusal": {
                                                            "allOf": [
                                                              {
                                                                "type": "string"
                                                              }
                                                            ],
                                                            "x-fastgpt-union-parameter": {
                                                              "label": "",
                                                              "position": "last"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "description": ""
                                                      }
                                                    ],
                                                    "type": "object"
                                                  }
                                                }
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_calls": {
                                      "allOf": [
                                        {
                                          "description": "工具调用",
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              },
                                              "type": {
                                                "type": "string",
                                                "const": "function"
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "arguments": {
                                                    "description": "工具参数",
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "description": "工具名称",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "arguments",
                                                  "name"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "type",
                                              "function"
                                            ]
                                          }
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "interactive": {
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": true,
                                          "description": "交互式响应（FastGPT 自定义扩展）"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "audio": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "function_call": {
                                      "allOf": [
                                        {
                                          "description": "函数调用",
                                          "deprecated": true,
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "arguments": {
                                                  "description": "工具参数",
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "description": "工具名称",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "arguments",
                                                "name"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "refusal": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "tool"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "image_url"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "image_url": {
                                                        "allOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "url": {
                                                                "type": "string"
                                                              },
                                                              "detail": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "auto",
                                                                  "low",
                                                                  "high"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "url"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "key": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "image_url"
                                                    ],
                                                    "description": ""
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "tool_call_id": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "tool_call_id"
                                  ],
                                  "description": ""
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "allOf": [
                                        {
                                          "type": "string",
                                          "const": "function"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "first"
                                      }
                                    },
                                    "content": {
                                      "allOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "middle"
                                      }
                                    },
                                    "name": {
                                      "allOf": [
                                        {
                                          "type": "string"
                                        }
                                      ],
                                      "x-fastgpt-union-parameter": {
                                        "label": "",
                                        "position": "last"
                                      }
                                    },
                                    "reasoning_content": {
                                      "type": "string"
                                    },
                                    "dataId": {
                                      "type": "string"
                                    },
                                    "hideInUI": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content",
                                    "name"
                                  ],
                                  "description": ""
                                }
                              ],
                              "type": "object"
                            }
                          },
                          "stream": {
                            "description": "是否流式返回",
                            "default": false,
                            "type": "boolean"
                          },
                          "variables": {
                            "description": "全局变量或插件输入",
                            "default": {},
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "responseChatItemId": {
                            "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                            "type": "string"
                          },
                          "detail": {
                            "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                            "default": false,
                            "type": "boolean"
                          },
                          "retainDatasetCite": {
                            "description": "是否保留数据集引用",
                            "default": false,
                            "type": "boolean"
                          },
                          "showSkillReferences": {
                            "description": "是否显示技能引用",
                            "default": false,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "customUid"
                        ]
                      }
                    ]
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，使用者由 outLinkUid 及外链鉴权结果决定；优先于 appId 和请求头身份，受保护外链仍需 token/Cookie 校验登录态。外链校验失败时不会回退到普通应用鉴权，且不支持 authProxy。",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权对象，包含 shareId 和 outLinkUid。优先于 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话 ID；未传入或传入空字符串时自动生成新会话 ID",
                        "type": "string",
                        "maxLength": 1024
                      },
                      "metadata": {
                        "description": "元数据",
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "messages": {
                        "description": "消息列表",
                        "default": [],
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "system"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "text"
                                              },
                                              "text": {
                                                "type": "string"
                                              },
                                              "key": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "text"
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "developer"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "text"
                                              },
                                              "text": {
                                                "type": "string"
                                              },
                                              "key": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "text"
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "user"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "select"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "select": {
                                                    "allOf": [
                                                      {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "description": "问答输入类型",
                                                                    "type": "string",
                                                                    "const": "agentAsk"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "questions": {
                                                                "allOf": [
                                                                  {
                                                                    "description": "按题目顺序保存的用户回答",
                                                                    "minItems": 1,
                                                                    "type": "array",
                                                                    "items": {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "question": {
                                                                          "description": "提问时的问题快照",
                                                                          "type": "string"
                                                                        },
                                                                        "value": {
                                                                          "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "question",
                                                                        "value"
                                                                      ]
                                                                    }
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "questions"
                                                            ],
                                                            "description": ""
                                                          },
                                                          {
                                                            "oneOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "确认方案并开始搭建",
                                                                        "type": "string",
                                                                        "const": "confirm"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "取消本次搭建",
                                                                        "type": "string",
                                                                        "const": "cancel"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "allOf": [
                                                                      {
                                                                        "type": "string",
                                                                        "const": "workflowBuilderPreview"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "only"
                                                                    }
                                                                  },
                                                                  "action": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "修改方案",
                                                                        "type": "string",
                                                                        "const": "revise"
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "first"
                                                                    }
                                                                  },
                                                                  "reviseText": {
                                                                    "allOf": [
                                                                      {
                                                                        "description": "修改方案的具体意见，不能为空",
                                                                        "type": "string",
                                                                        "minLength": 1
                                                                      }
                                                                    ],
                                                                    "x-fastgpt-union-parameter": {
                                                                      "label": "",
                                                                      "position": "last"
                                                                    }
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "action",
                                                                  "reviseText"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": ""
                                                              }
                                                            ],
                                                            "type": "object"
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "select"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "text"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "text": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "image_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "image_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          },
                                                          "detail": {
                                                            "type": "string",
                                                            "enum": [
                                                              "auto",
                                                              "low",
                                                              "high"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "image_url"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "input_audio"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "input_audio": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "data": {
                                                            "type": "string"
                                                          },
                                                          "format": {
                                                            "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                            "type": "string",
                                                            "enum": [
                                                              "mp3",
                                                              "wav",
                                                              "ogg",
                                                              "m4a",
                                                              "amr",
                                                              "mpga"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "data"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "input_audio"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "video_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "video_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "video_url"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "file"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "file": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "file_data": {
                                                            "type": "string"
                                                          },
                                                          "file_id": {
                                                            "type": "string"
                                                          },
                                                          "filename": {
                                                            "type": "string"
                                                          }
                                                        }
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "file"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "file_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "name": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "middle"
                                                    }
                                                  },
                                                  "url": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "middle"
                                                    }
                                                  },
                                                  "fileType": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "audio",
                                                          "video",
                                                          "document",
                                                          "unknown",
                                                          "file"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "url"
                                                ],
                                                "description": ""
                                              }
                                            ],
                                            "type": "object"
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "assistant"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "description": "Assistant message content",
                                      "example": "Hello, how are you?",
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "array",
                                              "items": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "text"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "text": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "key": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "text"
                                                    ],
                                                    "description": ""
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "allOf": [
                                                          {
                                                            "type": "string",
                                                            "const": "refusal"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "refusal": {
                                                        "allOf": [
                                                          {
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "refusal"
                                                    ],
                                                    "description": ""
                                                  }
                                                ],
                                                "type": "object"
                                              }
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "tool_calls": {
                                  "allOf": [
                                    {
                                      "description": "工具调用",
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "type": {
                                            "type": "string",
                                            "const": "function"
                                          },
                                          "function": {
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "description": "工具参数",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "工具名称",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "type",
                                          "function"
                                        ]
                                      }
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "interactive": {
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": true,
                                      "description": "交互式响应（FastGPT 自定义扩展）"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "audio": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "function_call": {
                                  "allOf": [
                                    {
                                      "description": "函数调用",
                                      "deprecated": true,
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "description": "工具参数",
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "工具名称",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "refusal": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "tool"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "text"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "text": {
                                                    "allOf": [
                                                      {
                                                        "type": "string"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "text"
                                                ],
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "image_url"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "image_url": {
                                                    "allOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "url": {
                                                            "type": "string"
                                                          },
                                                          "detail": {
                                                            "type": "string",
                                                            "enum": [
                                                              "auto",
                                                              "low",
                                                              "high"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "url"
                                                        ]
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  },
                                                  "key": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "image_url"
                                                ],
                                                "description": ""
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "tool_call_id": {
                                  "allOf": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "name": {
                                  "type": "string"
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content",
                                "tool_call_id"
                              ],
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "allOf": [
                                    {
                                      "type": "string",
                                      "const": "function"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "content": {
                                  "allOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "name": {
                                  "allOf": [
                                    {
                                      "type": "string"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                },
                                "reasoning_content": {
                                  "type": "string"
                                },
                                "dataId": {
                                  "type": "string"
                                },
                                "hideInUI": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "role",
                                "content",
                                "name"
                              ],
                              "description": ""
                            }
                          ],
                          "type": "object"
                        }
                      },
                      "stream": {
                        "description": "是否流式返回",
                        "default": false,
                        "type": "boolean"
                      },
                      "variables": {
                        "description": "全局变量或插件输入",
                        "default": {},
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "responseChatItemId": {
                        "description": "自定义响应的 assistant 的消息 ID，如果不传入，则自动生成一个",
                        "type": "string"
                      },
                      "detail": {
                        "description": "是否返回详细信息，包括 reasoning_content, tool_calls, usage 等",
                        "default": false,
                        "type": "boolean"
                      },
                      "retainDatasetCite": {
                        "description": "是否保留数据集引用",
                        "default": false,
                        "type": "boolean"
                      },
                      "showSkillReferences": {
                        "description": "是否显示技能引用",
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "outLinkAuthData"
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "对话 ID（chatId）",
                      "type": "string"
                    },
                    "title": {
                      "description": "未命名会话标题生成成功时返回的对话标题",
                      "type": "string"
                    },
                    "model": {
                      "description": "模型名称，v1 接口固定为空字符串",
                      "type": "string",
                      "const": ""
                    },
                    "usage": {
                      "description": "Token 用量。v1 接口为占位值，需要时请从 responseData 计算",
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "description": "固定为 1，需要从 detail 中计算每一个节点的token数",
                          "type": "number",
                          "const": 1
                        },
                        "completion_tokens": {
                          "description": "固定为 1，需要从 detail 中计算每一个节点的token数",
                          "type": "number",
                          "const": 1
                        },
                        "total_tokens": {
                          "description": "固定为 1，需要从 detail 中计算每一个节点的token数",
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "completion_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    },
                    "choices": {
                      "description": "回复选项列表",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "description": "助手消息",
                            "type": "object",
                            "properties": {
                              "role": {
                                "description": "消息角色",
                                "type": "string",
                                "const": "assistant"
                              },
                              "content": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "additionalProperties": true
                                    }
                                  }
                                ],
                                "description": "消息内容。普通对话为字符串；detail=true 或工作流命中交互节点时，可能为按字段名区分的对象数组（如 text / interactive / tool / file / reasoning）。v1 会额外补充 type 字段，取值为 text / interactive / tool / file / reasoning；v2 不补充 type。当元素包含 interactive 字段时，只返回交互展示配置，不返回 entryNodeIds / memoryEdges / nodeOutputs 等内部运行态字段"
                              },
                              "reasoning_content": {
                                "description": "思考过程内容（仅推理模型有）",
                                "type": "string"
                              }
                            },
                            "required": [
                              "role",
                              "content"
                            ],
                            "additionalProperties": false
                          },
                          "finish_reason": {
                            "description": "完成原因，例如 stop",
                            "type": "string"
                          },
                          "index": {
                            "description": "选项索引",
                            "type": "number"
                          }
                        },
                        "required": [
                          "message",
                          "finish_reason",
                          "index"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "responseData": {
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      },
                      "description": "各节点详细响应数据（仅 detail=true 时返回）。每项是一个节点的执行结果，常见字段如 moduleName / moduleType / runningTime / quoteList 等",
                      "type": "array"
                    },
                    "newVariables": {
                      "description": "工作流执行后更新的变量（仅 detail=true 时返回）",
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "id",
                    "model",
                    "usage",
                    "choices"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "detailFalseStreamFalse": {
                    "summary": "精简 JSON",
                    "description": "detail=false, stream=false；仅包含基础回复字段。",
                    "value": {
                      "id": "adsfasf",
                      "title": "铃芽之旅导演",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": "电影《铃芽之旅》的导演是新海诚。"
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "detailTrueStreamFalse": {
                    "summary": "详细 JSON",
                    "description": "detail=true, stream=false；包含 responseData 和 newVariables。",
                    "value": {
                      "responseData": [
                        {
                          "moduleName": "Dataset Search",
                          "price": 1.2000000000000002,
                          "model": "Embedding-2",
                          "tokens": 6,
                          "similarity": 0.61,
                          "limit": 3
                        },
                        {
                          "moduleName": "AI Chat",
                          "price": 454.5,
                          "model": "FastAI-4k",
                          "tokens": 303,
                          "question": "导演是谁",
                          "answer": "电影《铃芽之旅》的导演是新海诚。",
                          "maxToken": 2050,
                          "quoteList": [
                            {
                              "dataset_id": "646627f4f7b896cfd8910e38",
                              "id": "8099",
                              "q": "本作的主人公是谁？",
                              "a": "本作的主人公是名叫铃芽的少女。",
                              "source": "手动修改"
                            },
                            {
                              "dataset_id": "646627f4f7b896cfd8910e38",
                              "id": "19339",
                              "q": "电影《铃芽之旅》的导演是谁？",
                              "a": "电影《铃芽之旅》的导演是新海诚。",
                              "source": "手动修改"
                            }
                          ],
                          "completeMessages": [
                            {
                              "obj": "System",
                              "value": "下面是知识库内容:\n1. [本作的主人公是谁？\n本作的主人公是名叫铃芽的少女。]\n2. [电影《铃芽之旅》的导演是谁？\n电影《铃芽之旅》的导演是新海诚。]\n"
                            },
                            {
                              "obj": "Human",
                              "value": "导演是谁"
                            },
                            {
                              "obj": "AI",
                              "value": "电影《铃芽之旅》的导演是新海诚。"
                            }
                          ]
                        }
                      ],
                      "newVariables": {
                        "uid": "asdfadsfasfd2323",
                        "name": "张三"
                      },
                      "id": "",
                      "title": "铃芽之旅导演",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": "电影《铃芽之旅》的导演是新海诚。"
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "interactiveUserSelect": {
                    "summary": "用户选择",
                    "description": "detail=true；从 choices[].message.content 获取 interactive 展示配置。",
                    "value": {
                      "id": "chatId",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": [
                              {
                                "type": "interactive",
                                "interactive": {
                                  "type": "userSelect",
                                  "params": {
                                    "description": "测试",
                                    "userSelectOptions": [
                                      {
                                        "value": "Confirm",
                                        "key": "option1"
                                      },
                                      {
                                        "value": "Cancel",
                                        "key": "option2"
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  },
                  "interactiveUserInput": {
                    "summary": "表单输入",
                    "description": "detail=true；按表单字段名提交序列化 JSON，并保持 chatId。",
                    "value": {
                      "id": "chatId",
                      "model": "",
                      "usage": {
                        "prompt_tokens": 1,
                        "completion_tokens": 1,
                        "total_tokens": 1
                      },
                      "choices": [
                        {
                          "message": {
                            "role": "assistant",
                            "content": [
                              {
                                "type": "interactive",
                                "interactive": {
                                  "type": "userInput",
                                  "params": {
                                    "description": "测试",
                                    "inputForm": [
                                      {
                                        "type": "input",
                                        "key": "测试 1",
                                        "label": "测试 1",
                                        "description": "",
                                        "value": "",
                                        "defaultValue": "",
                                        "valueType": "string",
                                        "required": false,
                                        "list": [
                                          {
                                            "label": "",
                                            "value": ""
                                          }
                                        ]
                                      },
                                      {
                                        "type": "numberInput",
                                        "key": "测试 2",
                                        "label": "测试 2",
                                        "description": "",
                                        "value": "",
                                        "defaultValue": "",
                                        "valueType": "number",
                                        "required": false,
                                        "list": [
                                          {
                                            "label": "",
                                            "value": ""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "finish_reason": "stop",
                          "index": 0
                        }
                      ]
                    }
                  }
                }
              },
              "text/event-stream": {
                "schema": {
                  "example": "event: answer\ndata: {\"choices\":[...]}\n\n",
                  "description": "工作流 SSE 事件流；v1 在 detail=true 时通过 flowResponses 汇总节点响应，最后以 [DONE] 结束",
                  "type": "string"
                },
                "examples": {
                  "detailFalseStreamTrue": {
                    "summary": "精简 SSE",
                    "description": "detail=false, stream=true；普通成功回答仅包含 data 帧，最后为 [DONE]。",
                    "value": "data: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"电影\"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"《铃芽之旅》的导演是新海诚。\"},\"index\":0,\"finish_reason\":null}]}\n\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
                  },
                  "detailTrueStreamTrue": {
                    "summary": "完整过程",
                    "description": "detail=true, stream=true；节点详情汇总为 flowResponses。示意顺序不代表固定时序，标题可能提前产生。",
                    "value": "event: flowNodeStatus\ndata: {\"status\":\"running\",\"name\":\"知识库搜索\"}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"电影\"},\"index\":0,\"finish_reason\":null}]}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"《铃芽之旅》的导演是新海诚。\"},\"index\":0,\"finish_reason\":null}]}\n\nevent: updateVariables\ndata: {\"lastQuestion\":\"导演是谁\",\"searchCount\":1,\"found\":true,\"movieNames\":[\"铃芽之旅\"],\"director\":{\"name\":\"新海诚\"},\"nextPage\":null}\n\nevent: workflowDuration\ndata: {\"durationSeconds\":2.41}\n\nevent: chatTitle\ndata: {\"title\":\"铃芽之旅导演\"}\n\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\nevent: flowResponses\ndata: [{\"id\":\"response-ai-1\",\"nodeId\":\"ai-1\",\"moduleType\":\"chatNode\",\"moduleName\":\"AI 对话\",\"runningTime\":1.86,\"textOutput\":\"电影《铃芽之旅》的导演是新海诚。\"}]\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "interactiveUserSelect": {
                    "summary": "用户选择",
                    "description": "detail=true；收到 interactive 后展示选项，提交选择值继续执行。",
                    "value": "event: interactive\ndata: {\"interactive\":{\"type\":\"userSelect\",\"params\":{\"description\":\"测试\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "interactiveUserInput": {
                    "summary": "表单输入",
                    "description": "detail=true；收到 interactive 后展示表单，提交表单 JSON 字符串继续执行。",
                    "value": "event: interactive\ndata: {\"interactive\":{\"type\":\"userInput\",\"params\":{\"description\":\"测试\",\"inputForm\":[{\"type\":\"input\",\"key\":\"测试 1\",\"label\":\"测试 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"测试 2\",\"label\":\"测试 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}}}\n\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "event_answer": {
                    "summary": "answer · 回答增量",
                    "description": "包括空文本心跳、回答文本、reasoning_content 思考增量、stop 片段和 [DONE] 结束标记；下方分别展示。",
                    "value": ": 1. 空文本心跳\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"index\":0,\"finish_reason\":null}]}\n\n: 2. 回答文本\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"电影《铃芽之旅》的导演是新海诚。\"},\"index\":0,\"finish_reason\":null}]}\n\n: 3. 思考增量\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"reasoning_content\":\"先核对电影的导演信息。\"},\"index\":0,\"finish_reason\":null}]}\n\n: 4. 回答停止片段\nevent: answer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\n: 5. 整轮流结束\nevent: answer\ndata: [DONE]\n\n"
                  },
                  "event_fastAnswer": {
                    "summary": "fastAnswer · 指定回复",
                    "description": "用于指定回复等即时输出；分别展示文本增量和停止片段。",
                    "value": ": 1. 指定回复文本\nevent: fastAnswer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":\"正在查询相关资料。\"},\"index\":0,\"finish_reason\":null}]}\n\n: 2. 指定回复停止片段\nevent: fastAnswer\ndata: {\"choices\":[{\"delta\":{\"role\":\"assistant\",\"content\":null},\"index\":0,\"finish_reason\":\"stop\"}]}\n\n"
                  },
                  "event_flowNodeStatus": {
                    "summary": "flowNodeStatus · 节点状态",
                    "description": "节点开始运行时发送；分享调用受运行状态展示权限控制。",
                    "value": "event: flowNodeStatus\ndata: {\"status\":\"running\",\"name\":\"知识库搜索\"}\n\n"
                  },
                  "event_flowResponses": {
                    "summary": "flowResponses · 节点响应汇总",
                    "description": "v1 在本轮结束时发送节点响应数组，位于 [DONE] 之前。",
                    "value": "event: flowResponses\ndata: [{\"id\":\"response-ai-1\",\"nodeId\":\"ai-1\",\"moduleType\":\"chatNode\",\"moduleName\":\"AI 对话\",\"runningTime\":1.86,\"textOutput\":\"电影《铃芽之旅》的导演是新海诚。\"}]\n\n"
                  },
                  "event_toolCall": {
                    "summary": "toolCall · 工具调用",
                    "description": "初始化工具卡片；分别展示普通调用和 hideDetails 隐藏详情的调用。",
                    "value": ": 1. 普通工具调用\nevent: toolCall\ndata: {\"tool\":{\"id\":\"call-search-1\",\"toolName\":\"知识库搜索\",\"toolAvatar\":\"/imgs/workflow/db.png\",\"functionName\":\"dataset_search\",\"params\":\"{\\\"query\\\":\\\"铃芽之旅导演\\\"}\"},\"responseValueId\":\"call-search-1\"}\n\n: 2. 隐藏工具参数和响应详情\nevent: toolCall\ndata: {\"tool\":{\"id\":\"call-search-1\",\"toolName\":\"知识库搜索\",\"toolAvatar\":\"/imgs/workflow/db.png\",\"functionName\":\"dataset_search\",\"params\":\"\",\"hideDetails\":true},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_toolParams": {
                    "summary": "toolParams · 工具参数增量",
                    "description": "按 tool.id 追加或合并工具参数，不代表工具已执行完成。",
                    "value": "event: toolParams\ndata: {\"tool\":{\"id\":\"call-search-1\",\"params\":\"{\\\"query\\\":\\\"铃芽之旅导演\\\"}\"},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_toolResponse": {
                    "summary": "toolResponse · 工具响应",
                    "description": "按 tool.id 关联工具执行结果；response 支持字符串或 null。",
                    "value": ": 1. 字符串响应\nevent: toolResponse\ndata: {\"tool\":{\"id\":\"call-search-1\",\"response\":\"导演：新海诚\"},\"responseValueId\":\"call-search-1\"}\n\n: 2. 空响应\nevent: toolResponse\ndata: {\"tool\":{\"id\":\"call-search-1\",\"response\":null},\"responseValueId\":\"call-search-1\"}\n\n"
                  },
                  "event_updateVariables": {
                    "summary": "updateVariables · 变量更新",
                    "description": "更新本轮工作流变量；变量值可以是字符串、数字、布尔值、数组、对象或 null。",
                    "value": "event: updateVariables\ndata: {\"lastQuestion\":\"导演是谁\",\"searchCount\":1,\"found\":true,\"movieNames\":[\"铃芽之旅\"],\"director\":{\"name\":\"新海诚\"},\"nextPage\":null}\n\n"
                  },
                  "event_workflowDuration": {
                    "summary": "workflowDuration · 执行耗时",
                    "description": "本轮工作流总耗时，durationSeconds 的单位为秒。",
                    "value": "event: workflowDuration\ndata: {\"durationSeconds\":2.41}\n\n"
                  },
                  "event_chatTitle": {
                    "summary": "chatTitle · 会话标题",
                    "description": "仅 detail=true、未命名会话标题生成成功时发送；不会覆盖手动标题。",
                    "value": "event: chatTitle\ndata: {\"title\":\"铃芽之旅导演\"}\n\n"
                  },
                  "event_interactive": {
                    "summary": "interactive · 交互配置",
                    "description": "分别展示用户选择、表单、Agent 追问、欠费暂停及子流程包装。包装类型通过 params.childrenResponse 取内层交互；示例省略工作流运行态字段，各分支不会在同一轮依次出现。",
                    "value": ": 1. 用户选择：userSelect\nevent: interactive\ndata: {\"interactive\":{\"type\":\"userSelect\",\"params\":{\"description\":\"测试\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}\n\n: 2. 表单输入：userInput\nevent: interactive\ndata: {\"interactive\":{\"type\":\"userInput\",\"params\":{\"description\":\"测试\",\"inputForm\":[{\"type\":\"input\",\"key\":\"测试 1\",\"label\":\"测试 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"测试 2\",\"label\":\"测试 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}}}\n\n: 3. Agent 追问：agentAsk\nevent: interactive\ndata: {\"interactive\":{\"type\":\"agentAsk\",\"params\":{\"toolCallId\":\"ask-1\",\"arguments\":\"{\\\"reason\\\":\\\"需要确认查询范围后继续。\\\",\\\"blockerType\\\":\\\"user_choice\\\",\\\"questions\\\":[{\\\"question\\\":\\\"要查询哪个范围？\\\",\\\"options\\\":[{\\\"summary\\\":\\\"只查询当前电影\\\",\\\"value\\\":\\\"current_movie\\\"},{\\\"summary\\\":\\\"查询导演的全部作品\\\",\\\"value\\\":\\\"all_movies\\\"}]}]}\"}}}\n\n: 4. 欠费暂停：paymentPause\nevent: interactive\ndata: {\"interactive\":{\"type\":\"paymentPause\",\"params\":{\"description\":\"积分不足，请充值后继续。\"}}}\n\n: 5. 子工作流包装：childrenInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"childrenInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userSelect\",\"params\":{\"description\":\"测试\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}}}}}\n\n: 6. 工具子流程包装：toolChildrenInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"toolChildrenInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userInput\",\"params\":{\"description\":\"测试\",\"inputForm\":[{\"type\":\"input\",\"key\":\"测试 1\",\"label\":\"测试 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"测试 2\",\"label\":\"测试 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}},\"toolCallId\":\"call-search-1\"}}}\n\n: 7. 循环子流程包装：loopInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"loopInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userSelect\",\"params\":{\"description\":\"测试\",\"userSelectOptions\":[{\"value\":\"Confirm\",\"key\":\"option1\"},{\"value\":\"Cancel\",\"key\":\"option2\"}]}},\"currentIndex\":0,\"loopResult\":[]}}}\n\n: 8. 循环运行包装：loopRunInteractive\nevent: interactive\ndata: {\"interactive\":{\"type\":\"loopRunInteractive\",\"params\":{\"childrenResponse\":{\"type\":\"userInput\",\"params\":{\"description\":\"测试\",\"inputForm\":[{\"type\":\"input\",\"key\":\"测试 1\",\"label\":\"测试 1\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"string\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]},{\"type\":\"numberInput\",\"key\":\"测试 2\",\"label\":\"测试 2\",\"description\":\"\",\"value\":\"\",\"defaultValue\":\"\",\"valueType\":\"number\",\"required\":false,\"list\":[{\"label\":\"\",\"value\":\"\"}]}]}},\"iteration\":1,\"loopHistory\":[]}}}\n\n"
                  },
                  "event_planStatus": {
                    "summary": "planStatus · 计划生成状态",
                    "description": "仅相关能力启用时发送；分别展示 generating 生成中和 updating 更新中。",
                    "value": ": 1. 生成计划\nevent: planStatus\ndata: {\"planStatus\":{\"status\":\"generating\"}}\n\n: 2. 更新计划\nevent: planStatus\ndata: {\"planStatus\":{\"status\":\"updating\"}}\n\n"
                  },
                  "event_plan": {
                    "summary": "plan · Agent 计划",
                    "description": "使用 plan.planId 标识计划，steps[].id 标识步骤，步骤状态随运行更新。",
                    "value": "event: plan\ndata: {\"plan\":{\"planId\":\"plan-1\",\"name\":\"查询导演信息\",\"steps\":[{\"id\":\"step-1\",\"name\":\"确认电影名称\",\"status\":\"done\"},{\"id\":\"step-2\",\"name\":\"检索电影资料\",\"status\":\"in_progress\"},{\"id\":\"step-3\",\"name\":\"整理导演信息\",\"status\":\"pending\"},{\"id\":\"step-4\",\"name\":\"核对付费资料\",\"status\":\"blocked\",\"note\":\"等待用户授权\"},{\"id\":\"step-5\",\"name\":\"补充无关作品\",\"status\":\"skipped\",\"note\":\"不在本次范围内\"}]}}\n\n"
                  },
                  "event_skillCall": {
                    "summary": "skillCall · 技能调用",
                    "description": "加载技能说明时发送技能展示信息，仅相关能力启用时出现。",
                    "value": "event: skillCall\ndata: {\"skill\":{\"id\":\"skill-call-1\",\"skillName\":\"资料检索\",\"skillAvatar\":\"/icon/logo.svg\",\"description\":\"查询相关资料\",\"skillMdPath\":\"/skills/search/SKILL.md\"}}\n\n"
                  },
                  "event_sandboxStatus": {
                    "summary": "sandboxStatus · 沙箱状态",
                    "description": "展示各个可见 phase；ready 表示可执行工具，failed 可携带 message，技能部署阶段可携带 skillName。这些是可选分支，并非固定执行顺序。",
                    "value": ": 1. 阶段：checkExisting\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"checkExisting\"}\n\n: 2. 阶段：connecting\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"connecting\",\"isWarmStart\":true}\n\n: 3. 阶段：fetchSkills\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"fetchSkills\"}\n\n: 4. 阶段：creatingContainer\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"creatingContainer\"}\n\n: 5. 阶段：deployingSkills\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"deployingSkills\",\"skillName\":\"资料检索\"}\n\n: 6. 阶段：downloadingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"downloadingPackage\",\"skillName\":\"资料检索\"}\n\n: 7. 阶段：uploadingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"uploadingPackage\",\"skillName\":\"资料检索\"}\n\n: 8. 阶段：extractingPackage\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"extractingPackage\",\"skillName\":\"资料检索\"}\n\n: 9. 阶段：lazyInit\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"lazyInit\"}\n\n: 10. 阶段：upgrading\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"upgrading\"}\n\n: 11. 阶段：ready\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"ready\",\"isWarmStart\":true}\n\n: 12. 阶段：failed\nevent: sandboxStatus\ndata: {\"sandboxId\":\"sandbox-1\",\"phase\":\"failed\",\"message\":\"沙箱初始化失败，请稍后重试。\"}\n\n"
                  },
                  "event_error": {
                    "summary": "error · 流式错误",
                    "description": "流已建立后的错误，包括仅 message 的通用错误，以及含 code / statusText / data 的业务错误；不能仅凭 HTTP 200 判断成功。",
                    "value": ": 1. 通用错误\nevent: error\ndata: {\"message\":\"模型请求失败，请稍后重试\"}\n\n: 2. 业务错误\nevent: error\ndata: {\"code\":510003,\"statusText\":\"runtimeUpgradeInProgress\",\"message\":\"沙箱正在升级，请稍后重试\",\"data\":null,\"httpStatus\":409}\n\n"
                  }
                }
              }
            }
          },
          "409": {
            "description": "同会话已有生成时拒绝本次发送，本次消息不会写入数据库。非流式请求返回 HTTP 409；流式请求通过 error 事件返回同一错误结构。data.responseChatItemId 是应恢复的已有 AI 消息 ID；交互续跑返回 data.reusePreviousAi=true，表示刷新记录后复用最新 AI。客户端应先回填被拒绝的输入，再恢复原有轮次。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "number",
                      "const": 504001
                    },
                    "statusText": {
                      "type": "string",
                      "const": "chatIsGenerating"
                    },
                    "message": {
                      "description": "错误展示文案，已知词条按请求语言翻译；业务判断应使用 code 或 statusText。缺省语言为英文，翻译不可用时保留原文或词条 key。",
                      "example": "common:code_error.chat_error.chat_generating",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "responseChatItemId": {
                          "description": "当前服务端生成轮次的 AI 消息 ID；被拒绝的新发送未创建消息，客户端应恢复此 ID",
                          "example": "active-ai-response-id",
                          "type": "string",
                          "minLength": 1
                        },
                        "reusePreviousAi": {
                          "description": "当前执行是复用最新 AI 消息的交互续跑；恢复前刷新记录，允许复用该 AI",
                          "example": true,
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/feedback/updateUserFeedback": {
      "post": {
        "summary": "添加/更新用户反馈",
        "description": "用户对消息添加或更新好评/差评反馈",
        "tags": [
          "反馈管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "example": "chat123",
                                "description": "对话 ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "dataId": {
                                "example": "data123",
                                "description": "消息数据 ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "userGoodFeedback": {
                                "example": "回答很好",
                                "description": "用户好评反馈内容",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userBadFeedback": {
                                "example": "回答不准确",
                                "description": "用户差评反馈内容",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "chatId",
                              "dataId"
                            ]
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "对话 ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "dataId": {
                                "example": "data123",
                                "description": "消息数据 ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "userGoodFeedback": {
                                "example": "回答很好",
                                "description": "用户好评反馈内容",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userBadFeedback": {
                                "example": "回答不准确",
                                "description": "用户差评反馈内容",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "chatId",
                              "dataId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key 代理调用身份。仅开启 authProxy 的个人密钥可用；按团队成员 ID 或用户名指定，二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "对话 ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "dataId": {
                                "example": "data123",
                                "description": "消息数据 ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "userGoodFeedback": {
                                "example": "回答很好",
                                "description": "用户好评反馈内容",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userBadFeedback": {
                                "example": "回答不准确",
                                "description": "用户差评反馈内容",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "chatId",
                              "dataId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill 调试会话",
                    "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "example": "chat123",
                        "description": "对话 ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "dataId": {
                        "example": "data123",
                        "description": "消息数据 ID",
                        "type": "string",
                        "minLength": 1
                      },
                      "userGoodFeedback": {
                        "example": "回答很好",
                        "description": "用户好评反馈内容",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "userBadFeedback": {
                        "example": "回答不准确",
                        "description": "用户差评反馈内容",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId",
                      "dataId"
                    ]
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权数据，包含 shareId/outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "example": "chat123",
                        "description": "对话 ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "dataId": {
                        "example": "data123",
                        "description": "消息数据 ID",
                        "type": "string",
                        "minLength": 1
                      },
                      "userGoodFeedback": {
                        "example": "回答很好",
                        "description": "用户好评反馈内容",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "userBadFeedback": {
                        "example": "回答不准确",
                        "description": "用户差评反馈内容",
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId",
                      "dataId"
                    ]
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "example": "chat123",
                            "description": "对话 ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "dataId": {
                            "example": "data123",
                            "description": "消息数据 ID",
                            "type": "string",
                            "minLength": 1
                          },
                          "userGoodFeedback": {
                            "example": "回答很好",
                            "description": "用户好评反馈内容",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "userBadFeedback": {
                            "example": "回答不准确",
                            "description": "用户差评反馈内容",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "chatId",
                          "dataId"
                        ]
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "example": "chat123",
                            "description": "对话 ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "dataId": {
                            "example": "data123",
                            "description": "消息数据 ID",
                            "type": "string",
                            "minLength": 1
                          },
                          "userGoodFeedback": {
                            "example": "回答很好",
                            "description": "用户好评反馈内容",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "userBadFeedback": {
                            "example": "回答不准确",
                            "description": "用户差评反馈内容",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "chatId",
                          "dataId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "chat123",
                "dataId": "data123"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功更新用户反馈",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "更新成功",
                      "not": {}
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/getHistories": {
      "post": {
        "summary": "获取会话列表",
        "description": "分页获取会话列表",
        "tags": [
          "会话管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "middle"
                        }
                      },
                      "source": {
                        "allOf": [
                          {
                            "description": "对话来源筛选；应用 API Key 固定查询 API 来源，无需传入",
                            "type": "string",
                            "enum": [
                              "test",
                              "online",
                              "share",
                              "api",
                              "cronJob",
                              "feishu",
                              "official_account",
                              "wecom",
                              "wechat",
                              "mcp",
                              "dingtalk",
                              "unknown"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "anyOf": [
                              {
                                "title": "按偏移量获取",
                                "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "偏移量，从 0 开始",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "创建时间开始",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "创建时间结束",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "更新时间开始",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "更新时间结束",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "按页码获取",
                                "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "页码，从 1 开始；传入 offset 时忽略",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "创建时间开始",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "创建时间结束",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "更新时间开始",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "更新时间结束",
                                    "type": "string"
                                  }
                                },
                                "required": []
                              }
                            ]
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              }
                            },
                            "required": [
                              "customUid"
                            ],
                            "allOf": [
                              {
                                "anyOf": [
                                  {
                                    "title": "按偏移量获取",
                                    "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                    "type": "object",
                                    "properties": {
                                      "offset": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "first"
                                        },
                                        "example": 0,
                                        "description": "偏移量，从 0 开始",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "分页参数"
                                            },
                                            "example": 20,
                                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "last"
                                        }
                                      },
                                      "startCreateTime": {
                                        "description": "创建时间开始",
                                        "type": "string"
                                      },
                                      "endCreateTime": {
                                        "description": "创建时间结束",
                                        "type": "string"
                                      },
                                      "startUpdateTime": {
                                        "description": "更新时间开始",
                                        "type": "string"
                                      },
                                      "endUpdateTime": {
                                        "description": "更新时间结束",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "offset"
                                    ]
                                  },
                                  {
                                    "title": "按页码获取",
                                    "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                    "type": "object",
                                    "properties": {
                                      "pageNum": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "first"
                                        },
                                        "example": 1,
                                        "description": "页码，从 1 开始；传入 offset 时忽略",
                                        "default": 1,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "分页参数"
                                            },
                                            "example": 20,
                                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "last"
                                        }
                                      },
                                      "startCreateTime": {
                                        "description": "创建时间开始",
                                        "type": "string"
                                      },
                                      "endCreateTime": {
                                        "description": "创建时间结束",
                                        "type": "string"
                                      },
                                      "startUpdateTime": {
                                        "description": "更新时间开始",
                                        "type": "string"
                                      },
                                      "endUpdateTime": {
                                        "description": "更新时间结束",
                                        "type": "string"
                                      }
                                    },
                                    "required": []
                                  }
                                ]
                              },
                              {}
                            ],
                            "x-fastgpt-union-layout": true
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key 代理调用身份。仅开启 authProxy 的个人密钥可用；按团队成员 ID 或用户名指定，二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              }
                            },
                            "required": [
                              "authProxy"
                            ],
                            "allOf": [
                              {
                                "anyOf": [
                                  {
                                    "title": "按偏移量获取",
                                    "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                    "type": "object",
                                    "properties": {
                                      "offset": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "first"
                                        },
                                        "example": 0,
                                        "description": "偏移量，从 0 开始",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "分页参数"
                                            },
                                            "example": 20,
                                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "last"
                                        }
                                      },
                                      "startCreateTime": {
                                        "description": "创建时间开始",
                                        "type": "string"
                                      },
                                      "endCreateTime": {
                                        "description": "创建时间结束",
                                        "type": "string"
                                      },
                                      "startUpdateTime": {
                                        "description": "更新时间开始",
                                        "type": "string"
                                      },
                                      "endUpdateTime": {
                                        "description": "更新时间结束",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "offset"
                                    ]
                                  },
                                  {
                                    "title": "按页码获取",
                                    "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                    "type": "object",
                                    "properties": {
                                      "pageNum": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "first"
                                        },
                                        "example": 1,
                                        "description": "页码，从 1 开始；传入 offset 时忽略",
                                        "default": 1,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "分页参数"
                                            },
                                            "example": 20,
                                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "last"
                                        }
                                      },
                                      "startCreateTime": {
                                        "description": "创建时间开始",
                                        "type": "string"
                                      },
                                      "endCreateTime": {
                                        "description": "创建时间结束",
                                        "type": "string"
                                      },
                                      "startUpdateTime": {
                                        "description": "更新时间开始",
                                        "type": "string"
                                      },
                                      "endUpdateTime": {
                                        "description": "更新时间结束",
                                        "type": "string"
                                      }
                                    },
                                    "required": []
                                  }
                                ]
                              },
                              {}
                            ],
                            "x-fastgpt-union-layout": true
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill 调试会话",
                    "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "source": {
                        "allOf": [
                          {
                            "description": "对话来源筛选；应用 API Key 固定查询 API 来源，无需传入",
                            "type": "string",
                            "enum": [
                              "test",
                              "online",
                              "share",
                              "api",
                              "cronJob",
                              "feishu",
                              "official_account",
                              "wecom",
                              "wechat",
                              "mcp",
                              "dingtalk",
                              "unknown"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "skillId"
                    ],
                    "allOf": [
                      {
                        "allOf": [
                          {
                            "title": "Skill 调试会话",
                            "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                            "type": "object",
                            "properties": {},
                            "required": []
                          },
                          {
                            "anyOf": [
                              {
                                "title": "按偏移量获取",
                                "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "偏移量，从 0 开始",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "创建时间开始",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "创建时间结束",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "更新时间开始",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "更新时间结束",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "按页码获取",
                                "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "页码，从 1 开始；传入 offset 时忽略",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "创建时间开始",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "创建时间结束",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "更新时间开始",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "更新时间结束",
                                    "type": "string"
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权数据，包含 shareId/outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "source": {
                        "allOf": [
                          {
                            "description": "对话来源筛选；应用 API Key 固定查询 API 来源，无需传入",
                            "type": "string",
                            "enum": [
                              "test",
                              "online",
                              "share",
                              "api",
                              "cronJob",
                              "feishu",
                              "official_account",
                              "wecom",
                              "wechat",
                              "mcp",
                              "dingtalk",
                              "unknown"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "outLinkAuthData"
                    ],
                    "allOf": [
                      {
                        "allOf": [
                          {
                            "title": "外链会话",
                            "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                            "type": "object",
                            "properties": {},
                            "required": []
                          },
                          {
                            "anyOf": [
                              {
                                "title": "按偏移量获取",
                                "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "偏移量，从 0 开始",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "创建时间开始",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "创建时间结束",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "更新时间开始",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "更新时间结束",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "按页码获取",
                                "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "页码，从 1 开始；传入 offset 时忽略",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "创建时间开始",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "创建时间结束",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "更新时间开始",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "更新时间结束",
                                    "type": "string"
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "anyOf": [
                          {
                            "title": "按偏移量获取",
                            "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                            "type": "object",
                            "properties": {
                              "offset": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "分页参数"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "first"
                                },
                                "example": 0,
                                "description": "偏移量，从 0 开始",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "example": 20,
                                    "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "last"
                                }
                              },
                              "startCreateTime": {
                                "description": "创建时间开始",
                                "type": "string"
                              },
                              "endCreateTime": {
                                "description": "创建时间结束",
                                "type": "string"
                              },
                              "startUpdateTime": {
                                "description": "更新时间开始",
                                "type": "string"
                              },
                              "endUpdateTime": {
                                "description": "更新时间结束",
                                "type": "string"
                              }
                            },
                            "required": [
                              "offset"
                            ]
                          },
                          {
                            "title": "按页码获取",
                            "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                            "type": "object",
                            "properties": {
                              "pageNum": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "分页参数"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "first"
                                },
                                "example": 1,
                                "description": "页码，从 1 开始；传入 offset 时忽略",
                                "default": 1,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "example": 20,
                                    "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "last"
                                }
                              },
                              "startCreateTime": {
                                "description": "创建时间开始",
                                "type": "string"
                              },
                              "endCreateTime": {
                                "description": "创建时间结束",
                                "type": "string"
                              },
                              "startUpdateTime": {
                                "description": "更新时间开始",
                                "type": "string"
                              },
                              "endUpdateTime": {
                                "description": "更新时间结束",
                                "type": "string"
                              }
                            },
                            "required": []
                          }
                        ]
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "customUid"
                        ],
                        "allOf": [
                          {
                            "anyOf": [
                              {
                                "title": "按偏移量获取",
                                "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "偏移量，从 0 开始",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "创建时间开始",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "创建时间结束",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "更新时间开始",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "更新时间结束",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "按页码获取",
                                "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "页码，从 1 开始；传入 offset 时忽略",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "startCreateTime": {
                                    "description": "创建时间开始",
                                    "type": "string"
                                  },
                                  "endCreateTime": {
                                    "description": "创建时间结束",
                                    "type": "string"
                                  },
                                  "startUpdateTime": {
                                    "description": "更新时间开始",
                                    "type": "string"
                                  },
                                  "endUpdateTime": {
                                    "description": "更新时间结束",
                                    "type": "string"
                                  }
                                },
                                "required": []
                              }
                            ]
                          },
                          {}
                        ],
                        "x-fastgpt-union-layout": true
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "offset": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功获取会话列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "default": 0,
                          "type": "number"
                        },
                        "list": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "allOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "chatId": {
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "updateTime": {
                                    "type": "string"
                                  },
                                  "customTitle": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "top": {
                                    "type": "boolean"
                                  },
                                  "chatGenerateStatus": {
                                    "description": "由 Redis 生成租约计算的运行状态：0=generating（生成中），1=done（空闲）",
                                    "type": "number",
                                    "enum": [
                                      0,
                                      1
                                    ]
                                  },
                                  "hasBeenRead": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "chatId",
                                  "updateTime",
                                  "title"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "appId": {
                                        "allOf": [
                                          {
                                            "description": "应用 ID，仅工作流辅助生成会话返回",
                                            "example": "68ee0bd23d17260b7829b137",
                                            "type": "string",
                                            "pattern": "^[0-9a-fA-F]{24}$"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "skillId": {
                                        "allOf": [
                                          {
                                            "not": {}
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "sourceType": {
                                        "allOf": [
                                          {
                                            "description": "工作流辅助生成会话资源类型",
                                            "type": "string",
                                            "const": "workflowBuilder"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      }
                                    },
                                    "required": [
                                      "appId",
                                      "sourceType"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "appId": {
                                        "allOf": [
                                          {
                                            "description": "应用 ID，仅 ChatAgentHelper 会话返回",
                                            "example": "68ee0bd23d17260b7829b137",
                                            "type": "string",
                                            "pattern": "^[0-9a-fA-F]{24}$"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "skillId": {
                                        "allOf": [
                                          {
                                            "not": {}
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "sourceType": {
                                        "allOf": [
                                          {
                                            "description": "ChatAgentHelper 会话资源类型",
                                            "type": "string",
                                            "const": "chatAgentHelper"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      }
                                    },
                                    "required": [
                                      "appId",
                                      "sourceType"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "appId": {
                                        "allOf": [
                                          {
                                            "description": "应用 ID，仅 App 会话返回",
                                            "example": "68ee0bd23d17260b7829b137",
                                            "type": "string",
                                            "pattern": "^[0-9a-fA-F]{24}$"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "skillId": {
                                        "allOf": [
                                          {
                                            "not": {}
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      }
                                    },
                                    "required": [
                                      "appId"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "appId": {
                                        "allOf": [
                                          {
                                            "not": {}
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "skillId": {
                                        "allOf": [
                                          {
                                            "description": "Skill Edit 调试 ID，仅 Skill Edit 会话返回",
                                            "example": "68ee0bd23d17260b7829b137",
                                            "type": "string",
                                            "pattern": "^[0-9a-fA-F]{24}$"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      }
                                    },
                                    "required": [
                                      "skillId"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "total",
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/getHistoryStatus": {
      "post": {
        "summary": "批量获取会话状态（生成中/已读）",
        "description": "按 chatId 批量读取 Redis lease 运行状态，并返回 hasBeenRead、updateTime，用于侧栏轻量轮询同步。读取异常时返回错误，调用方保留上次状态并稍后重试。",
        "tags": [
          "会话管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "type": "object",
                            "properties": {
                              "chatIds": {
                                "description": "需要刷新状态的会话 ID 列表",
                                "minItems": 1,
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              }
                            },
                            "required": [
                              "chatIds"
                            ]
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatIds": {
                                "description": "需要刷新状态的会话 ID 列表",
                                "minItems": 1,
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              }
                            },
                            "required": [
                              "chatIds",
                              "customUid"
                            ]
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key 代理调用身份。仅开启 authProxy 的个人密钥可用；按团队成员 ID 或用户名指定，二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatIds": {
                                "description": "需要刷新状态的会话 ID 列表",
                                "minItems": 1,
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              }
                            },
                            "required": [
                              "chatIds",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill 调试会话",
                    "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatIds": {
                        "description": "需要刷新状态的会话 ID 列表",
                        "minItems": 1,
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      }
                    },
                    "required": [
                      "skillId",
                      "chatIds"
                    ]
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权数据，包含 shareId/outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatIds": {
                        "description": "需要刷新状态的会话 ID 列表",
                        "minItems": 1,
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatIds"
                    ]
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "type": "object",
                        "properties": {
                          "chatIds": {
                            "description": "需要刷新状态的会话 ID 列表",
                            "minItems": 1,
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          }
                        },
                        "required": [
                          "chatIds"
                        ]
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatIds": {
                            "description": "需要刷新状态的会话 ID 列表",
                            "minItems": 1,
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          }
                        },
                        "required": [
                          "chatIds",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatIds": [
                  "string"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "type": "string",
                                "maxLength": 1024
                              },
                              "updateTime": {
                                "type": "string"
                              },
                              "chatGenerateStatus": {
                                "description": "由 Redis 生成租约计算的运行状态：0=generating（生成中），1=done（空闲）",
                                "type": "number",
                                "enum": [
                                  0,
                                  1
                                ]
                              },
                              "hasBeenRead": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "chatId",
                              "updateTime"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/markRead": {
      "post": {
        "summary": "标记会话已读",
        "description": "用户在本页看完回复后调用，同步 Mongo hasBeenRead。App 来源要求应用读取权限，其他来源保留资源写权限；同时校验对应来源的会话访问范围。",
        "tags": [
          "会话管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId"
                            ]
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key 代理调用身份。仅开启 authProxy 的个人密钥可用；按团队成员 ID 或用户名指定，二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "chatId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill 调试会话",
                    "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId"
                    ]
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权数据，包含 shareId/outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId"
                    ]
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "会话ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          }
                        },
                        "required": [
                          "chatId"
                        ]
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "会话ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          }
                        },
                        "required": [
                          "chatId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/updateHistory": {
      "put": {
        "summary": "修改会话",
        "description": "修改会话的标题、自定义标题或置顶状态",
        "tags": [
          "会话管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "title": {
                                "description": "标题",
                                "type": "string"
                              },
                              "customTitle": {
                                "description": "自定义标题",
                                "type": "string"
                              },
                              "top": {
                                "description": "是否置顶",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "chatId"
                            ]
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "title": {
                                "description": "标题",
                                "type": "string"
                              },
                              "customTitle": {
                                "description": "自定义标题",
                                "type": "string"
                              },
                              "top": {
                                "description": "是否置顶",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "chatId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key 代理调用身份。仅开启 authProxy 的个人密钥可用；按团队成员 ID 或用户名指定，二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "title": {
                                "description": "标题",
                                "type": "string"
                              },
                              "customTitle": {
                                "description": "自定义标题",
                                "type": "string"
                              },
                              "top": {
                                "description": "是否置顶",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "chatId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill 调试会话",
                    "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "title": {
                        "description": "标题",
                        "type": "string"
                      },
                      "customTitle": {
                        "description": "自定义标题",
                        "type": "string"
                      },
                      "top": {
                        "description": "是否置顶",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId"
                    ]
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权数据，包含 shareId/outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "title": {
                        "description": "标题",
                        "type": "string"
                      },
                      "customTitle": {
                        "description": "自定义标题",
                        "type": "string"
                      },
                      "top": {
                        "description": "是否置顶",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId"
                    ]
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "会话ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "title": {
                            "description": "标题",
                            "type": "string"
                          },
                          "customTitle": {
                            "description": "自定义标题",
                            "type": "string"
                          },
                          "top": {
                            "description": "是否置顶",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "chatId"
                        ]
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "会话ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "title": {
                            "description": "标题",
                            "type": "string"
                          },
                          "customTitle": {
                            "description": "自定义标题",
                            "type": "string"
                          },
                          "top": {
                            "description": "是否置顶",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "chatId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功修改会话",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/delHistory": {
      "delete": {
        "summary": "删除单个会话",
        "description": "软删除指定的单个会话，不会物理删除",
        "tags": [
          "会话管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "anyOf": [
                {
                  "title": "应用会话",
                  "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                  "properties": {
                    "appId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a05",
                          "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "first"
                      }
                    },
                    "sourceType": {
                      "allOf": [
                        {
                          "example": "chatAgentHelper",
                          "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                          "type": "string",
                          "enum": [
                            "app",
                            "chatAgentHelper",
                            "workflowBuilder"
                          ]
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "last"
                      }
                    }
                  },
                  "required": [
                    "appId"
                  ],
                  "allOf": [
                    {
                      "anyOf": [
                        {
                          "title": "默认身份",
                          "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                          "type": "object",
                          "properties": {
                            "chatId": {
                              "description": "会话ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          },
                          "required": [
                            "chatId"
                          ]
                        },
                        {
                          "title": "自定义使用者",
                          "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                          "type": "object",
                          "properties": {
                            "customUid": {
                              "allOf": [
                                {
                                  "example": "customer-42",
                                  "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "会话ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          },
                          "required": [
                            "chatId",
                            "customUid"
                          ]
                        },
                        {
                          "title": "代理团队成员",
                          "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                          "type": "object",
                          "properties": {
                            "authProxy": {
                              "allOf": [
                                {
                                  "example": "{\"tmbId\":\"68ad85a7463006c963799a06\"}",
                                  "description": "代理身份的 JSON 字符串，例如 {\"tmbId\":\"团队成员ID\"} 或 {\"username\":\"用户名\"}",
                                  "type": "string"
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "会话ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          },
                          "required": [
                            "chatId",
                            "authProxy"
                          ]
                        }
                      ]
                    },
                    {}
                  ],
                  "x-fastgpt-union-layout": true
                },
                {
                  "title": "Skill 调试会话",
                  "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                  "type": "object",
                  "properties": {
                    "skillId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a06",
                          "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    },
                    "chatId": {
                      "description": "会话ID",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  "required": [
                    "skillId",
                    "chatId"
                  ]
                },
                {
                  "title": "外链会话",
                  "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                  "type": "object",
                  "properties": {
                    "outLinkAuthData": {
                      "allOf": [
                        {
                          "example": "{\"shareId\":\"share-id\",\"outLinkUid\":\"outlink-user-id\"}",
                          "description": "外链鉴权数据的 JSON 字符串，包含 shareId 和 outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                          "type": "string"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    },
                    "chatId": {
                      "description": "会话ID",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  "required": [
                    "outLinkAuthData",
                    "chatId"
                  ]
                },
                {
                  "title": "应用 API Key（无需 appId）",
                  "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                  "anyOf": [
                    {
                      "title": "默认身份",
                      "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                      "type": "object",
                      "properties": {
                        "chatId": {
                          "description": "会话ID",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      },
                      "required": [
                        "chatId"
                      ]
                    },
                    {
                      "title": "自定义使用者",
                      "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                      "type": "object",
                      "properties": {
                        "customUid": {
                          "allOf": [
                            {
                              "example": "customer-42",
                              "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          ],
                          "x-fastgpt-union-parameter": {
                            "label": "",
                            "position": "only"
                          }
                        },
                        "chatId": {
                          "description": "会话ID",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      },
                      "required": [
                        "chatId",
                        "customUid"
                      ]
                    }
                  ]
                }
              ]
            },
            "required": true,
            "style": "form",
            "explode": true,
            "examples": {
              "default": {
                "value": {
                  "appId": "68ad85a7463006c963799a05",
                  "chatId": "string"
                },
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功删除会话",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/clearHistories": {
      "delete": {
        "summary": "清空会话",
        "description": "清空所有会话（软删除）",
        "tags": [
          "会话管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "anyOf": [
                {
                  "title": "应用会话",
                  "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                  "properties": {
                    "appId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a05",
                          "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "first"
                      }
                    },
                    "sourceType": {
                      "allOf": [
                        {
                          "example": "chatAgentHelper",
                          "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                          "type": "string",
                          "enum": [
                            "app",
                            "chatAgentHelper",
                            "workflowBuilder"
                          ]
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "last"
                      }
                    }
                  },
                  "required": [
                    "appId"
                  ],
                  "allOf": [
                    {
                      "anyOf": [
                        {
                          "title": "默认身份",
                          "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                          "type": "object",
                          "properties": {},
                          "required": []
                        },
                        {
                          "title": "自定义使用者",
                          "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                          "type": "object",
                          "properties": {
                            "customUid": {
                              "allOf": [
                                {
                                  "example": "customer-42",
                                  "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            }
                          },
                          "required": [
                            "customUid"
                          ]
                        },
                        {
                          "title": "代理团队成员",
                          "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                          "type": "object",
                          "properties": {
                            "authProxy": {
                              "allOf": [
                                {
                                  "example": "{\"tmbId\":\"68ad85a7463006c963799a06\"}",
                                  "description": "代理身份的 JSON 字符串，例如 {\"tmbId\":\"团队成员ID\"} 或 {\"username\":\"用户名\"}",
                                  "type": "string"
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            }
                          },
                          "required": [
                            "authProxy"
                          ]
                        }
                      ]
                    },
                    {}
                  ],
                  "x-fastgpt-union-layout": true
                },
                {
                  "title": "Skill 调试会话",
                  "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                  "type": "object",
                  "properties": {
                    "skillId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a06",
                          "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    }
                  },
                  "required": [
                    "skillId"
                  ]
                },
                {
                  "title": "外链会话",
                  "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                  "type": "object",
                  "properties": {
                    "outLinkAuthData": {
                      "allOf": [
                        {
                          "example": "{\"shareId\":\"share-id\",\"outLinkUid\":\"outlink-user-id\"}",
                          "description": "外链鉴权数据的 JSON 字符串，包含 shareId 和 outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                          "type": "string"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    }
                  },
                  "required": [
                    "outLinkAuthData"
                  ]
                },
                {
                  "title": "应用 API Key（无需 appId）",
                  "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                  "anyOf": [
                    {
                      "title": "默认身份",
                      "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                      "type": "object",
                      "properties": {},
                      "required": []
                    },
                    {
                      "title": "自定义使用者",
                      "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                      "type": "object",
                      "properties": {
                        "customUid": {
                          "allOf": [
                            {
                              "example": "customer-42",
                              "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          ],
                          "x-fastgpt-union-parameter": {
                            "label": "",
                            "position": "only"
                          }
                        }
                      },
                      "required": [
                        "customUid"
                      ]
                    }
                  ]
                }
              ]
            },
            "required": false,
            "style": "form",
            "explode": true,
            "examples": {
              "default": {
                "value": {
                  "appId": "68ad85a7463006c963799a05"
                },
                "x-disabled": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功清空会话",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/history/batchDelete": {
      "post": {
        "summary": "批量删除会话",
        "description": "物理删除选中的会话及其消息、响应和会话文件，需对应资源的日志管理权限。",
        "tags": [
          "会话管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                    "type": "object",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      },
                      "chatIds": {
                        "description": "会话 ID 列表",
                        "example": [
                          "chat_123456",
                          "chat_789012"
                        ],
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      }
                    },
                    "required": [
                      "appId",
                      "chatIds"
                    ]
                  },
                  {
                    "title": "Skill 调试会话",
                    "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatIds": {
                        "description": "会话 ID 列表",
                        "example": [
                          "chat_123456",
                          "chat_789012"
                        ],
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      }
                    },
                    "required": [
                      "skillId",
                      "chatIds"
                    ]
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "type": "object",
                    "properties": {
                      "chatIds": {
                        "description": "会话 ID 列表",
                        "example": [
                          "chat_123456",
                          "chat_789012"
                        ],
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      }
                    },
                    "required": [
                      "chatIds"
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatIds": [
                  "chat_123456",
                  "chat_789012"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功删除会话",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/init": {
      "get": {
        "summary": "初始化应用或 Skill 调试会话",
        "description": "初始化应用会话或 Skill 编辑调试会话，返回会话配置、变量和已有会话状态。\n\nQuery 身份二选一：应用会话传 appId；Skill 调试会话传 skillId，两种模式均需传 chatId。使用登录态或接口允许的 API Key 鉴权；同时传入 appId 和 skillId 时优先使用 skillId。\n\n应用辅助生成会话通过 appId 与 sourceType 指定，sourceType 支持 chatAgentHelper、workflowBuilder；普通应用会话省略 sourceType。\n\n外链分享会话使用 GET /api/core/chat/outLink/init，传入 JSON 序列化的 outLinkAuthData。\n\nSkill 编辑沙盒的启动、恢复或复用使用 POST /api/core/ai/skill/runtime/init，与本接口的会话初始化用途不同。",
        "tags": [
          "会话管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "1234567890",
                "loadCustomFeedbacks": true
              },
              "anyOf": [
                {
                  "title": "应用会话",
                  "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                  "properties": {
                    "appId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a05",
                          "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "first"
                      }
                    },
                    "sourceType": {
                      "allOf": [
                        {
                          "example": "chatAgentHelper",
                          "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                          "type": "string",
                          "enum": [
                            "app",
                            "chatAgentHelper",
                            "workflowBuilder"
                          ]
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "last"
                      }
                    }
                  },
                  "required": [
                    "appId"
                  ],
                  "allOf": [
                    {
                      "anyOf": [
                        {
                          "title": "默认身份",
                          "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                          "type": "object",
                          "properties": {
                            "chatId": {
                              "description": "会话ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            },
                            "loadCustomFeedbacks": {
                              "description": "是否加载自定义反馈",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "chatId"
                          ]
                        },
                        {
                          "title": "自定义使用者",
                          "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                          "type": "object",
                          "properties": {
                            "customUid": {
                              "allOf": [
                                {
                                  "example": "customer-42",
                                  "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "会话ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            },
                            "loadCustomFeedbacks": {
                              "description": "是否加载自定义反馈",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "chatId",
                            "customUid"
                          ]
                        },
                        {
                          "title": "代理团队成员",
                          "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                          "type": "object",
                          "properties": {
                            "authProxy": {
                              "allOf": [
                                {
                                  "example": "{\"tmbId\":\"68ad85a7463006c963799a06\"}",
                                  "description": "代理身份的 JSON 字符串，例如 {\"tmbId\":\"团队成员ID\"} 或 {\"username\":\"用户名\"}",
                                  "type": "string"
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "会话ID",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            },
                            "loadCustomFeedbacks": {
                              "description": "是否加载自定义反馈",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "chatId",
                            "authProxy"
                          ]
                        }
                      ]
                    },
                    {}
                  ],
                  "x-fastgpt-union-layout": true
                },
                {
                  "title": "Skill 调试会话",
                  "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                  "type": "object",
                  "properties": {
                    "skillId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a06",
                          "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    },
                    "chatId": {
                      "description": "会话ID",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    },
                    "loadCustomFeedbacks": {
                      "description": "是否加载自定义反馈",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "skillId",
                    "chatId"
                  ]
                },
                {
                  "title": "应用 API Key（无需 appId）",
                  "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                  "anyOf": [
                    {
                      "title": "默认身份",
                      "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                      "type": "object",
                      "properties": {
                        "chatId": {
                          "description": "会话ID",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        },
                        "loadCustomFeedbacks": {
                          "description": "是否加载自定义反馈",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "chatId"
                      ]
                    },
                    {
                      "title": "自定义使用者",
                      "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                      "type": "object",
                      "properties": {
                        "customUid": {
                          "allOf": [
                            {
                              "example": "customer-42",
                              "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          ],
                          "x-fastgpt-union-parameter": {
                            "label": "",
                            "position": "only"
                          }
                        },
                        "chatId": {
                          "description": "会话ID",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        },
                        "loadCustomFeedbacks": {
                          "description": "是否加载自定义反馈",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "chatId",
                        "customUid"
                      ]
                    }
                  ]
                }
              ]
            },
            "required": true,
            "style": "form",
            "explode": true,
            "examples": {
              "default": {
                "value": {
                  "appId": "68ad85a7463006c963799a05",
                  "chatId": "1234567890"
                },
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功返回聊天初始化信息",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "chatId": {
                              "description": "会话ID",
                              "type": "string",
                              "maxLength": 1024
                            },
                            "userAvatar": {
                              "description": "用户头像",
                              "type": "string"
                            },
                            "title": {
                              "description": "对话标题",
                              "type": "string"
                            },
                            "variables": {
                              "description": "全局变量值",
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            "chatGenerateStatus": {
                              "description": "由 Redis 生成租约计算的运行状态：0=generating（生成中），1=done（空闲）",
                              "type": "number",
                              "enum": [
                                0,
                                1
                              ]
                            },
                            "hasBeenRead": {
                              "description": "是否已读",
                              "type": "boolean"
                            },
                            "app": {
                              "description": "应用配置",
                              "type": "object",
                              "properties": {
                                "chatConfig": {
                                  "description": "聊天配置",
                                  "type": "object",
                                  "properties": {
                                    "welcomeText": {
                                      "description": "新会话开始时展示给用户的欢迎语",
                                      "type": "string"
                                    },
                                    "welcomeConfig": {
                                      "description": "开场白配置",
                                      "type": "object",
                                      "properties": {
                                        "welcomeText": {
                                          "description": "新会话开始时展示给用户的欢迎语",
                                          "type": "string"
                                        },
                                        "welcomeQuestions": {
                                          "description": "开场白下方展示的预设问题列表",
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "variables": {
                                      "description": "应用启动对话前需要用户填写的变量列表",
                                      "type": "array",
                                      "items": {
                                        "description": "应用对话变量配置项",
                                        "type": "object",
                                        "properties": {
                                          "maxFiles": {
                                            "description": "该变量允许选择的最大文件数量",
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "canSelectFile": {
                                            "description": "该变量是否允许选择普通文件",
                                            "type": "boolean"
                                          },
                                          "customPdfParse": {
                                            "description": "是否使用自定义 PDF 解析配置",
                                            "type": "boolean"
                                          },
                                          "canSelectImg": {
                                            "description": "该变量是否允许选择图片",
                                            "type": "boolean"
                                          },
                                          "canSelectVideo": {
                                            "description": "该变量是否允许选择视频",
                                            "type": "boolean"
                                          },
                                          "canSelectAudio": {
                                            "description": "该变量是否允许选择音频",
                                            "type": "boolean"
                                          },
                                          "canSelectCustomFileExtension": {
                                            "description": "该变量是否允许选择自定义扩展名文件",
                                            "type": "boolean"
                                          },
                                          "customFileExtensionList": {
                                            "description": "该变量允许选择的自定义文件扩展名列表",
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "key": {
                                            "description": "变量键名，用于在提示词或工作流中引用该输入",
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "welcomeText",
                                                  "welcomeQuestions",
                                                  "switch",
                                                  "history",
                                                  "text",
                                                  "questionGuide",
                                                  "tts",
                                                  "whisper",
                                                  "variables",
                                                  "scheduleTrigger",
                                                  "chatInputGuide",
                                                  "autoExecute",
                                                  "entryPoints",
                                                  "instruction",
                                                  "userChatInput",
                                                  "inputFiles",
                                                  "agents",
                                                  "modelId",
                                                  "model",
                                                  "systemPrompt",
                                                  "description",
                                                  "system_anyInput",
                                                  "system_textareaInput",
                                                  "system_addInputParam",
                                                  "system_forbid_stream",
                                                  "system_header_secret",
                                                  "system_input_config",
                                                  "maxContext",
                                                  "temperature",
                                                  "maxToken",
                                                  "aiSettings",
                                                  "isResponseAnswerText",
                                                  "aiChatQuoteRole",
                                                  "quoteTemplate",
                                                  "quotePrompt",
                                                  "quoteQA",
                                                  "aiChatVision",
                                                  "aiChatAudio",
                                                  "aiChatVideo",
                                                  "aiChatExtractFiles",
                                                  "stringQuoteText",
                                                  "aiChatReasoning",
                                                  "aiChatReasoningEffort",
                                                  "aiChatTopP",
                                                  "aiChatStopSign",
                                                  "aiChatResponseFormat",
                                                  "aiChatJsonSchema",
                                                  "agent_selectedTools",
                                                  "agent_datasetParams",
                                                  "skills",
                                                  "useAgentSandbox",
                                                  "sandboxEntrypoint",
                                                  "editSkillId",
                                                  "datasets",
                                                  "similarity",
                                                  "limit",
                                                  "searchMode",
                                                  "embeddingWeight",
                                                  "usingReRank",
                                                  "rerankWeight",
                                                  "rerankCandidateNum",
                                                  "rerankModelId",
                                                  "rerankModel",
                                                  "datasetSearchUsingExtensionQuery",
                                                  "datasetSearchExtensionModelId",
                                                  "datasetSearchExtensionModel",
                                                  "datasetSearchExtensionBg",
                                                  "datasetSearchInput",
                                                  "collectionFilterVersion",
                                                  "collectionFilterMatch",
                                                  "authTmbId",
                                                  "system_datasetQuoteList",
                                                  "content",
                                                  "extractKeys",
                                                  "system_httpReqUrl",
                                                  "system_httpHeader",
                                                  "system_httpMethod",
                                                  "system_httpParams",
                                                  "system_httpJsonBody",
                                                  "system_httpFormBody",
                                                  "system_httpContentType",
                                                  "system_httpTimeout",
                                                  "url",
                                                  "app",
                                                  "pluginId",
                                                  "pluginStart",
                                                  "condition",
                                                  "ifElseList",
                                                  "updateList",
                                                  "code",
                                                  "codeType",
                                                  "fileUrlList",
                                                  "userSelectOptions",
                                                  "loopInputArray",
                                                  "childrenNodeIdList",
                                                  "nodeWidth",
                                                  "nodeHeight",
                                                  "loopNodeInputHeight",
                                                  "loopStartInput",
                                                  "loopStartIndex",
                                                  "loopEndInput",
                                                  "parallelRunMaxConcurrency",
                                                  "parallelRunMaxRetryTimes",
                                                  "loopRunMode",
                                                  "loopRunInputArray",
                                                  "loopCustomOutputs",
                                                  "userInputForms",
                                                  "commentText",
                                                  "commentSize",
                                                  "system_toolData",
                                                  "system_toolSetData"
                                                ]
                                              },
                                              {
                                                "type": "string"
                                              }
                                            ]
                                          },
                                          "label": {
                                            "description": "变量展示名称",
                                            "type": "string"
                                          },
                                          "valueType": {
                                            "description": "变量值的数据类型",
                                            "type": "string",
                                            "enum": [
                                              "string",
                                              "number",
                                              "boolean",
                                              "object",
                                              "arrayString",
                                              "arrayNumber",
                                              "arrayBoolean",
                                              "arrayObject",
                                              "arrayAny",
                                              "any",
                                              "chatHistory",
                                              "datasetQuote",
                                              "dynamic",
                                              "selectDataset",
                                              "selectApp"
                                            ]
                                          },
                                          "required": {
                                            "description": "该变量是否必填",
                                            "type": "boolean"
                                          },
                                          "defaultValue": {
                                            "description": "变量默认值",
                                            "type": [
                                              "object",
                                              "array",
                                              "string",
                                              "number",
                                              "boolean",
                                              "null"
                                            ]
                                          },
                                          "referencePlaceholder": {
                                            "description": "引用变量时展示的占位提示",
                                            "type": "string"
                                          },
                                          "isRichText": {
                                            "description": "是否使用富文本编辑器输入",
                                            "type": "boolean"
                                          },
                                          "placeholder": {
                                            "description": "变量输入框占位提示",
                                            "type": "string"
                                          },
                                          "maxLength": {
                                            "description": "文本变量最大输入长度",
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "minLength": {
                                            "description": "文本变量最小输入长度",
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          "markList": {
                                            "description": "数值滑块变量的刻度配置",
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "label": {
                                                  "description": "刻度展示名称",
                                                  "type": "string"
                                                },
                                                "value": {
                                                  "description": "刻度值",
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "label",
                                                "value"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "step": {
                                            "description": "数值变量步进值",
                                            "type": "number"
                                          },
                                          "max": {
                                            "description": "数值变量最大值",
                                            "type": "number"
                                          },
                                          "min": {
                                            "description": "数值变量最小值",
                                            "type": "number"
                                          },
                                          "precision": {
                                            "description": "数值变量小数精度",
                                            "type": "number"
                                          },
                                          "canLocalUpload": {
                                            "description": "该变量是否允许从本地上传文件",
                                            "type": "boolean"
                                          },
                                          "canUrlUpload": {
                                            "description": "该变量是否允许通过 URL 引入文件",
                                            "type": "boolean"
                                          },
                                          "timeGranularity": {
                                            "description": "时间变量的选择粒度",
                                            "type": "string",
                                            "enum": [
                                              "day",
                                              "hour",
                                              "minute",
                                              "second"
                                            ]
                                          },
                                          "timeRangeStart": {
                                            "description": "时间范围变量的起始时间",
                                            "type": "string"
                                          },
                                          "timeRangeEnd": {
                                            "description": "时间范围变量的结束时间",
                                            "type": "string"
                                          },
                                          "datasetOptions": {
                                            "description": "知识库选择变量的可选知识库列表",
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "datasetId": {
                                                  "description": "可选知识库 ID",
                                                  "type": "string"
                                                },
                                                "avatar": {
                                                  "description": "可选知识库头像",
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "description": "可选知识库名称",
                                                  "type": "string"
                                                },
                                                "vectorModel": {
                                                  "type": "object",
                                                  "properties": {
                                                    "modelId": {
                                                      "description": "知识库绑定的向量模型 ID",
                                                      "type": "string"
                                                    },
                                                    "model": {
                                                      "description": "知识库使用的向量模型（兼容历史数据）",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "model"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "error": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "datasetId",
                                                "avatar",
                                                "name",
                                                "vectorModel"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "customInputConfig": {
                                            "description": "变量在编辑器中的自定义输入配置",
                                            "type": "object",
                                            "properties": {
                                              "selectValueTypeList": {
                                                "description": "自定义输入允许选择的数据类型列表",
                                                "type": "array",
                                                "items": {
                                                  "type": "string",
                                                  "enum": [
                                                    "string",
                                                    "number",
                                                    "boolean",
                                                    "object",
                                                    "arrayString",
                                                    "arrayNumber",
                                                    "arrayBoolean",
                                                    "arrayObject",
                                                    "arrayAny",
                                                    "any",
                                                    "chatHistory",
                                                    "datasetQuote",
                                                    "dynamic",
                                                    "selectDataset",
                                                    "selectApp"
                                                  ]
                                                }
                                              },
                                              "showDefaultValue": {
                                                "description": "是否在编辑器中展示默认值配置",
                                                "type": "boolean"
                                              },
                                              "showDescription": {
                                                "description": "是否在编辑器中展示字段说明配置",
                                                "type": "boolean"
                                              },
                                              "hideBottomDivider": {
                                                "description": "是否隐藏变量编辑区域底部分割线",
                                                "type": "boolean"
                                              }
                                            },
                                            "additionalProperties": false
                                          },
                                          "type": {
                                            "description": "变量输入组件类型",
                                            "type": "string",
                                            "enum": [
                                              "input",
                                              "textarea",
                                              "numberInput",
                                              "select",
                                              "multipleSelect",
                                              "timePointSelect",
                                              "timeRangeSelect",
                                              "switch",
                                              "password",
                                              "file",
                                              "llmSelect",
                                              "datasetSelect",
                                              "custom",
                                              "internal"
                                            ]
                                          },
                                          "description": {
                                            "description": "变量用途说明",
                                            "type": "string"
                                          },
                                          "list": {
                                            "description": "选择类变量的可选项",
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "label": {
                                                  "description": "变量选项展示名称",
                                                  "type": "string"
                                                },
                                                "value": {
                                                  "description": "变量选项实际值",
                                                  "type": "string"
                                                },
                                                "icon": {
                                                  "description": "变量选项图标",
                                                  "type": "string"
                                                },
                                                "description": {
                                                  "description": "变量选项说明",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "label",
                                                "value"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "enums": {
                                            "description": "已废弃：旧版枚举变量选项",
                                            "deprecated": true,
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "value": {
                                                  "description": "枚举项实际值",
                                                  "type": "string"
                                                },
                                                "label": {
                                                  "description": "枚举项展示名称",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "value",
                                                "label"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "label",
                                          "type",
                                          "description"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "autoExecute": {
                                      "description": "自动执行配置",
                                      "type": "object",
                                      "properties": {
                                        "open": {
                                          "description": "是否在进入会话后自动触发应用执行",
                                          "type": "boolean"
                                        },
                                        "defaultPrompt": {
                                          "description": "自动执行时注入的默认用户问题",
                                          "default": "",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "open",
                                        "defaultPrompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "questionGuide": {
                                      "description": "问题引导配置",
                                      "type": "object",
                                      "properties": {
                                        "open": {
                                          "description": "是否开启问题引导",
                                          "type": "boolean"
                                        },
                                        "modelId": {
                                          "description": "生成问题引导时使用的模型 ID",
                                          "type": "string"
                                        },
                                        "model": {
                                          "description": "生成问题引导时使用的旧模型标识",
                                          "deprecated": true,
                                          "type": "string"
                                        },
                                        "customPrompt": {
                                          "description": "生成问题引导时追加的自定义提示词",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "open"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "ttsConfig": {
                                      "description": "语音播报配置",
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "description": "语音播报方式：关闭、浏览器播报或模型播报",
                                          "type": "string",
                                          "enum": [
                                            "none",
                                            "web",
                                            "model"
                                          ]
                                        },
                                        "modelId": {
                                          "description": "模型播报时使用的语音模型 ID",
                                          "type": "string"
                                        },
                                        "model": {
                                          "description": "模型播报时使用的语音模型",
                                          "deprecated": true,
                                          "type": "string"
                                        },
                                        "voice": {
                                          "description": "模型播报时使用的音色",
                                          "type": "string"
                                        },
                                        "speed": {
                                          "description": "语音播报速度",
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "whisperConfig": {
                                      "description": "语音输入配置",
                                      "type": "object",
                                      "properties": {
                                        "open": {
                                          "description": "是否开启语音输入识别",
                                          "type": "boolean"
                                        },
                                        "autoSend": {
                                          "default": false,
                                          "description": "语音识别完成后是否自动发送问题",
                                          "type": "boolean"
                                        },
                                        "autoTTSResponse": {
                                          "default": false,
                                          "description": "语音输入后是否自动播报应用回复",
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "open",
                                        "autoSend",
                                        "autoTTSResponse"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "scheduledTriggerConfig": {
                                      "description": "定时触发配置",
                                      "type": "object",
                                      "properties": {
                                        "cronString": {
                                          "description": "定时触发表达式",
                                          "type": "string"
                                        },
                                        "timezone": {
                                          "description": "定时触发使用的时区",
                                          "type": "string"
                                        },
                                        "defaultPrompt": {
                                          "description": "定时触发时注入的默认用户问题",
                                          "default": "",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "cronString",
                                        "timezone",
                                        "defaultPrompt"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "chatInputGuide": {
                                      "description": "对话输入引导配置",
                                      "type": "object",
                                      "properties": {
                                        "open": {
                                          "description": "是否开启对话输入引导",
                                          "type": "boolean"
                                        },
                                        "customUrl": {
                                          "description": "自定义输入引导页面地址",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "open",
                                        "customUrl"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "fileSelectConfig": {
                                      "description": "对话文件选择配置",
                                      "type": "object",
                                      "properties": {
                                        "maxFiles": {
                                          "description": "单次对话允许选择的最大文件数量",
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "canSelectFile": {
                                          "description": "是否允许在对话中选择普通文件",
                                          "type": "boolean"
                                        },
                                        "customPdfParse": {
                                          "description": "是否使用自定义 PDF 解析配置",
                                          "type": "boolean"
                                        },
                                        "canSelectImg": {
                                          "description": "是否允许在对话中选择图片",
                                          "type": "boolean"
                                        },
                                        "canSelectVideo": {
                                          "description": "是否允许在对话中选择视频",
                                          "type": "boolean"
                                        },
                                        "canSelectAudio": {
                                          "description": "是否允许在对话中选择音频",
                                          "type": "boolean"
                                        },
                                        "canSelectCustomFileExtension": {
                                          "description": "是否允许选择自定义扩展名的文件",
                                          "type": "boolean"
                                        },
                                        "customFileExtensionList": {
                                          "description": "允许选择的自定义文件扩展名列表",
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "entryPoints": {
                                      "description": "应用对话页的功能入口列表",
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "icon": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "name"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "instruction": {
                                      "description": "应用对话页展示给用户的使用说明",
                                      "type": "string"
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "chatModels": {
                                  "description": "聊天模型",
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "name": {
                                  "description": "应用名称",
                                  "type": "string",
                                  "minLength": 1
                                },
                                "avatar": {
                                  "description": "应用头像",
                                  "type": "string"
                                },
                                "intro": {
                                  "description": "应用简介",
                                  "type": "string"
                                },
                                "canUse": {
                                  "description": "是否可用",
                                  "type": "boolean"
                                },
                                "type": {
                                  "description": "应用类型",
                                  "type": "string",
                                  "enum": [
                                    "folder",
                                    "toolFolder",
                                    "simple",
                                    "chatAgent",
                                    "advanced",
                                    "plugin",
                                    "toolSet",
                                    "httpToolSet",
                                    "hidden",
                                    "tool",
                                    "httpPlugin"
                                  ]
                                },
                                "pluginInputs": {
                                  "description": "插件输入",
                                  "type": "array",
                                  "items": {
                                    "description": "工作流节点输入配置",
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "description": "变量键名，用于在提示词或工作流中引用该输入",
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "welcomeText",
                                              "welcomeQuestions",
                                              "switch",
                                              "history",
                                              "text",
                                              "questionGuide",
                                              "tts",
                                              "whisper",
                                              "variables",
                                              "scheduleTrigger",
                                              "chatInputGuide",
                                              "autoExecute",
                                              "entryPoints",
                                              "instruction",
                                              "userChatInput",
                                              "inputFiles",
                                              "agents",
                                              "modelId",
                                              "model",
                                              "systemPrompt",
                                              "description",
                                              "system_anyInput",
                                              "system_textareaInput",
                                              "system_addInputParam",
                                              "system_forbid_stream",
                                              "system_header_secret",
                                              "system_input_config",
                                              "maxContext",
                                              "temperature",
                                              "maxToken",
                                              "aiSettings",
                                              "isResponseAnswerText",
                                              "aiChatQuoteRole",
                                              "quoteTemplate",
                                              "quotePrompt",
                                              "quoteQA",
                                              "aiChatVision",
                                              "aiChatAudio",
                                              "aiChatVideo",
                                              "aiChatExtractFiles",
                                              "stringQuoteText",
                                              "aiChatReasoning",
                                              "aiChatReasoningEffort",
                                              "aiChatTopP",
                                              "aiChatStopSign",
                                              "aiChatResponseFormat",
                                              "aiChatJsonSchema",
                                              "agent_selectedTools",
                                              "agent_datasetParams",
                                              "skills",
                                              "useAgentSandbox",
                                              "sandboxEntrypoint",
                                              "editSkillId",
                                              "datasets",
                                              "similarity",
                                              "limit",
                                              "searchMode",
                                              "embeddingWeight",
                                              "usingReRank",
                                              "rerankWeight",
                                              "rerankCandidateNum",
                                              "rerankModelId",
                                              "rerankModel",
                                              "datasetSearchUsingExtensionQuery",
                                              "datasetSearchExtensionModelId",
                                              "datasetSearchExtensionModel",
                                              "datasetSearchExtensionBg",
                                              "datasetSearchInput",
                                              "collectionFilterVersion",
                                              "collectionFilterMatch",
                                              "authTmbId",
                                              "system_datasetQuoteList",
                                              "content",
                                              "extractKeys",
                                              "system_httpReqUrl",
                                              "system_httpHeader",
                                              "system_httpMethod",
                                              "system_httpParams",
                                              "system_httpJsonBody",
                                              "system_httpFormBody",
                                              "system_httpContentType",
                                              "system_httpTimeout",
                                              "url",
                                              "app",
                                              "pluginId",
                                              "pluginStart",
                                              "condition",
                                              "ifElseList",
                                              "updateList",
                                              "code",
                                              "codeType",
                                              "fileUrlList",
                                              "userSelectOptions",
                                              "loopInputArray",
                                              "childrenNodeIdList",
                                              "nodeWidth",
                                              "nodeHeight",
                                              "loopNodeInputHeight",
                                              "loopStartInput",
                                              "loopStartIndex",
                                              "loopEndInput",
                                              "parallelRunMaxConcurrency",
                                              "parallelRunMaxRetryTimes",
                                              "loopRunMode",
                                              "loopRunInputArray",
                                              "loopCustomOutputs",
                                              "userInputForms",
                                              "commentText",
                                              "commentSize",
                                              "system_toolData",
                                              "system_toolSetData"
                                            ]
                                          },
                                          {
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "label": {
                                        "description": "变量展示名称",
                                        "type": "string"
                                      },
                                      "valueType": {
                                        "description": "变量值的数据类型",
                                        "type": "string",
                                        "enum": [
                                          "string",
                                          "number",
                                          "boolean",
                                          "object",
                                          "arrayString",
                                          "arrayNumber",
                                          "arrayBoolean",
                                          "arrayObject",
                                          "arrayAny",
                                          "any",
                                          "chatHistory",
                                          "datasetQuote",
                                          "dynamic",
                                          "selectDataset",
                                          "selectApp"
                                        ]
                                      },
                                      "required": {
                                        "description": "该变量是否必填",
                                        "type": "boolean"
                                      },
                                      "defaultValue": {
                                        "description": "变量默认值",
                                        "type": [
                                          "object",
                                          "array",
                                          "string",
                                          "number",
                                          "boolean",
                                          "null"
                                        ]
                                      },
                                      "referencePlaceholder": {
                                        "description": "引用变量时展示的占位提示",
                                        "type": "string"
                                      },
                                      "isRichText": {
                                        "description": "是否使用富文本编辑器输入",
                                        "type": "boolean"
                                      },
                                      "placeholder": {
                                        "description": "变量输入框占位提示",
                                        "type": "string"
                                      },
                                      "maxLength": {
                                        "description": "文本变量最大输入长度",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "minLength": {
                                        "description": "文本变量最小输入长度",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "markList": {
                                        "description": "数值滑块变量的刻度配置",
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "label": {
                                              "description": "刻度展示名称",
                                              "type": "string"
                                            },
                                            "value": {
                                              "description": "刻度值",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "label",
                                            "value"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "step": {
                                        "description": "数值变量步进值",
                                        "type": "number"
                                      },
                                      "max": {
                                        "description": "数值变量最大值",
                                        "type": "number"
                                      },
                                      "min": {
                                        "description": "数值变量最小值",
                                        "type": "number"
                                      },
                                      "precision": {
                                        "description": "数值变量小数精度",
                                        "type": "number"
                                      },
                                      "canSelectFile": {
                                        "description": "该变量是否允许选择普通文件",
                                        "type": "boolean"
                                      },
                                      "canSelectImg": {
                                        "description": "该变量是否允许选择图片",
                                        "type": "boolean"
                                      },
                                      "canSelectVideo": {
                                        "description": "该变量是否允许选择视频",
                                        "type": "boolean"
                                      },
                                      "canSelectAudio": {
                                        "description": "该变量是否允许选择音频",
                                        "type": "boolean"
                                      },
                                      "canSelectCustomFileExtension": {
                                        "description": "该变量是否允许选择自定义扩展名文件",
                                        "type": "boolean"
                                      },
                                      "customFileExtensionList": {
                                        "description": "该变量允许选择的自定义文件扩展名列表",
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "canLocalUpload": {
                                        "description": "该变量是否允许从本地上传文件",
                                        "type": "boolean"
                                      },
                                      "canUrlUpload": {
                                        "description": "该变量是否允许通过 URL 引入文件",
                                        "type": "boolean"
                                      },
                                      "maxFiles": {
                                        "description": "该变量允许选择的最大文件数量",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "timeGranularity": {
                                        "description": "时间变量的选择粒度",
                                        "type": "string",
                                        "enum": [
                                          "day",
                                          "hour",
                                          "minute",
                                          "second"
                                        ]
                                      },
                                      "timeRangeStart": {
                                        "description": "时间范围变量的起始时间",
                                        "type": "string"
                                      },
                                      "timeRangeEnd": {
                                        "description": "时间范围变量的结束时间",
                                        "type": "string"
                                      },
                                      "datasetOptions": {
                                        "description": "知识库选择变量的可选知识库列表",
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "datasetId": {
                                              "description": "可选知识库 ID",
                                              "type": "string"
                                            },
                                            "avatar": {
                                              "description": "可选知识库头像",
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "可选知识库名称",
                                              "type": "string"
                                            },
                                            "vectorModel": {
                                              "type": "object",
                                              "properties": {
                                                "modelId": {
                                                  "description": "知识库绑定的向量模型 ID",
                                                  "type": "string"
                                                },
                                                "model": {
                                                  "description": "知识库使用的向量模型（兼容历史数据）",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "model"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "error": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "datasetId",
                                            "avatar",
                                            "name",
                                            "vectorModel"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "customInputConfig": {
                                        "description": "变量在编辑器中的自定义输入配置",
                                        "type": "object",
                                        "properties": {
                                          "selectValueTypeList": {
                                            "description": "自定义输入允许选择的数据类型列表",
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "string",
                                                "number",
                                                "boolean",
                                                "object",
                                                "arrayString",
                                                "arrayNumber",
                                                "arrayBoolean",
                                                "arrayObject",
                                                "arrayAny",
                                                "any",
                                                "chatHistory",
                                                "datasetQuote",
                                                "dynamic",
                                                "selectDataset",
                                                "selectApp"
                                              ]
                                            }
                                          },
                                          "showDefaultValue": {
                                            "description": "是否在编辑器中展示默认值配置",
                                            "type": "boolean"
                                          },
                                          "showDescription": {
                                            "description": "是否在编辑器中展示字段说明配置",
                                            "type": "boolean"
                                          },
                                          "hideBottomDivider": {
                                            "description": "是否隐藏变量编辑区域底部分割线",
                                            "type": "boolean"
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "selectedType": {
                                        "description": "多类型输入当前选中的渲染组件类型",
                                        "type": "string",
                                        "enum": [
                                          "reference",
                                          "input",
                                          "textarea",
                                          "numberInput",
                                          "switch",
                                          "select",
                                          "multipleSelect",
                                          "JSONEditor",
                                          "addInputParam",
                                          "customVariable",
                                          "selectApp",
                                          "selectLLMModel",
                                          "settingLLMModel",
                                          "selectDataset",
                                          "selectDatasetParamsModal",
                                          "settingDatasetQuotePrompt",
                                          "hidden",
                                          "custom",
                                          "selectSkill",
                                          "selectTool",
                                          "fileSelect",
                                          "timePointSelect",
                                          "timeRangeSelect",
                                          "password",
                                          "datasetTagFilter",
                                          "off",
                                          "agentGenerated"
                                        ]
                                      },
                                      "renderTypeList": {
                                        "description": "该输入在编辑器中允许使用的渲染组件类型",
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "reference",
                                            "input",
                                            "textarea",
                                            "numberInput",
                                            "switch",
                                            "select",
                                            "multipleSelect",
                                            "JSONEditor",
                                            "addInputParam",
                                            "customVariable",
                                            "selectApp",
                                            "selectLLMModel",
                                            "settingLLMModel",
                                            "selectDataset",
                                            "selectDatasetParamsModal",
                                            "settingDatasetQuotePrompt",
                                            "hidden",
                                            "custom",
                                            "selectSkill",
                                            "selectTool",
                                            "fileSelect",
                                            "timePointSelect",
                                            "timeRangeSelect",
                                            "password",
                                            "datasetTagFilter",
                                            "off",
                                            "agentGenerated"
                                          ]
                                        }
                                      },
                                      "valueDesc": {
                                        "description": "输入值说明，通常用于展示引用值含义",
                                        "type": "string"
                                      },
                                      "value": {
                                        "description": "节点输入当前值",
                                        "type": [
                                          "object",
                                          "array",
                                          "string",
                                          "number",
                                          "boolean",
                                          "null"
                                        ]
                                      },
                                      "debugLabel": {
                                        "description": "调试模式下展示的输入名称",
                                        "type": "string"
                                      },
                                      "description": {
                                        "description": "节点输入说明",
                                        "type": "string"
                                      },
                                      "toolDescription": {
                                        "description": "作为工具调用参数时的语义说明",
                                        "type": "string"
                                      },
                                      "defaultToAgentGenerated": {
                                        "description": "工具输入缺少保存选择时，是否默认由 Agent 生成",
                                        "type": "boolean"
                                      },
                                      "canAgentGenerated": {
                                        "description": "该输入是否允许由 Agent 生成；未设置时按输入组件类型判断",
                                        "type": "boolean"
                                      },
                                      "customJsonSchema": {
                                        "description": "工具参数自定义 JSON Schema 的 property 定义",
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      },
                                      "enum": {
                                        "description": "已废弃：旧版枚举配置",
                                        "type": "string"
                                      },
                                      "inputList": {
                                        "description": "系统输入配置项列表",
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "key": {
                                              "description": "输入配置键名",
                                              "type": "string"
                                            },
                                            "label": {
                                              "description": "输入配置展示名称",
                                              "type": "string"
                                            },
                                            "description": {
                                              "description": "输入配置说明",
                                              "type": "string"
                                            },
                                            "placeholder": {
                                              "description": "输入配置占位提示",
                                              "type": "string"
                                            },
                                            "required": {
                                              "description": "该输入配置是否必填",
                                              "type": "boolean"
                                            },
                                            "inputType": {
                                              "description": "输入配置渲染组件类型",
                                              "type": "string",
                                              "enum": [
                                                "input",
                                                "numberInput",
                                                "secret",
                                                "switch",
                                                "select"
                                              ]
                                            },
                                            "value": {
                                              "description": "输入配置默认值或密钥值",
                                              "anyOf": [
                                                {
                                                  "description": "密钥值类型，使用 value 明文、secret 密文或 ref 工作流变量引用。",
                                                  "example": {
                                                    "secret": "encrypted-value"
                                                  },
                                                  "anyOf": [
                                                    {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "value": {
                                                              "allOf": [
                                                                {
                                                                  "description": "密钥明文值；服务端保存时会加密为 secret",
                                                                  "type": "string"
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "only"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "value"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": ""
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "secret": {
                                                              "allOf": [
                                                                {
                                                                  "description": "已加密或脱敏后的密钥值",
                                                                  "type": "string"
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "only"
                                                              }
                                                            }
                                                          },
                                                          "required": [
                                                            "secret"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": ""
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "ref": {
                                                          "allOf": [
                                                            {
                                                              "description": "工作流变量引用，运行时解析后按目标类型校验。请求头必须为字符串，系统工具参数必须为标量；引用数组仅保留结构兼容，不放宽目标类型要求。",
                                                              "anyOf": [
                                                                {
                                                                  "type": "array",
                                                                  "prefixItems": [
                                                                    {
                                                                      "type": "string",
                                                                      "minLength": 1
                                                                    },
                                                                    {
                                                                      "type": "string",
                                                                      "minLength": 1
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "minItems": 1,
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                      {
                                                                        "type": "string",
                                                                        "minLength": 1
                                                                      },
                                                                      {
                                                                        "type": "string",
                                                                        "minLength": 1
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              ]
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "ref"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    }
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            "list": {
                                              "description": "选择类输入配置的可选项",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "label": {
                                                    "description": "配置项展示名称",
                                                    "type": "string"
                                                  },
                                                  "value": {
                                                    "description": "配置项实际值",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "label",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "key",
                                            "label",
                                            "inputType"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "canEdit": {
                                        "description": "该输入是否允许在编辑器中修改",
                                        "type": "boolean"
                                      },
                                      "isPro": {
                                        "description": "该输入是否为商业版能力",
                                        "type": "boolean"
                                      },
                                      "isToolOutput": {
                                        "description": "该输入是否来自工具输出",
                                        "type": "boolean"
                                      },
                                      "deprecated": {
                                        "description": "该输入是否已废弃",
                                        "type": "boolean"
                                      },
                                      "list": {
                                        "description": "选择类变量的可选项",
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "label": {
                                              "description": "变量选项展示名称",
                                              "type": "string"
                                            },
                                            "value": {
                                              "description": "变量选项实际值",
                                              "type": "string"
                                            },
                                            "icon": {
                                              "description": "变量选项图标",
                                              "type": "string"
                                            },
                                            "description": {
                                              "description": "变量选项说明",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "label",
                                            "value"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "enums": {
                                        "description": "已废弃：旧版枚举变量选项",
                                        "deprecated": true,
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "value": {
                                              "description": "枚举项实际值",
                                              "type": "string"
                                            },
                                            "label": {
                                              "description": "枚举项展示名称",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "value",
                                            "label"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "label",
                                      "renderTypeList"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "useAgentSandbox": {
                                  "description": "是否使用虚拟机",
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "name",
                                "avatar",
                                "intro",
                                "type",
                                "pluginInputs"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "title",
                            "app"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "appId": {
                                  "allOf": [
                                    {
                                      "description": "应用 ID，仅工作流辅助生成会话返回",
                                      "example": "68ee0bd23d17260b7829b137",
                                      "type": "string",
                                      "pattern": "^[0-9a-fA-F]{24}$"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "skillId": {
                                  "allOf": [
                                    {
                                      "not": {}
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "sourceType": {
                                  "allOf": [
                                    {
                                      "description": "工作流辅助生成会话资源类型",
                                      "type": "string",
                                      "const": "workflowBuilder"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                }
                              },
                              "required": [
                                "appId",
                                "sourceType"
                              ],
                              "additionalProperties": false,
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "appId": {
                                  "allOf": [
                                    {
                                      "description": "应用 ID，仅 ChatAgentHelper 会话返回",
                                      "example": "68ee0bd23d17260b7829b137",
                                      "type": "string",
                                      "pattern": "^[0-9a-fA-F]{24}$"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "skillId": {
                                  "allOf": [
                                    {
                                      "not": {}
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "middle"
                                  }
                                },
                                "sourceType": {
                                  "allOf": [
                                    {
                                      "description": "ChatAgentHelper 会话资源类型",
                                      "type": "string",
                                      "const": "chatAgentHelper"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                }
                              },
                              "required": [
                                "appId",
                                "sourceType"
                              ],
                              "additionalProperties": false,
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "appId": {
                                  "allOf": [
                                    {
                                      "description": "应用 ID，仅 App 会话返回",
                                      "example": "68ee0bd23d17260b7829b137",
                                      "type": "string",
                                      "pattern": "^[0-9a-fA-F]{24}$"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "skillId": {
                                  "allOf": [
                                    {
                                      "not": {}
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                }
                              },
                              "required": [
                                "appId"
                              ],
                              "additionalProperties": false,
                              "description": ""
                            },
                            {
                              "type": "object",
                              "properties": {
                                "appId": {
                                  "allOf": [
                                    {
                                      "not": {}
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "first"
                                  }
                                },
                                "skillId": {
                                  "allOf": [
                                    {
                                      "description": "Skill Edit 调试 ID，仅 Skill Edit 会话返回",
                                      "example": "68ee0bd23d17260b7829b137",
                                      "type": "string",
                                      "pattern": "^[0-9a-fA-F]{24}$"
                                    }
                                  ],
                                  "x-fastgpt-union-parameter": {
                                    "label": "",
                                    "position": "last"
                                  }
                                }
                              },
                              "required": [
                                "skillId"
                              ],
                              "additionalProperties": false,
                              "description": ""
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/getPaginationRecords": {
      "post": {
        "summary": "分页获取对话",
        "description": "分页获取指定会话的对话，支持多种鉴权模式",
        "tags": [
          "对话管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "anyOf": [
                              {
                                "title": "按偏移量获取",
                                "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "偏移量，从 0 开始",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "会话 ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "是否加载自定义反馈",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "获取类型，影响数据过滤规则",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "是否包含已删除的记录",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "按页码获取",
                                "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "页码，从 1 开始；传入 offset 时忽略",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "会话 ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "是否加载自定义反馈",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "获取类型，影响数据过滤规则",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "是否包含已删除的记录",
                                    "type": "boolean"
                                  }
                                },
                                "required": []
                              }
                            ]
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              }
                            },
                            "required": [
                              "customUid"
                            ],
                            "allOf": [
                              {
                                "anyOf": [
                                  {
                                    "title": "按偏移量获取",
                                    "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                    "type": "object",
                                    "properties": {
                                      "offset": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "first"
                                        },
                                        "example": 0,
                                        "description": "偏移量，从 0 开始",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "分页参数"
                                            },
                                            "example": 20,
                                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "last"
                                        }
                                      },
                                      "chatId": {
                                        "example": "chat123",
                                        "description": "会话 ID",
                                        "type": "string",
                                        "maxLength": 1024
                                      },
                                      "loadCustomFeedbacks": {
                                        "example": false,
                                        "description": "是否加载自定义反馈",
                                        "type": "boolean"
                                      },
                                      "type": {
                                        "example": "normal",
                                        "description": "获取类型，影响数据过滤规则",
                                        "type": "string",
                                        "enum": [
                                          "normal",
                                          "outLink",
                                          "home"
                                        ]
                                      },
                                      "includeDeleted": {
                                        "example": false,
                                        "description": "是否包含已删除的记录",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "offset"
                                    ]
                                  },
                                  {
                                    "title": "按页码获取",
                                    "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                    "type": "object",
                                    "properties": {
                                      "pageNum": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "first"
                                        },
                                        "example": 1,
                                        "description": "页码，从 1 开始；传入 offset 时忽略",
                                        "default": 1,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "分页参数"
                                            },
                                            "example": 20,
                                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "last"
                                        }
                                      },
                                      "chatId": {
                                        "example": "chat123",
                                        "description": "会话 ID",
                                        "type": "string",
                                        "maxLength": 1024
                                      },
                                      "loadCustomFeedbacks": {
                                        "example": false,
                                        "description": "是否加载自定义反馈",
                                        "type": "boolean"
                                      },
                                      "type": {
                                        "example": "normal",
                                        "description": "获取类型，影响数据过滤规则",
                                        "type": "string",
                                        "enum": [
                                          "normal",
                                          "outLink",
                                          "home"
                                        ]
                                      },
                                      "includeDeleted": {
                                        "example": false,
                                        "description": "是否包含已删除的记录",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": []
                                  }
                                ]
                              },
                              {}
                            ],
                            "x-fastgpt-union-layout": true
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key 代理调用身份。仅开启 authProxy 的个人密钥可用；按团队成员 ID 或用户名指定，二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              }
                            },
                            "required": [
                              "authProxy"
                            ],
                            "allOf": [
                              {
                                "anyOf": [
                                  {
                                    "title": "按偏移量获取",
                                    "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                    "type": "object",
                                    "properties": {
                                      "offset": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "first"
                                        },
                                        "example": 0,
                                        "description": "偏移量，从 0 开始",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "分页参数"
                                            },
                                            "example": 20,
                                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "last"
                                        }
                                      },
                                      "chatId": {
                                        "example": "chat123",
                                        "description": "会话 ID",
                                        "type": "string",
                                        "maxLength": 1024
                                      },
                                      "loadCustomFeedbacks": {
                                        "example": false,
                                        "description": "是否加载自定义反馈",
                                        "type": "boolean"
                                      },
                                      "type": {
                                        "example": "normal",
                                        "description": "获取类型，影响数据过滤规则",
                                        "type": "string",
                                        "enum": [
                                          "normal",
                                          "outLink",
                                          "home"
                                        ]
                                      },
                                      "includeDeleted": {
                                        "example": false,
                                        "description": "是否包含已删除的记录",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "offset"
                                    ]
                                  },
                                  {
                                    "title": "按页码获取",
                                    "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                    "type": "object",
                                    "properties": {
                                      "pageNum": {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "first"
                                        },
                                        "example": 1,
                                        "description": "页码，从 1 开始；传入 offset 时忽略",
                                        "default": 1,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "pageSize": {
                                        "allOf": [
                                          {
                                            "x-fastgpt-union-group": {
                                              "id": "pagination",
                                              "label": "分页参数"
                                            },
                                            "example": 20,
                                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                            "default": 20,
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 500
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "分页参数",
                                          "position": "last"
                                        }
                                      },
                                      "chatId": {
                                        "example": "chat123",
                                        "description": "会话 ID",
                                        "type": "string",
                                        "maxLength": 1024
                                      },
                                      "loadCustomFeedbacks": {
                                        "example": false,
                                        "description": "是否加载自定义反馈",
                                        "type": "boolean"
                                      },
                                      "type": {
                                        "example": "normal",
                                        "description": "获取类型，影响数据过滤规则",
                                        "type": "string",
                                        "enum": [
                                          "normal",
                                          "outLink",
                                          "home"
                                        ]
                                      },
                                      "includeDeleted": {
                                        "example": false,
                                        "description": "是否包含已删除的记录",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": []
                                  }
                                ]
                              },
                              {}
                            ],
                            "x-fastgpt-union-layout": true
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill 调试会话",
                    "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "skillId"
                    ],
                    "allOf": [
                      {
                        "allOf": [
                          {
                            "title": "Skill 调试会话",
                            "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                            "type": "object",
                            "properties": {},
                            "required": []
                          },
                          {
                            "anyOf": [
                              {
                                "title": "按偏移量获取",
                                "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "偏移量，从 0 开始",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "会话 ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "是否加载自定义反馈",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "获取类型，影响数据过滤规则",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "是否包含已删除的记录",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "按页码获取",
                                "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "页码，从 1 开始；传入 offset 时忽略",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "会话 ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "是否加载自定义反馈",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "获取类型，影响数据过滤规则",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "是否包含已删除的记录",
                                    "type": "boolean"
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权数据，包含 shareId/outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "outLinkAuthData"
                    ],
                    "allOf": [
                      {
                        "allOf": [
                          {
                            "title": "外链会话",
                            "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                            "type": "object",
                            "properties": {},
                            "required": []
                          },
                          {
                            "anyOf": [
                              {
                                "title": "按偏移量获取",
                                "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "偏移量，从 0 开始",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "会话 ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "是否加载自定义反馈",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "获取类型，影响数据过滤规则",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "是否包含已删除的记录",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "按页码获取",
                                "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "页码，从 1 开始；传入 offset 时忽略",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "会话 ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "是否加载自定义反馈",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "获取类型，影响数据过滤规则",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "是否包含已删除的记录",
                                    "type": "boolean"
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "anyOf": [
                          {
                            "title": "按偏移量获取",
                            "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                            "type": "object",
                            "properties": {
                              "offset": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "分页参数"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "first"
                                },
                                "example": 0,
                                "description": "偏移量，从 0 开始",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "example": 20,
                                    "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "last"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "loadCustomFeedbacks": {
                                "example": false,
                                "description": "是否加载自定义反馈",
                                "type": "boolean"
                              },
                              "type": {
                                "example": "normal",
                                "description": "获取类型，影响数据过滤规则",
                                "type": "string",
                                "enum": [
                                  "normal",
                                  "outLink",
                                  "home"
                                ]
                              },
                              "includeDeleted": {
                                "example": false,
                                "description": "是否包含已删除的记录",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "offset"
                            ]
                          },
                          {
                            "title": "按页码获取",
                            "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                            "type": "object",
                            "properties": {
                              "pageNum": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "分页参数"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "first"
                                },
                                "example": 1,
                                "description": "页码，从 1 开始；传入 offset 时忽略",
                                "default": 1,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "example": 20,
                                    "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "last"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "loadCustomFeedbacks": {
                                "example": false,
                                "description": "是否加载自定义反馈",
                                "type": "boolean"
                              },
                              "type": {
                                "example": "normal",
                                "description": "获取类型，影响数据过滤规则",
                                "type": "string",
                                "enum": [
                                  "normal",
                                  "outLink",
                                  "home"
                                ]
                              },
                              "includeDeleted": {
                                "example": false,
                                "description": "是否包含已删除的记录",
                                "type": "boolean"
                              }
                            },
                            "required": []
                          }
                        ]
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "customUid"
                        ],
                        "allOf": [
                          {
                            "anyOf": [
                              {
                                "title": "按偏移量获取",
                                "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                                "type": "object",
                                "properties": {
                                  "offset": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 0,
                                    "description": "偏移量，从 0 开始",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "会话 ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "是否加载自定义反馈",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "获取类型，影响数据过滤规则",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "是否包含已删除的记录",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "offset"
                                ]
                              },
                              {
                                "title": "按页码获取",
                                "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                                "type": "object",
                                "properties": {
                                  "pageNum": {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "first"
                                    },
                                    "example": 1,
                                    "description": "页码，从 1 开始；传入 offset 时忽略",
                                    "default": 1,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "pageSize": {
                                    "allOf": [
                                      {
                                        "x-fastgpt-union-group": {
                                          "id": "pagination",
                                          "label": "分页参数"
                                        },
                                        "example": 20,
                                        "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                        "default": 20,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 500
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "分页参数",
                                      "position": "last"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "会话 ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "是否加载自定义反馈",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "获取类型，影响数据过滤规则",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "是否包含已删除的记录",
                                    "type": "boolean"
                                  }
                                },
                                "required": []
                              }
                            ]
                          },
                          {}
                        ],
                        "x-fastgpt-union-layout": true
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "offset": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回对话",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          },
                          "description": "对话列表",
                          "type": "array"
                        },
                        "total": {
                          "example": 10,
                          "description": "总数",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "list",
                        "total"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/getRecords_v2": {
      "post": {
        "summary": "根据锚点获取对话",
        "description": "默认读取最新消息，按时间正序返回。prevId、nextId、initialId 三选一，也可均不传；角色由方向确定，prevId 定位 Human，nextId 和 initialId 定位 AI。将 prevCursor/nextCursor 直接传入 prevId/nextId；无对应方向的下一页时为 null。为补齐轮次边界，返回条数可能略超 pageSize。支持多种鉴权模式。",
        "tags": [
          "对话管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "not": {
                  "required": [
                    "role"
                  ]
                },
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "title": "应用会话",
                        "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                        "properties": {
                          "appId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a05",
                                "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "first"
                            }
                          },
                          "sourceType": {
                            "allOf": [
                              {
                                "example": "chatAgentHelper",
                                "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                                "type": "string",
                                "enum": [
                                  "app",
                                  "chatAgentHelper",
                                  "workflowBuilder"
                                ]
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "last"
                            }
                          }
                        },
                        "required": [
                          "appId"
                        ],
                        "allOf": [
                          {
                            "anyOf": [
                              {
                                "title": "默认身份",
                                "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                                "type": "object",
                                "properties": {
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "会话 ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "是否加载自定义反馈",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "获取类型，影响数据过滤规则",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "是否包含已删除的记录",
                                    "type": "boolean"
                                  }
                                },
                                "required": []
                              },
                              {
                                "title": "自定义使用者",
                                "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                                "type": "object",
                                "properties": {
                                  "customUid": {
                                    "allOf": [
                                      {
                                        "example": "customer-42",
                                        "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1024
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "only"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "会话 ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "是否加载自定义反馈",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "获取类型，影响数据过滤规则",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "是否包含已删除的记录",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "customUid"
                                ]
                              },
                              {
                                "title": "代理团队成员",
                                "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                                "type": "object",
                                "properties": {
                                  "authProxy": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "description": "API Key 代理调用身份。仅开启 authProxy 的个人密钥可用；按团队成员 ID 或用户名指定，二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                        "anyOf": [
                                          {
                                            "title": "按团队成员 ID",
                                            "type": "object",
                                            "properties": {
                                              "tmbId": {
                                                "allOf": [
                                                  {
                                                    "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                    "example": "68ee0bd23d17260b7829b137",
                                                    "type": "string",
                                                    "pattern": "^[0-9a-fA-F]{24}$"
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "only"
                                                }
                                              }
                                            },
                                            "required": [
                                              "tmbId"
                                            ],
                                            "description": ""
                                          },
                                          {
                                            "title": "按用户名",
                                            "type": "object",
                                            "properties": {
                                              "username": {
                                                "allOf": [
                                                  {
                                                    "example": "user@example.com",
                                                    "description": "API Key 代理调用的团队成员用户名",
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 128
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "only"
                                                }
                                              }
                                            },
                                            "required": [
                                              "username"
                                            ],
                                            "description": ""
                                          }
                                        ]
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "only"
                                    }
                                  },
                                  "chatId": {
                                    "example": "chat123",
                                    "description": "会话 ID",
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "loadCustomFeedbacks": {
                                    "example": false,
                                    "description": "是否加载自定义反馈",
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "example": "normal",
                                    "description": "获取类型，影响数据过滤规则",
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "outLink",
                                      "home"
                                    ]
                                  },
                                  "includeDeleted": {
                                    "example": false,
                                    "description": "是否包含已删除的记录",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "authProxy"
                                ]
                              }
                            ]
                          },
                          {}
                        ],
                        "x-fastgpt-union-layout": true
                      },
                      {
                        "title": "Skill 调试会话",
                        "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                        "type": "object",
                        "properties": {
                          "skillId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a06",
                                "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "example": "chat123",
                            "description": "会话 ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "loadCustomFeedbacks": {
                            "example": false,
                            "description": "是否加载自定义反馈",
                            "type": "boolean"
                          },
                          "type": {
                            "example": "normal",
                            "description": "获取类型，影响数据过滤规则",
                            "type": "string",
                            "enum": [
                              "normal",
                              "outLink",
                              "home"
                            ]
                          },
                          "includeDeleted": {
                            "example": false,
                            "description": "是否包含已删除的记录",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "skillId"
                        ]
                      },
                      {
                        "title": "外链会话",
                        "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                        "type": "object",
                        "properties": {
                          "outLinkAuthData": {
                            "allOf": [
                              {
                                "description": "外链鉴权数据，包含 shareId/outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                                "type": "object",
                                "properties": {
                                  "shareId": {
                                    "description": "分享链接ID",
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "outLinkUid": {
                                    "description": "外链用户ID",
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "shareId",
                                  "outLinkUid"
                                ]
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "example": "chat123",
                            "description": "会话 ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "loadCustomFeedbacks": {
                            "example": false,
                            "description": "是否加载自定义反馈",
                            "type": "boolean"
                          },
                          "type": {
                            "example": "normal",
                            "description": "获取类型，影响数据过滤规则",
                            "type": "string",
                            "enum": [
                              "normal",
                              "outLink",
                              "home"
                            ]
                          },
                          "includeDeleted": {
                            "example": false,
                            "description": "是否包含已删除的记录",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "outLinkAuthData"
                        ]
                      },
                      {
                        "title": "应用 API Key（无需 appId）",
                        "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "example": "chat123",
                                "description": "会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "loadCustomFeedbacks": {
                                "example": false,
                                "description": "是否加载自定义反馈",
                                "type": "boolean"
                              },
                              "type": {
                                "example": "normal",
                                "description": "获取类型，影响数据过滤规则",
                                "type": "string",
                                "enum": [
                                  "normal",
                                  "outLink",
                                  "home"
                                ]
                              },
                              "includeDeleted": {
                                "example": false,
                                "description": "是否包含已删除的记录",
                                "type": "boolean"
                              }
                            },
                            "required": []
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "loadCustomFeedbacks": {
                                "example": false,
                                "description": "是否加载自定义反馈",
                                "type": "boolean"
                              },
                              "type": {
                                "example": "normal",
                                "description": "获取类型，影响数据过滤规则",
                                "type": "string",
                                "enum": [
                                  "normal",
                                  "outLink",
                                  "home"
                                ]
                              },
                              "includeDeleted": {
                                "example": false,
                                "description": "是否包含已删除的记录",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "customUid"
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "prevId",
                            "nextId"
                          ]
                        },
                        {
                          "required": [
                            "prevId",
                            "initialId"
                          ]
                        },
                        {
                          "required": [
                            "nextId",
                            "initialId"
                          ]
                        }
                      ]
                    },
                    "anyOf": [
                      {
                        "title": "向前翻页",
                        "type": "object",
                        "properties": {
                          "prevId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a04",
                                "description": "向前翻页的游标 ID",
                                "type": "string"
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "pageSize": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "example": 20,
                            "description": "每页参考消息条数，默认 20，最多 500；为补齐轮次边界，实际返回条数可能略超",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          },
                          "anchor": {
                            "type": [
                              "object",
                              "array",
                              "string",
                              "number",
                              "boolean",
                              "null"
                            ],
                            "description": "当前锚点（如 chunkIndex）"
                          }
                        },
                        "required": [
                          "prevId"
                        ],
                        "description": ""
                      },
                      {
                        "title": "向后翻页",
                        "type": "object",
                        "properties": {
                          "nextId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a06",
                                "description": "向后翻页的游标 ID",
                                "type": "string"
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "pageSize": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "example": 20,
                            "description": "每页参考消息条数，默认 20，最多 500；为补齐轮次边界，实际返回条数可能略超",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          },
                          "anchor": {
                            "type": [
                              "object",
                              "array",
                              "string",
                              "number",
                              "boolean",
                              "null"
                            ],
                            "description": "当前锚点（如 chunkIndex）"
                          }
                        },
                        "required": [
                          "nextId"
                        ],
                        "description": ""
                      },
                      {
                        "title": "定位记录",
                        "type": "object",
                        "properties": {
                          "initialId": {
                            "allOf": [
                              {
                                "example": "68ad85a7463006c963799a05",
                                "description": "初始定位数据 ID",
                                "type": "string"
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "pageSize": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "example": 20,
                            "description": "每页参考消息条数，默认 20，最多 500；为补齐轮次边界，实际返回条数可能略超",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          },
                          "anchor": {
                            "type": [
                              "object",
                              "array",
                              "string",
                              "number",
                              "boolean",
                              "null"
                            ],
                            "description": "当前锚点（如 chunkIndex）"
                          }
                        },
                        "required": [
                          "initialId"
                        ],
                        "description": ""
                      },
                      {
                        "title": "默认页",
                        "type": "object",
                        "properties": {
                          "pageSize": {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "example": 20,
                            "description": "每页参考消息条数，默认 20，最多 500；为补齐轮次边界，实际返回条数可能略超",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          },
                          "anchor": {
                            "type": [
                              "object",
                              "array",
                              "string",
                              "number",
                              "boolean",
                              "null"
                            ],
                            "description": "当前锚点（如 chunkIndex）"
                          }
                        }
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "prevId": "68ad85a7463006c963799a04"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回对话",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "hasMorePrev": {
                          "example": false,
                          "description": "是否还有更多前置数据",
                          "type": "boolean"
                        },
                        "hasMoreNext": {
                          "example": true,
                          "description": "是否还有更多后置数据",
                          "type": "boolean"
                        },
                        "list": {
                          "description": "聊天记录列表，业务标识使用 dataId",
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "obj": {
                                    "allOf": [
                                      {
                                        "type": "string",
                                        "const": "Human"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "value": {
                                    "allOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "askId": {
                                              "deprecated": true,
                                              "description": "旧版用户回复的交互关联 ID，保留兼容，新消息不再写入",
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "select": {
                                              "oneOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "allOf": [
                                                        {
                                                          "description": "问答输入类型",
                                                          "type": "string",
                                                          "const": "agentAsk"
                                                        }
                                                      ],
                                                      "x-fastgpt-union-parameter": {
                                                        "label": "",
                                                        "position": "first"
                                                      }
                                                    },
                                                    "questions": {
                                                      "allOf": [
                                                        {
                                                          "description": "按题目顺序保存的用户回答",
                                                          "minItems": 1,
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "question": {
                                                                "description": "提问时的问题快照",
                                                                "type": "string"
                                                              },
                                                              "value": {
                                                                "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "question",
                                                              "value"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        }
                                                      ],
                                                      "x-fastgpt-union-parameter": {
                                                        "label": "",
                                                        "position": "last"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "questions"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": ""
                                                },
                                                {
                                                  "oneOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "workflowBuilderPreview"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        },
                                                        "action": {
                                                          "allOf": [
                                                            {
                                                              "description": "确认方案并开始搭建",
                                                              "type": "string",
                                                              "const": "confirm"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "action"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "workflowBuilderPreview"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        },
                                                        "action": {
                                                          "allOf": [
                                                            {
                                                              "description": "取消本次搭建",
                                                              "type": "string",
                                                              "const": "cancel"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "action"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "workflowBuilderPreview"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "only"
                                                          }
                                                        },
                                                        "action": {
                                                          "allOf": [
                                                            {
                                                              "description": "修改方案",
                                                              "type": "string",
                                                              "const": "revise"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "reviseText": {
                                                          "allOf": [
                                                            {
                                                              "description": "修改方案的具体意见，不能为空",
                                                              "type": "string",
                                                              "minLength": 1
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "action",
                                                        "reviseText"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    }
                                                  ],
                                                  "type": "object"
                                                }
                                              ],
                                              "type": "object"
                                            },
                                            "text": {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "file": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "image",
                                                    "audio",
                                                    "video",
                                                    "document",
                                                    "unknown",
                                                    "file"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "key": {
                                                  "type": "string"
                                                },
                                                "url": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "url"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "additionalProperties": false
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "hideInUI": {
                                    "allOf": [
                                      {
                                        "type": "boolean"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "useAgentSandbox": {
                                    "type": "boolean"
                                  },
                                  "totalQuoteList": {
                                    "type": "array",
                                    "items": {
                                      "anyOf": [
                                        {
                                          "description": "搜索数据响应项",
                                          "type": "object",
                                          "properties": {
                                            "q": {
                                              "allOf": [
                                                {
                                                  "description": "问题/主文本",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "first"
                                              }
                                            },
                                            "a": {
                                              "allOf": [
                                                {
                                                  "description": "回答/补充文本",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageId": {
                                              "allOf": [
                                                {
                                                  "description": "图片 ID",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imagePreivewUrl": {
                                              "allOf": [
                                                {
                                                  "description": "图片预览 URL",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "updateTime": {
                                              "allOf": [
                                                {
                                                  "description": "更新时间",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexStatus": {
                                              "allOf": [
                                                {
                                                  "description": "索引状态，字段缺失表示已索引的历史数据",
                                                  "type": "string",
                                                  "enum": [
                                                    "indexing",
                                                    "indexed",
                                                    "error",
                                                    "rebuildIndexPending",
                                                    "rebuildIndexRunning",
                                                    "rebuildIndexFailed",
                                                    "rebuildSynonymPending",
                                                    "rebuildSynonymRunning",
                                                    "rebuildSynonymFailed"
                                                  ]
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexErrorMsg": {
                                              "allOf": [
                                                {
                                                  "description": "索引错误信息",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageDescMap": {
                                              "allOf": [
                                                {
                                                  "description": "图片描述映射",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "metadata": {
                                              "allOf": [
                                                {
                                                  "description": "自定义元数据",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {}
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "synonymMappings": {
                                              "allOf": [
                                                {
                                                  "description": "分块或用户问题中出现的原词到标准词映射",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "last"
                                              }
                                            },
                                            "id": {
                                              "description": "数据 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "datasetId": {
                                              "description": "数据集 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "集合 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceName": {
                                              "description": "来源名称",
                                              "type": "string"
                                            },
                                            "sourceId": {
                                              "description": "来源 ID",
                                              "type": "string"
                                            },
                                            "chunkIndex": {
                                              "description": "块索引",
                                              "type": "number"
                                            },
                                            "score": {
                                              "description": "评分列表",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "评分类型",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "评分值",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "索引",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "检索排名",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "q",
                                            "id",
                                            "datasetId",
                                            "collectionId",
                                            "updateTime",
                                            "sourceName",
                                            "chunkIndex",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "description": "搜索数据引用响应项（精简）",
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "description": "数据 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "chunkIndex": {
                                              "description": "块索引",
                                              "type": "number"
                                            },
                                            "datasetId": {
                                              "description": "数据集 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "集合 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceId": {
                                              "description": "来源 ID",
                                              "type": "string"
                                            },
                                            "sourceName": {
                                              "description": "来源名称",
                                              "type": "string"
                                            },
                                            "score": {
                                              "description": "评分列表",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "评分类型",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "评分值",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "索引",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "检索排名",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "chunkIndex",
                                            "datasetId",
                                            "collectionId",
                                            "sourceName",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  },
                                  "toolCiteLinks": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "errorText": {
                                    "type": "object",
                                    "properties": {
                                      "moduleName": {
                                        "type": "string"
                                      },
                                      "errorText": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "moduleName",
                                      "errorText"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "llmModuleAccount": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "historyPreviewLength": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "_id": {
                                    "example": "68ee0bd23d17260b7829b137",
                                    "description": "ObjectId",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  "dataId": {
                                    "description": "聊天业务标识，用于消息详情、反馈及轮次关联，推荐使用此字段",
                                    "type": "string"
                                  },
                                  "id": {
                                    "deprecated": true,
                                    "description": "兼容旧客户端的 dataId 别名；已弃用，请使用 dataId",
                                    "type": "string"
                                  },
                                  "time": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "obj",
                                  "value",
                                  "dataId"
                                ],
                                "additionalProperties": {},
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "obj": {
                                    "allOf": [
                                      {
                                        "type": "string",
                                        "const": "System"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "value": {
                                    "allOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "content": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "content"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "additionalProperties": false
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "useAgentSandbox": {
                                    "type": "boolean"
                                  },
                                  "totalQuoteList": {
                                    "type": "array",
                                    "items": {
                                      "anyOf": [
                                        {
                                          "description": "搜索数据响应项",
                                          "type": "object",
                                          "properties": {
                                            "q": {
                                              "allOf": [
                                                {
                                                  "description": "问题/主文本",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "first"
                                              }
                                            },
                                            "a": {
                                              "allOf": [
                                                {
                                                  "description": "回答/补充文本",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageId": {
                                              "allOf": [
                                                {
                                                  "description": "图片 ID",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imagePreivewUrl": {
                                              "allOf": [
                                                {
                                                  "description": "图片预览 URL",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "updateTime": {
                                              "allOf": [
                                                {
                                                  "description": "更新时间",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexStatus": {
                                              "allOf": [
                                                {
                                                  "description": "索引状态，字段缺失表示已索引的历史数据",
                                                  "type": "string",
                                                  "enum": [
                                                    "indexing",
                                                    "indexed",
                                                    "error",
                                                    "rebuildIndexPending",
                                                    "rebuildIndexRunning",
                                                    "rebuildIndexFailed",
                                                    "rebuildSynonymPending",
                                                    "rebuildSynonymRunning",
                                                    "rebuildSynonymFailed"
                                                  ]
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexErrorMsg": {
                                              "allOf": [
                                                {
                                                  "description": "索引错误信息",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageDescMap": {
                                              "allOf": [
                                                {
                                                  "description": "图片描述映射",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "metadata": {
                                              "allOf": [
                                                {
                                                  "description": "自定义元数据",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {}
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "synonymMappings": {
                                              "allOf": [
                                                {
                                                  "description": "分块或用户问题中出现的原词到标准词映射",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "last"
                                              }
                                            },
                                            "id": {
                                              "description": "数据 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "datasetId": {
                                              "description": "数据集 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "集合 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceName": {
                                              "description": "来源名称",
                                              "type": "string"
                                            },
                                            "sourceId": {
                                              "description": "来源 ID",
                                              "type": "string"
                                            },
                                            "chunkIndex": {
                                              "description": "块索引",
                                              "type": "number"
                                            },
                                            "score": {
                                              "description": "评分列表",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "评分类型",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "评分值",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "索引",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "检索排名",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "q",
                                            "id",
                                            "datasetId",
                                            "collectionId",
                                            "updateTime",
                                            "sourceName",
                                            "chunkIndex",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "description": "搜索数据引用响应项（精简）",
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "description": "数据 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "chunkIndex": {
                                              "description": "块索引",
                                              "type": "number"
                                            },
                                            "datasetId": {
                                              "description": "数据集 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "集合 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceId": {
                                              "description": "来源 ID",
                                              "type": "string"
                                            },
                                            "sourceName": {
                                              "description": "来源名称",
                                              "type": "string"
                                            },
                                            "score": {
                                              "description": "评分列表",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "评分类型",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "评分值",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "索引",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "检索排名",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "chunkIndex",
                                            "datasetId",
                                            "collectionId",
                                            "sourceName",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  },
                                  "toolCiteLinks": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "errorText": {
                                    "type": "object",
                                    "properties": {
                                      "moduleName": {
                                        "type": "string"
                                      },
                                      "errorText": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "moduleName",
                                      "errorText"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "llmModuleAccount": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "historyPreviewLength": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "_id": {
                                    "example": "68ee0bd23d17260b7829b137",
                                    "description": "ObjectId",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  "dataId": {
                                    "description": "聊天业务标识，用于消息详情、反馈及轮次关联，推荐使用此字段",
                                    "type": "string"
                                  },
                                  "id": {
                                    "deprecated": true,
                                    "description": "兼容旧客户端的 dataId 别名；已弃用，请使用 dataId",
                                    "type": "string"
                                  },
                                  "time": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "obj",
                                  "value",
                                  "dataId"
                                ],
                                "additionalProperties": {},
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "obj": {
                                    "allOf": [
                                      {
                                        "type": "string",
                                        "const": "AI"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "value": {
                                    "allOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "userMessage": {
                                              "description": "服务端追加的隐藏 User 指令，按原顺序恢复，不重置历史",
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "type": "string"
                                                },
                                                "source": {
                                                  "type": "string",
                                                  "const": "server"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "source"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "inputContext": {
                                              "description": "本轮实际消费的 Human 改写输入，保留技能、时间、文件等上下文，不保存历史快照",
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "oneOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "select"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "select": {
                                                                "allOf": [
                                                                  {
                                                                    "oneOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "问答输入类型",
                                                                                "type": "string",
                                                                                "const": "agentAsk"
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "first"
                                                                            }
                                                                          },
                                                                          "questions": {
                                                                            "allOf": [
                                                                              {
                                                                                "description": "按题目顺序保存的用户回答",
                                                                                "minItems": 1,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "type": "object",
                                                                                  "properties": {
                                                                                    "question": {
                                                                                      "description": "提问时的问题快照",
                                                                                      "type": "string"
                                                                                    },
                                                                                    "value": {
                                                                                      "description": "用户回答内容：选项文本或自定义回答；空字符串表示跳过",
                                                                                      "type": "string"
                                                                                    }
                                                                                  },
                                                                                  "required": [
                                                                                    "question",
                                                                                    "value"
                                                                                  ],
                                                                                  "additionalProperties": false
                                                                                }
                                                                              }
                                                                            ],
                                                                            "x-fastgpt-union-parameter": {
                                                                              "label": "",
                                                                              "position": "last"
                                                                            }
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "questions"
                                                                        ],
                                                                        "additionalProperties": false,
                                                                        "description": ""
                                                                      },
                                                                      {
                                                                        "oneOf": [
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "type": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "type": "string",
                                                                                    "const": "workflowBuilderPreview"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "only"
                                                                                }
                                                                              },
                                                                              "action": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "description": "确认方案并开始搭建",
                                                                                    "type": "string",
                                                                                    "const": "confirm"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "only"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "type",
                                                                              "action"
                                                                            ],
                                                                            "additionalProperties": false,
                                                                            "description": ""
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "type": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "type": "string",
                                                                                    "const": "workflowBuilderPreview"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "only"
                                                                                }
                                                                              },
                                                                              "action": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "description": "取消本次搭建",
                                                                                    "type": "string",
                                                                                    "const": "cancel"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "only"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "type",
                                                                              "action"
                                                                            ],
                                                                            "additionalProperties": false,
                                                                            "description": ""
                                                                          },
                                                                          {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "type": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "type": "string",
                                                                                    "const": "workflowBuilderPreview"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "only"
                                                                                }
                                                                              },
                                                                              "action": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "description": "修改方案",
                                                                                    "type": "string",
                                                                                    "const": "revise"
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "first"
                                                                                }
                                                                              },
                                                                              "reviseText": {
                                                                                "allOf": [
                                                                                  {
                                                                                    "description": "修改方案的具体意见，不能为空",
                                                                                    "type": "string",
                                                                                    "minLength": 1
                                                                                  }
                                                                                ],
                                                                                "x-fastgpt-union-parameter": {
                                                                                  "label": "",
                                                                                  "position": "last"
                                                                                }
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "type",
                                                                              "action",
                                                                              "reviseText"
                                                                            ],
                                                                            "additionalProperties": false,
                                                                            "description": ""
                                                                          }
                                                                        ],
                                                                        "type": "object"
                                                                      }
                                                                    ],
                                                                    "type": "object"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "select"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "image_url"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "image_url": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "url": {
                                                                        "type": "string"
                                                                      },
                                                                      "detail": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "auto",
                                                                          "low",
                                                                          "high"
                                                                        ]
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "url"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "input_audio"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "input_audio": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "data": {
                                                                        "type": "string"
                                                                      },
                                                                      "format": {
                                                                        "description": "已知音频格式；未知时省略，由模型接口处理音频内容",
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "mp3",
                                                                          "wav",
                                                                          "ogg",
                                                                          "m4a",
                                                                          "amr",
                                                                          "mpga"
                                                                        ]
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "data"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "input_audio"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "video_url"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "video_url": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "url": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "url"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "video_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "file"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "file": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "file_data": {
                                                                        "type": "string"
                                                                      },
                                                                      "file_id": {
                                                                        "type": "string"
                                                                      },
                                                                      "filename": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    "additionalProperties": false
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "file"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "file_url"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "name": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "url": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "middle"
                                                                }
                                                              },
                                                              "fileType": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "audio",
                                                                      "video",
                                                                      "document",
                                                                      "unknown",
                                                                      "file"
                                                                    ]
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          }
                                                        ],
                                                        "type": "object"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "id": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "modelResponseId": {
                                              "description": "本次模型响应的稳定关联 ID",
                                              "type": "string"
                                            },
                                            "toolCallIds": {
                                              "description": "本次响应的工具调用原始顺序，含交互工具",
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "displayOnly": {
                                              "description": "子工具展示输出，不进入父模型上下文",
                                              "type": "boolean"
                                            },
                                            "toolResponses": {
                                              "description": "子工具续跑产生的实际结果，补齐原调用，不创建新调用",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "id": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "response": {
                                                    "type": "string"
                                                  },
                                                  "content": {
                                                    "description": "子工具恢复时返回给模型的结构化内容",
                                                    "type": "array",
                                                    "items": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "allOf": [
                                                                {
                                                                  "type": "string",
                                                                  "const": "text"
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "first"
                                                              }
                                                            },
                                                            "text": {
                                                              "allOf": [
                                                                {
                                                                  "type": "string"
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "last"
                                                              }
                                                            },
                                                            "key": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "text"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": ""
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "allOf": [
                                                                {
                                                                  "type": "string",
                                                                  "const": "image_url"
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "first"
                                                              }
                                                            },
                                                            "image_url": {
                                                              "allOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "url": {
                                                                      "type": "string"
                                                                    },
                                                                    "detail": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "auto",
                                                                        "low",
                                                                        "high"
                                                                      ]
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "url"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ],
                                                              "x-fastgpt-union-parameter": {
                                                                "label": "",
                                                                "position": "last"
                                                              }
                                                            },
                                                            "key": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "image_url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": ""
                                                        }
                                                      ]
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "response"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "askId": {
                                              "deprecated": true,
                                              "description": "旧版 Ask 关联字段，新消息停止写入",
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "text": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "content": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "content"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "reasoning": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "content": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "content"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "tools": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "id": {
                                                        "type": "string"
                                                      },
                                                      "toolName": {
                                                        "type": "string"
                                                      },
                                                      "toolAvatar": {
                                                        "type": "string"
                                                      },
                                                      "params": {
                                                        "type": "string"
                                                      },
                                                      "response": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "content": {
                                                        "description": "工具实际返回给模型的结构化内容",
                                                        "type": "array",
                                                        "items": {
                                                          "anyOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "type": {
                                                                  "allOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "const": "text"
                                                                    }
                                                                  ],
                                                                  "x-fastgpt-union-parameter": {
                                                                    "label": "",
                                                                    "position": "first"
                                                                  }
                                                                },
                                                                "text": {
                                                                  "allOf": [
                                                                    {
                                                                      "type": "string"
                                                                    }
                                                                  ],
                                                                  "x-fastgpt-union-parameter": {
                                                                    "label": "",
                                                                    "position": "last"
                                                                  }
                                                                },
                                                                "key": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "type",
                                                                "text"
                                                              ],
                                                              "additionalProperties": false,
                                                              "description": ""
                                                            },
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "type": {
                                                                  "allOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "const": "image_url"
                                                                    }
                                                                  ],
                                                                  "x-fastgpt-union-parameter": {
                                                                    "label": "",
                                                                    "position": "first"
                                                                  }
                                                                },
                                                                "image_url": {
                                                                  "allOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "url": {
                                                                          "type": "string"
                                                                        },
                                                                        "detail": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "auto",
                                                                            "low",
                                                                            "high"
                                                                          ]
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "url"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  ],
                                                                  "x-fastgpt-union-parameter": {
                                                                    "label": "",
                                                                    "position": "last"
                                                                  }
                                                                },
                                                                "key": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "type",
                                                                "image_url"
                                                              ],
                                                              "additionalProperties": false,
                                                              "description": ""
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "hideDetails": {
                                                        "description": "仅展示工具信息，不提供参数或响应详情",
                                                        "type": "boolean"
                                                      },
                                                      "hideInUI": {
                                                        "description": "隐藏内部工具展示，仍保留模型上下文",
                                                        "type": "boolean"
                                                      },
                                                      "internalOnly": {
                                                        "description": "内部目录工具上下文，仅供服务端恢复，对外移除详情",
                                                        "type": "boolean"
                                                      },
                                                      "functionName": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "id",
                                                      "toolName",
                                                      "toolAvatar",
                                                      "params",
                                                      "functionName"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "skills": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "id": {
                                                        "type": "string"
                                                      },
                                                      "skillName": {
                                                        "type": "string"
                                                      },
                                                      "skillAvatar": {
                                                        "type": "string"
                                                      },
                                                      "description": {
                                                        "type": "string"
                                                      },
                                                      "skillMdPath": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "id",
                                                      "skillName",
                                                      "skillAvatar",
                                                      "description",
                                                      "skillMdPath"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "interactive": {
                                              "allOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "entryNodeIds": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "interactiveId": {
                                                      "type": "string"
                                                    },
                                                    "nodeResponseId": {
                                                      "type": "string"
                                                    },
                                                    "memoryEdges": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "source": {
                                                            "description": "连线起点节点 ID",
                                                            "type": "string"
                                                          },
                                                          "sourceHandle": {
                                                            "description": "连线起点输出桩 ID",
                                                            "type": "string"
                                                          },
                                                          "target": {
                                                            "description": "连线终点节点 ID",
                                                            "type": "string"
                                                          },
                                                          "targetHandle": {
                                                            "description": "连线终点输入桩 ID",
                                                            "type": "string"
                                                          },
                                                          "status": {
                                                            "type": "string",
                                                            "enum": [
                                                              "waiting",
                                                              "active",
                                                              "skipped"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "source",
                                                          "sourceHandle",
                                                          "target",
                                                          "targetHandle",
                                                          "status"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "nodeOutputs": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "nodeId": {
                                                            "type": "string"
                                                          },
                                                          "key": {
                                                            "description": "节点输出键名，用于被下游节点引用",
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "userChatInput",
                                                                  "history",
                                                                  "answerText",
                                                                  "reasoningText",
                                                                  "success",
                                                                  "failed",
                                                                  "system_text",
                                                                  "system_addOutputParam",
                                                                  "system_rawResponse",
                                                                  "system_error",
                                                                  "system_error_text",
                                                                  "error",
                                                                  "userFiles",
                                                                  "quoteQA",
                                                                  "cqResult",
                                                                  "fields",
                                                                  "system_resultTrue",
                                                                  "system_resultFalse",
                                                                  "selectedTools",
                                                                  "httpRawResponse",
                                                                  "system_httpRawError",
                                                                  "pluginStart",
                                                                  "ifElseResult",
                                                                  "selectResult",
                                                                  "loopArray",
                                                                  "loopStartInput",
                                                                  "loopStartIndex",
                                                                  "parallelSuccessResults",
                                                                  "parallelFullResults",
                                                                  "parallelStatus",
                                                                  "currentIndex",
                                                                  "currentItem",
                                                                  "currentIteration",
                                                                  "formInputResult",
                                                                  "fileTitle"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string"
                                                              }
                                                            ]
                                                          },
                                                          "value": {
                                                            "type": [
                                                              "object",
                                                              "array",
                                                              "string",
                                                              "number",
                                                              "boolean",
                                                              "null"
                                                            ],
                                                            "description": "节点输出值"
                                                          }
                                                        },
                                                        "required": [
                                                          "nodeId",
                                                          "key",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "skipNodeQueue": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "skippedNodeIdList": {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            }
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "skippedNodeIdList"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "usageId": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "entryNodeIds",
                                                    "memoryEdges",
                                                    "nodeOutputs"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "oneOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "userSelect"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "type": "string"
                                                                },
                                                                "userSelectOptions": {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "key": {
                                                                        "type": "string"
                                                                      },
                                                                      "value": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "key",
                                                                      "value"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                },
                                                                "userSelectedVal": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "description",
                                                                "userSelectOptions"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "userInput"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "type": "string"
                                                                },
                                                                "inputForm": {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "maxFiles": {
                                                                        "description": "单次对话允许选择的最大文件数量",
                                                                        "type": "integer",
                                                                        "minimum": 0,
                                                                        "maximum": 9007199254740991
                                                                      },
                                                                      "canSelectFile": {
                                                                        "description": "是否允许在对话中选择普通文件",
                                                                        "type": "boolean"
                                                                      },
                                                                      "customPdfParse": {
                                                                        "description": "是否使用自定义 PDF 解析配置",
                                                                        "type": "boolean"
                                                                      },
                                                                      "canSelectImg": {
                                                                        "description": "是否允许在对话中选择图片",
                                                                        "type": "boolean"
                                                                      },
                                                                      "canSelectVideo": {
                                                                        "description": "是否允许在对话中选择视频",
                                                                        "type": "boolean"
                                                                      },
                                                                      "canSelectAudio": {
                                                                        "description": "是否允许在对话中选择音频",
                                                                        "type": "boolean"
                                                                      },
                                                                      "canSelectCustomFileExtension": {
                                                                        "description": "是否允许选择自定义扩展名的文件",
                                                                        "type": "boolean"
                                                                      },
                                                                      "customFileExtensionList": {
                                                                        "description": "允许选择的自定义文件扩展名列表",
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "string"
                                                                        }
                                                                      },
                                                                      "type": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "reference",
                                                                          "input",
                                                                          "textarea",
                                                                          "numberInput",
                                                                          "switch",
                                                                          "select",
                                                                          "multipleSelect",
                                                                          "JSONEditor",
                                                                          "addInputParam",
                                                                          "customVariable",
                                                                          "selectApp",
                                                                          "selectLLMModel",
                                                                          "settingLLMModel",
                                                                          "selectDataset",
                                                                          "selectDatasetParamsModal",
                                                                          "settingDatasetQuotePrompt",
                                                                          "hidden",
                                                                          "custom",
                                                                          "selectSkill",
                                                                          "selectTool",
                                                                          "fileSelect",
                                                                          "timePointSelect",
                                                                          "timeRangeSelect",
                                                                          "password",
                                                                          "datasetTagFilter",
                                                                          "off",
                                                                          "agentGenerated"
                                                                        ]
                                                                      },
                                                                      "key": {
                                                                        "type": "string"
                                                                      },
                                                                      "label": {
                                                                        "type": "string"
                                                                      },
                                                                      "value": {
                                                                        "type": [
                                                                          "object",
                                                                          "array",
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "null"
                                                                        ],
                                                                        "description": "当前填写值"
                                                                      },
                                                                      "valueType": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "object",
                                                                          "arrayString",
                                                                          "arrayNumber",
                                                                          "arrayBoolean",
                                                                          "arrayObject",
                                                                          "arrayAny",
                                                                          "any",
                                                                          "chatHistory",
                                                                          "datasetQuote",
                                                                          "dynamic",
                                                                          "selectDataset",
                                                                          "selectApp"
                                                                        ]
                                                                      },
                                                                      "description": {
                                                                        "type": "string"
                                                                      },
                                                                      "defaultValue": {
                                                                        "type": [
                                                                          "object",
                                                                          "array",
                                                                          "string",
                                                                          "number",
                                                                          "boolean",
                                                                          "null"
                                                                        ],
                                                                        "description": "默认值"
                                                                      },
                                                                      "required": {
                                                                        "type": "boolean"
                                                                      },
                                                                      "timeGranularity": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "day",
                                                                          "hour",
                                                                          "minute",
                                                                          "second"
                                                                        ]
                                                                      },
                                                                      "timeRangeStart": {
                                                                        "type": "string"
                                                                      },
                                                                      "timeRangeEnd": {
                                                                        "type": "string"
                                                                      },
                                                                      "maxLength": {
                                                                        "type": "number"
                                                                      },
                                                                      "minLength": {
                                                                        "type": "number"
                                                                      },
                                                                      "max": {
                                                                        "type": "number"
                                                                      },
                                                                      "min": {
                                                                        "type": "number"
                                                                      },
                                                                      "list": {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "label": {
                                                                              "type": "string"
                                                                            },
                                                                            "value": {
                                                                              "type": "string"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "label",
                                                                            "value"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        }
                                                                      },
                                                                      "listInputType": {
                                                                        "description": "选项配置方式（input 手动输入 / reference 变量引用）",
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "input",
                                                                          "reference"
                                                                        ]
                                                                      },
                                                                      "listReference": {
                                                                        "description": "动态选项引用变量列表",
                                                                        "type": "array",
                                                                        "items": {
                                                                          "type": "array",
                                                                          "prefixItems": [
                                                                            {
                                                                              "type": "string"
                                                                            },
                                                                            {
                                                                              "type": "string"
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      "canLocalUpload": {
                                                                        "type": "boolean"
                                                                      },
                                                                      "canUrlUpload": {
                                                                        "type": "boolean"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "type",
                                                                      "key",
                                                                      "label",
                                                                      "value",
                                                                      "valueType",
                                                                      "required"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                },
                                                                "submitted": {
                                                                  "type": "boolean"
                                                                }
                                                              },
                                                              "required": [
                                                                "description",
                                                                "inputForm"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "childrenInteractive"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "childrenResponse": {
                                                                  "type": "object",
                                                                  "additionalProperties": true,
                                                                  "description": "子工作流交互响应"
                                                                }
                                                              },
                                                              "required": [
                                                                "childrenResponse"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "toolChildrenInteractive"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "toolCallId": {
                                                                  "description": "父模型的原始工具调用 ID，子流程续跑结果回填到此调用",
                                                                  "type": "string",
                                                                  "minLength": 1
                                                                },
                                                                "childrenResponse": {
                                                                  "type": "object",
                                                                  "additionalProperties": true,
                                                                  "description": "子工作流交互响应"
                                                                }
                                                              },
                                                              "required": [
                                                                "toolCallId",
                                                                "childrenResponse"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "loopInteractive"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "loopResult": {
                                                                  "items": {
                                                                    "type": [
                                                                      "object",
                                                                      "array",
                                                                      "string",
                                                                      "number",
                                                                      "boolean",
                                                                      "null"
                                                                    ]
                                                                  },
                                                                  "description": "各轮响应",
                                                                  "type": "array"
                                                                },
                                                                "childrenResponse": {
                                                                  "type": "object",
                                                                  "additionalProperties": true,
                                                                  "description": "子工作流交互响应"
                                                                },
                                                                "currentIndex": {
                                                                  "type": "number"
                                                                }
                                                              },
                                                              "required": [
                                                                "loopResult",
                                                                "childrenResponse",
                                                                "currentIndex"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "loopRunInteractive"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "loopHistory": {
                                                                  "items": {
                                                                    "type": "object",
                                                                    "additionalProperties": true
                                                                  },
                                                                  "description": "各轮快照",
                                                                  "type": "array"
                                                                },
                                                                "childrenResponse": {
                                                                  "type": "object",
                                                                  "additionalProperties": true,
                                                                  "description": "子工作流交互响应"
                                                                },
                                                                "iteration": {
                                                                  "type": "number"
                                                                },
                                                                "pendingIterationSummary": {
                                                                  "type": "object",
                                                                  "additionalProperties": true,
                                                                  "description": "待执行轮次的摘要"
                                                                }
                                                              },
                                                              "required": [
                                                                "loopHistory",
                                                                "childrenResponse",
                                                                "iteration"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "paymentPause"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "description": {
                                                                  "type": "string"
                                                                },
                                                                "continue": {
                                                                  "type": "boolean"
                                                                }
                                                              },
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "agentAsk"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "toolCallId": {
                                                                  "description": "模型返回的原始 tool call ID",
                                                                  "type": "string",
                                                                  "minLength": 1
                                                                },
                                                                "arguments": {
                                                                  "description": "模型原始工具参数 JSON 字符串，保存及恢复时不重新序列化",
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "toolCallId",
                                                                "arguments"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "allOf": [
                                                            {
                                                              "type": "string",
                                                              "const": "workflowBuilderPreview"
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "first"
                                                          }
                                                        },
                                                        "params": {
                                                          "allOf": [
                                                            {
                                                              "type": "object",
                                                              "properties": {
                                                                "toolCallId": {
                                                                  "description": "模型返回的原始 tool call ID",
                                                                  "type": "string",
                                                                  "minLength": 1
                                                                },
                                                                "arguments": {
                                                                  "description": "模型原始 Preview 工具参数 JSON 字符串，展示时解析，恢复时原样使用",
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "toolCallId",
                                                                "arguments"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          ],
                                                          "x-fastgpt-union-parameter": {
                                                            "label": "",
                                                            "position": "last"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "params"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": ""
                                                    }
                                                  ],
                                                  "type": "object"
                                                }
                                              ]
                                            },
                                            "plan": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "planId": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "description": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "steps": {
                                                      "description": "计划步骤列表，至少包含一个可执行或可验证的步骤",
                                                      "minItems": 1,
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "description": "步骤 ID，用于在计划更新和前端渲染中稳定定位该步骤",
                                                            "type": "string"
                                                          },
                                                          "name": {
                                                            "description": "步骤名称，简短描述该步骤要完成的事情",
                                                            "type": "string"
                                                          },
                                                          "description": {
                                                            "description": "步骤说明，描述执行该步骤时需要关注的目标和边界",
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "status": {
                                                            "description": "步骤状态：pending 待执行，in_progress 执行中，done 已完成，blocked 受阻，skipped 已跳过",
                                                            "default": "pending",
                                                            "type": "string",
                                                            "enum": [
                                                              "pending",
                                                              "in_progress",
                                                              "done",
                                                              "blocked",
                                                              "skipped"
                                                            ]
                                                          },
                                                          "note": {
                                                            "description": "步骤备注，记录完成结果、阻塞原因、跳过原因或当前进展",
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "name",
                                                          "status"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "planId",
                                                    "name",
                                                    "steps"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "planStatus": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "status": {
                                                      "description": "计划状态：generating 生成计划中，updating 更新计划中",
                                                      "type": "string",
                                                      "enum": [
                                                        "generating",
                                                        "updating"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "status"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "agentPlanUpdate": {
                                              "anyOf": [
                                                {
                                                  "description": "Agent loop 内部 update_plan 调用记录，用于恢复模型上下文和后续 UI 展示",
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "description": "update_plan 工具调用 ID",
                                                      "type": "string"
                                                    },
                                                    "functionName": {
                                                      "description": "计划更新工具函数名",
                                                      "default": "update_plan",
                                                      "type": "string"
                                                    },
                                                    "params": {
                                                      "description": "update_plan 工具参数 JSON 字符串",
                                                      "default": "",
                                                      "type": "string"
                                                    },
                                                    "response": {
                                                      "description": "update_plan 工具返回给模型的结果",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "functionName",
                                                    "params"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "agentAsk": {
                                              "deprecated": true,
                                              "description": "旧版 Ask 副本，新消息仅保存 interactive",
                                              "anyOf": [
                                                {
                                                  "description": "Agent loop 内部 ask_agent 调用记录，用于恢复用户追问上下文和后续 UI 展示",
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "description": "ask_agent 工具调用 ID",
                                                      "type": "string"
                                                    },
                                                    "functionName": {
                                                      "description": "用户追问工具函数名",
                                                      "default": "ask_agent",
                                                      "type": "string"
                                                    },
                                                    "params": {
                                                      "description": "ask_agent 工具参数 JSON 字符串",
                                                      "default": "",
                                                      "type": "string"
                                                    },
                                                    "askId": {
                                                      "description": "该追问 ID，用于匹配用户回答",
                                                      "type": "string",
                                                      "minLength": 1
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "functionName",
                                                    "params",
                                                    "askId"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "contextCheckpoint": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "workflowBuilderVersion": {
                                              "type": "object",
                                              "properties": {
                                                "versionNo": {
                                                  "description": "当前工作流辅助生成会话中的 AI 生成版本序号",
                                                  "example": 1,
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0,
                                                  "maximum": 9007199254740991
                                                },
                                                "name": {
                                                  "description": "版本展示名称",
                                                  "example": "AI 生成版本 1",
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "filename": {
                                                  "description": "版本 JSON 文件名",
                                                  "example": "AI 生成版本 1.json",
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "checksum": {
                                                  "description": "WorkflowDocument 的 SHA-256 checksum",
                                                  "example": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
                                                  "type": "string",
                                                  "pattern": "^sha256:[a-f0-9]{64}$"
                                                },
                                                "generatedAt": {
                                                  "description": "AI 完成生成的时间",
                                                  "example": "2026-08-12T10:00:00.000Z",
                                                  "type": "string",
                                                  "format": "date-time",
                                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                                                },
                                                "s3Key": {
                                                  "description": "生成校验成功后归档到聊天文件 S3 的对象 key",
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "expiresAt": {
                                                  "description": "S3 版本过期时间",
                                                  "example": "2026-08-13T10:00:00.000Z",
                                                  "type": "string",
                                                  "format": "date-time",
                                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                                                },
                                                "appliedAt": {
                                                  "description": "版本首次成功应用到画布的时间",
                                                  "example": "2026-08-12T10:00:00.000Z",
                                                  "type": "string",
                                                  "format": "date-time",
                                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                                                }
                                              },
                                              "required": [
                                                "versionNo",
                                                "name",
                                                "filename",
                                                "checksum",
                                                "generatedAt"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "chatAgentBuilderVersion": {
                                              "type": "object",
                                              "properties": {
                                                "s3Key": {
                                                  "description": "生成配置的 S3 归档 key",
                                                  "example": "chat/chatAgentHelper/app/member/chat/config.json",
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "expiresAt": {
                                                  "description": "生成配置的过期时间",
                                                  "example": "2026-10-23T00:00:00.000Z",
                                                  "type": "string",
                                                  "format": "date-time",
                                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                                                }
                                              },
                                              "required": [
                                                "s3Key",
                                                "expiresAt"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "tool": {
                                              "deprecated": true,
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "toolName": {
                                                      "type": "string"
                                                    },
                                                    "toolAvatar": {
                                                      "type": "string"
                                                    },
                                                    "params": {
                                                      "type": "string"
                                                    },
                                                    "response": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "content": {
                                                      "description": "工具实际返回给模型的结构化内容",
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "text"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "text": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "const": "image_url"
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "first"
                                                                }
                                                              },
                                                              "image_url": {
                                                                "allOf": [
                                                                  {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "url": {
                                                                        "type": "string"
                                                                      },
                                                                      "detail": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                          "auto",
                                                                          "low",
                                                                          "high"
                                                                        ]
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "url"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                ],
                                                                "x-fastgpt-union-parameter": {
                                                                  "label": "",
                                                                  "position": "last"
                                                                }
                                                              },
                                                              "key": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": ""
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "hideDetails": {
                                                      "description": "仅展示工具信息，不提供参数或响应详情",
                                                      "type": "boolean"
                                                    },
                                                    "hideInUI": {
                                                      "description": "隐藏内部工具展示，仍保留模型上下文",
                                                      "type": "boolean"
                                                    },
                                                    "internalOnly": {
                                                      "description": "内部目录工具上下文，仅供服务端恢复，对外移除详情",
                                                      "type": "boolean"
                                                    },
                                                    "functionName": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "toolName",
                                                    "toolAvatar",
                                                    "params",
                                                    "functionName"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "hideReason": {
                                              "type": "boolean"
                                            },
                                            "hideInUI": {
                                              "type": "boolean"
                                            }
                                          },
                                          "additionalProperties": false
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "memories": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "userGoodFeedback": {
                                    "allOf": [
                                      {
                                        "type": "string"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "userBadFeedback": {
                                    "allOf": [
                                      {
                                        "type": "string"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "customFeedbacks": {
                                    "allOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "adminFeedback": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "feedbackDataId": {
                                            "type": "string"
                                          },
                                          "datasetId": {
                                            "type": "string"
                                          },
                                          "collectionId": {
                                            "type": "string"
                                          },
                                          "q": {
                                            "type": "string"
                                          },
                                          "a": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "feedbackDataId",
                                          "datasetId",
                                          "collectionId",
                                          "q"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "isFeedbackRead": {
                                    "allOf": [
                                      {
                                        "type": "boolean"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "durationSeconds": {
                                    "allOf": [
                                      {
                                        "type": "number"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "errorMsg": {
                                    "allOf": [
                                      {
                                        "type": "string"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "citeCollectionIds": {
                                    "allOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "responseData": {
                                    "allOf": [
                                      {
                                        "description": "节点响应",
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "moduleLogo": {
                                              "description": "模块 logo",
                                              "type": "string"
                                            },
                                            "moduleNameArgs": {
                                              "description": "模块名 i18n 插值参数",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "runningTime": {
                                              "description": "运行时间: 秒",
                                              "type": "number"
                                            },
                                            "firstTokenTime": {
                                              "description": "首 token 响应时间: 秒",
                                              "type": "number"
                                            },
                                            "query": {
                                              "description": "查询语句",
                                              "type": "string"
                                            },
                                            "textOutput": {
                                              "description": "文本输出",
                                              "type": "string"
                                            },
                                            "llmRequestIds": {
                                              "description": "LLM 请求追踪 ID 列表",
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "agentPlanStatus": {
                                              "description": "Agent 计划节点状态",
                                              "type": "string",
                                              "enum": [
                                                "set_plan",
                                                "update_plan",
                                                "ask_question"
                                              ]
                                            },
                                            "agentPlanResult": {
                                              "description": "Agent 计划操作结果",
                                              "type": "string"
                                            },
                                            "error": {
                                              "description": "错误信息",
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {}
                                                },
                                                {
                                                  "type": "string"
                                                }
                                              ]
                                            },
                                            "errorText": {
                                              "description": "错误文本",
                                              "type": "string"
                                            },
                                            "errorCaptured": {
                                              "description": "错误已被 catch 分支捕获",
                                              "type": "boolean"
                                            },
                                            "isToolCall": {
                                              "description": "工具节点是否由模型工具调用调度；false 表示工作流直接执行，缺省兼容历史响应",
                                              "type": "boolean"
                                            },
                                            "moderationRecords": {
                                              "description": "节点内容审核拦截记录（仅应用写权限可见）",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "stage": {
                                                    "description": "审核环节：entry(用户输入) | model_input(传入模型) | output(展示给用户)",
                                                    "type": "string",
                                                    "enum": [
                                                      "entry",
                                                      "model_input",
                                                      "output"
                                                    ]
                                                  },
                                                  "targetField": {
                                                    "description": "具体被审字段",
                                                    "type": "string"
                                                  },
                                                  "verdict": {
                                                    "description": "裁决结果",
                                                    "type": "string",
                                                    "enum": [
                                                      "pass",
                                                      "suspected",
                                                      "block",
                                                      "error"
                                                    ]
                                                  },
                                                  "actionTaken": {
                                                    "description": "执行动作",
                                                    "type": "string",
                                                    "enum": [
                                                      "pass",
                                                      "block",
                                                      "replace"
                                                    ]
                                                  },
                                                  "hits": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "label": {
                                                          "type": "string"
                                                        },
                                                        "providerLabel": {
                                                          "type": "string"
                                                        },
                                                        "score": {
                                                          "type": "number"
                                                        },
                                                        "keywords": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "label"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  },
                                                  "keywords": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "content": {
                                                    "description": "被审文本原文",
                                                    "type": "string"
                                                  },
                                                  "errorMessage": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "stage",
                                                  "verdict",
                                                  "actionTaken"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "customInputs": {
                                              "description": "自定义输入",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "customOutputs": {
                                              "description": "自定义输出",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "nodeInputs": {
                                              "description": "节点输入",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "nodeOutputs": {
                                              "description": "节点输出",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "mergeSignId": {
                                              "description": "旧版合并签名 ID",
                                              "deprecated": true,
                                              "type": "string"
                                            },
                                            "parentId": {
                                              "type": "string"
                                            },
                                            "tokens": {
                                              "description": "总 token",
                                              "type": "number"
                                            },
                                            "inputTokens": {
                                              "description": "输入 token",
                                              "type": "number"
                                            },
                                            "outputTokens": {
                                              "description": "输出 token",
                                              "type": "number"
                                            },
                                            "modelId": {
                                              "description": "模型 ID",
                                              "type": "string"
                                            },
                                            "model": {
                                              "description": "旧模型标识",
                                              "deprecated": true,
                                              "type": "string"
                                            },
                                            "contextTotalLen": {
                                              "description": "上下文总长度",
                                              "type": "number"
                                            },
                                            "totalPoints": {
                                              "description": "总积分",
                                              "type": "number"
                                            },
                                            "childResponseCount": {
                                              "type": "number"
                                            },
                                            "temperature": {
                                              "description": "温度",
                                              "type": "number"
                                            },
                                            "maxToken": {
                                              "description": "最大 token",
                                              "type": "number"
                                            },
                                            "quoteList": {
                                              "description": "知识库引用列表",
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "description": "搜索数据响应项",
                                                    "type": "object",
                                                    "properties": {
                                                      "q": {
                                                        "allOf": [
                                                          {
                                                            "description": "问题/主文本",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "a": {
                                                        "allOf": [
                                                          {
                                                            "description": "回答/补充文本",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imageId": {
                                                        "allOf": [
                                                          {
                                                            "description": "图片 ID",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imagePreivewUrl": {
                                                        "allOf": [
                                                          {
                                                            "description": "图片预览 URL",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "updateTime": {
                                                        "allOf": [
                                                          {
                                                            "description": "更新时间",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "indexStatus": {
                                                        "allOf": [
                                                          {
                                                            "description": "索引状态，字段缺失表示已索引的历史数据",
                                                            "type": "string",
                                                            "enum": [
                                                              "indexing",
                                                              "indexed",
                                                              "error",
                                                              "rebuildIndexPending",
                                                              "rebuildIndexRunning",
                                                              "rebuildIndexFailed",
                                                              "rebuildSynonymPending",
                                                              "rebuildSynonymRunning",
                                                              "rebuildSynonymFailed"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "indexErrorMsg": {
                                                        "allOf": [
                                                          {
                                                            "description": "索引错误信息",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imageDescMap": {
                                                        "allOf": [
                                                          {
                                                            "description": "图片描述映射",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {
                                                              "type": "string"
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "metadata": {
                                                        "allOf": [
                                                          {
                                                            "description": "自定义元数据",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {}
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "synonymMappings": {
                                                        "allOf": [
                                                          {
                                                            "description": "分块或用户问题中出现的原词到标准词映射",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {
                                                              "type": "string"
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "id": {
                                                        "description": "数据 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "datasetId": {
                                                        "description": "数据集 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "collectionId": {
                                                        "description": "集合 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "sourceName": {
                                                        "description": "来源名称",
                                                        "type": "string"
                                                      },
                                                      "sourceId": {
                                                        "description": "来源 ID",
                                                        "type": "string"
                                                      },
                                                      "chunkIndex": {
                                                        "description": "块索引",
                                                        "type": "number"
                                                      },
                                                      "score": {
                                                        "description": "评分列表",
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "description": "评分类型",
                                                              "type": "string",
                                                              "enum": [
                                                                "embedding",
                                                                "fullText",
                                                                "reRank",
                                                                "rrf"
                                                              ]
                                                            },
                                                            "value": {
                                                              "description": "评分值",
                                                              "type": "number"
                                                            },
                                                            "index": {
                                                              "description": "索引",
                                                              "type": "number"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "value",
                                                            "index"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "retrievalRank": {
                                                        "description": "检索排名",
                                                        "type": "number"
                                                      }
                                                    },
                                                    "required": [
                                                      "q",
                                                      "id",
                                                      "datasetId",
                                                      "collectionId",
                                                      "updateTime",
                                                      "sourceName",
                                                      "chunkIndex",
                                                      "score"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "description": "搜索数据引用响应项（精简）",
                                                    "type": "object",
                                                    "properties": {
                                                      "id": {
                                                        "description": "数据 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "chunkIndex": {
                                                        "description": "块索引",
                                                        "type": "number"
                                                      },
                                                      "datasetId": {
                                                        "description": "数据集 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "collectionId": {
                                                        "description": "集合 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "sourceId": {
                                                        "description": "来源 ID",
                                                        "type": "string"
                                                      },
                                                      "sourceName": {
                                                        "description": "来源名称",
                                                        "type": "string"
                                                      },
                                                      "score": {
                                                        "description": "评分列表",
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "description": "评分类型",
                                                              "type": "string",
                                                              "enum": [
                                                                "embedding",
                                                                "fullText",
                                                                "reRank",
                                                                "rrf"
                                                              ]
                                                            },
                                                            "value": {
                                                              "description": "评分值",
                                                              "type": "number"
                                                            },
                                                            "index": {
                                                              "description": "索引",
                                                              "type": "number"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "value",
                                                            "index"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "retrievalRank": {
                                                        "description": "检索排名",
                                                        "type": "number"
                                                      }
                                                    },
                                                    "required": [
                                                      "id",
                                                      "chunkIndex",
                                                      "datasetId",
                                                      "collectionId",
                                                      "sourceName",
                                                      "score"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "reasoningText": {
                                              "description": "思考文本",
                                              "type": "string"
                                            },
                                            "historyPreview": {
                                              "description": "上下文预览",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "obj": {
                                                    "type": "string",
                                                    "enum": [
                                                      "System",
                                                      "Human",
                                                      "AI"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "obj",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "finishReason": {
                                              "description": "模型完成原因",
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "error",
                                                    "close",
                                                    "abnormal_close",
                                                    "stop",
                                                    "length",
                                                    "tool_calls",
                                                    "content_filter",
                                                    "function_call"
                                                  ]
                                                },
                                                {
                                                  "type": "null",
                                                  "const": null
                                                },
                                                {
                                                  "not": {}
                                                }
                                              ]
                                            },
                                            "embeddingModel": {
                                              "description": "嵌入模型",
                                              "type": "string"
                                            },
                                            "embeddingTokens": {
                                              "description": "嵌入 token",
                                              "type": "number"
                                            },
                                            "similarity": {
                                              "description": "相似度",
                                              "type": "number"
                                            },
                                            "limit": {
                                              "description": "限制",
                                              "type": "number"
                                            },
                                            "searchMode": {
                                              "description": "搜索模式",
                                              "type": "string",
                                              "enum": [
                                                "embedding",
                                                "fullTextRecall",
                                                "mixedRecall"
                                              ]
                                            },
                                            "embeddingWeight": {
                                              "description": "嵌入权重",
                                              "type": "number"
                                            },
                                            "datasetQueries": {
                                              "description": "检索词",
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "rerankModel": {
                                              "description": "重排模型",
                                              "type": "string"
                                            },
                                            "rerankWeight": {
                                              "description": "重排权重",
                                              "type": "number"
                                            },
                                            "reRankInputTokens": {
                                              "description": "重排输入 token",
                                              "type": "number"
                                            },
                                            "searchUsingReRank": {
                                              "description": "使用重排",
                                              "type": "boolean"
                                            },
                                            "retrievalResults": {
                                              "description": "融合候选集（去重/过滤前），仅重排开启时记录",
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "description": "搜索数据响应项",
                                                    "type": "object",
                                                    "properties": {
                                                      "q": {
                                                        "allOf": [
                                                          {
                                                            "description": "问题/主文本",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "first"
                                                        }
                                                      },
                                                      "a": {
                                                        "allOf": [
                                                          {
                                                            "description": "回答/补充文本",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imageId": {
                                                        "allOf": [
                                                          {
                                                            "description": "图片 ID",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imagePreivewUrl": {
                                                        "allOf": [
                                                          {
                                                            "description": "图片预览 URL",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "updateTime": {
                                                        "allOf": [
                                                          {
                                                            "description": "更新时间",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "indexStatus": {
                                                        "allOf": [
                                                          {
                                                            "description": "索引状态，字段缺失表示已索引的历史数据",
                                                            "type": "string",
                                                            "enum": [
                                                              "indexing",
                                                              "indexed",
                                                              "error",
                                                              "rebuildIndexPending",
                                                              "rebuildIndexRunning",
                                                              "rebuildIndexFailed",
                                                              "rebuildSynonymPending",
                                                              "rebuildSynonymRunning",
                                                              "rebuildSynonymFailed"
                                                            ]
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "indexErrorMsg": {
                                                        "allOf": [
                                                          {
                                                            "description": "索引错误信息",
                                                            "type": "string"
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "imageDescMap": {
                                                        "allOf": [
                                                          {
                                                            "description": "图片描述映射",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {
                                                              "type": "string"
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "metadata": {
                                                        "allOf": [
                                                          {
                                                            "description": "自定义元数据",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {}
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "middle"
                                                        }
                                                      },
                                                      "synonymMappings": {
                                                        "allOf": [
                                                          {
                                                            "description": "分块或用户问题中出现的原词到标准词映射",
                                                            "type": "object",
                                                            "propertyNames": {
                                                              "type": "string"
                                                            },
                                                            "additionalProperties": {
                                                              "type": "string"
                                                            }
                                                          }
                                                        ],
                                                        "x-fastgpt-union-parameter": {
                                                          "label": "",
                                                          "position": "last"
                                                        }
                                                      },
                                                      "id": {
                                                        "description": "数据 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "datasetId": {
                                                        "description": "数据集 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "collectionId": {
                                                        "description": "集合 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "sourceName": {
                                                        "description": "来源名称",
                                                        "type": "string"
                                                      },
                                                      "sourceId": {
                                                        "description": "来源 ID",
                                                        "type": "string"
                                                      },
                                                      "chunkIndex": {
                                                        "description": "块索引",
                                                        "type": "number"
                                                      },
                                                      "score": {
                                                        "description": "评分列表",
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "description": "评分类型",
                                                              "type": "string",
                                                              "enum": [
                                                                "embedding",
                                                                "fullText",
                                                                "reRank",
                                                                "rrf"
                                                              ]
                                                            },
                                                            "value": {
                                                              "description": "评分值",
                                                              "type": "number"
                                                            },
                                                            "index": {
                                                              "description": "索引",
                                                              "type": "number"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "value",
                                                            "index"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "retrievalRank": {
                                                        "description": "检索排名",
                                                        "type": "number"
                                                      }
                                                    },
                                                    "required": [
                                                      "q",
                                                      "id",
                                                      "datasetId",
                                                      "collectionId",
                                                      "updateTime",
                                                      "sourceName",
                                                      "chunkIndex",
                                                      "score"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "description": "搜索数据引用响应项（精简）",
                                                    "type": "object",
                                                    "properties": {
                                                      "id": {
                                                        "description": "数据 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "chunkIndex": {
                                                        "description": "块索引",
                                                        "type": "number"
                                                      },
                                                      "datasetId": {
                                                        "description": "数据集 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "collectionId": {
                                                        "description": "集合 ID",
                                                        "example": "68ee0bd23d17260b7829b137",
                                                        "type": "string",
                                                        "pattern": "^[0-9a-fA-F]{24}$"
                                                      },
                                                      "sourceId": {
                                                        "description": "来源 ID",
                                                        "type": "string"
                                                      },
                                                      "sourceName": {
                                                        "description": "来源名称",
                                                        "type": "string"
                                                      },
                                                      "score": {
                                                        "description": "评分列表",
                                                        "type": "array",
                                                        "items": {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "description": "评分类型",
                                                              "type": "string",
                                                              "enum": [
                                                                "embedding",
                                                                "fullText",
                                                                "reRank",
                                                                "rrf"
                                                              ]
                                                            },
                                                            "value": {
                                                              "description": "评分值",
                                                              "type": "number"
                                                            },
                                                            "index": {
                                                              "description": "索引",
                                                              "type": "number"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "value",
                                                            "index"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "retrievalRank": {
                                                        "description": "检索排名",
                                                        "type": "number"
                                                      }
                                                    },
                                                    "required": [
                                                      "id",
                                                      "chunkIndex",
                                                      "datasetId",
                                                      "collectionId",
                                                      "sourceName",
                                                      "score"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "concatLength": {
                                              "type": "number"
                                            },
                                            "cqList": {
                                              "description": "分类问题列表",
                                              "type": "array",
                                              "items": {
                                                "description": "分类问题Agent项",
                                                "type": "object",
                                                "properties": {
                                                  "value": {
                                                    "description": "分类值",
                                                    "type": "string"
                                                  },
                                                  "key": {
                                                    "description": "分类键",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "value",
                                                  "key"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "cqResult": {
                                              "description": "分类结果",
                                              "type": "string"
                                            },
                                            "extractDescription": {
                                              "description": "提取描述",
                                              "type": "string"
                                            },
                                            "extractResult": {
                                              "description": "提取结果",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "params": {
                                              "description": "请求参数",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "body": {
                                              "description": "请求体",
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {}
                                                },
                                                {
                                                  "type": "string"
                                                }
                                              ]
                                            },
                                            "headers": {
                                              "description": "请求头",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "httpResult": {
                                              "description": "请求结果",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "httpErrorResult": {
                                              "description": "请求失败结果",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "toolInput": {
                                              "description": "工具输入",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "pluginOutput": {
                                              "description": "插件输出",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "pluginDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "插件执行详情（递归节点响应）",
                                              "type": "array"
                                            },
                                            "toolParamsResult": {
                                              "description": "工具参数结果",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "toolRes": {
                                              "type": [
                                                "object",
                                                "array",
                                                "string",
                                                "number",
                                                "boolean",
                                                "null"
                                              ],
                                              "description": "工具响应"
                                            },
                                            "ifElseResult": {
                                              "description": "判断器结果",
                                              "type": "string"
                                            },
                                            "toolCallInputTokens": {
                                              "description": "工具调用输入 token",
                                              "type": "number"
                                            },
                                            "toolCallOutputTokens": {
                                              "description": "工具调用输出 token",
                                              "type": "number"
                                            },
                                            "toolDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "工具执行详情（递归节点响应）",
                                              "type": "array"
                                            },
                                            "toolStop": {
                                              "type": "boolean"
                                            },
                                            "stepQuery": {
                                              "description": "步骤查询",
                                              "type": "string"
                                            },
                                            "compressTextAgent": {
                                              "description": "压缩文本Agent",
                                              "type": "object",
                                              "properties": {
                                                "inputTokens": {
                                                  "description": "输入 token",
                                                  "type": "number"
                                                },
                                                "outputTokens": {
                                                  "description": "输出 token",
                                                  "type": "number"
                                                },
                                                "totalPoints": {
                                                  "description": "总积分",
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "inputTokens",
                                                "outputTokens",
                                                "totalPoints"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "codeLog": {
                                              "description": "代码日志",
                                              "type": "string"
                                            },
                                            "readFilesResult": {
                                              "description": "文件读取结果",
                                              "type": "string"
                                            },
                                            "readFiles": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "url": {
                                                    "type": "string"
                                                  },
                                                  "name": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "url",
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "userSelectResult": {
                                              "description": "用户选择结果",
                                              "type": "string"
                                            },
                                            "formInputResult": {
                                              "description": "表单输入结果",
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            },
                                            "updateVarResult": {
                                              "items": {
                                                "type": [
                                                  "object",
                                                  "array",
                                                  "string",
                                                  "number",
                                                  "boolean",
                                                  "null"
                                                ]
                                              },
                                              "description": "更新变量结果",
                                              "type": "array"
                                            },
                                            "loopResult": {
                                              "items": {
                                                "type": [
                                                  "object",
                                                  "array",
                                                  "string",
                                                  "number",
                                                  "boolean",
                                                  "null"
                                                ]
                                              },
                                              "description": "循环结果",
                                              "type": "array"
                                            },
                                            "loopInput": {
                                              "items": {
                                                "type": [
                                                  "object",
                                                  "array",
                                                  "string",
                                                  "number",
                                                  "boolean",
                                                  "null"
                                                ]
                                              },
                                              "description": "循环输入",
                                              "type": "array"
                                            },
                                            "loopDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "循环详情（递归节点响应）",
                                              "type": "array"
                                            },
                                            "loopInputValue": {
                                              "type": [
                                                "object",
                                                "array",
                                                "string",
                                                "number",
                                                "boolean",
                                                "null"
                                              ],
                                              "description": "循环输入值"
                                            },
                                            "loopOutputValue": {
                                              "type": [
                                                "object",
                                                "array",
                                                "string",
                                                "number",
                                                "boolean",
                                                "null"
                                              ],
                                              "description": "循环输出值"
                                            },
                                            "parallelInput": {
                                              "items": {
                                                "type": [
                                                  "object",
                                                  "array",
                                                  "string",
                                                  "number",
                                                  "boolean",
                                                  "null"
                                                ]
                                              },
                                              "description": "并行输入",
                                              "type": "array"
                                            },
                                            "parallelResult": {
                                              "items": {
                                                "type": [
                                                  "object",
                                                  "array",
                                                  "string",
                                                  "number",
                                                  "boolean",
                                                  "null"
                                                ]
                                              },
                                              "description": "并行结果",
                                              "type": "array"
                                            },
                                            "parallelRunDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "各任务执行摘要（成功/失败状态）",
                                              "type": "array"
                                            },
                                            "parallelDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "成功任务子工作流完整响应列表",
                                              "deprecated": true,
                                              "type": "array"
                                            },
                                            "loopRunInput": {
                                              "type": [
                                                "object",
                                                "array",
                                                "string",
                                                "number",
                                                "boolean",
                                                "null"
                                              ],
                                              "description": "loopRun 循环输入（数组或条件模式标记）"
                                            },
                                            "loopRunIterations": {
                                              "description": "loopRun 实际执行轮数",
                                              "type": "number"
                                            },
                                            "loopRunHistory": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "loopRun 每轮快照",
                                              "type": "array"
                                            },
                                            "loopRunDetail": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "loopRun 各轮子工作流节点响应聚合",
                                              "deprecated": true,
                                              "type": "array"
                                            },
                                            "childrenResponses": {
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": true
                                              },
                                              "description": "子节点响应",
                                              "type": "array"
                                            },
                                            "toolId": {
                                              "description": "工具 ID",
                                              "type": "string"
                                            },
                                            "extensionModel": {
                                              "description": "扩展模型",
                                              "deprecated": true,
                                              "type": "string"
                                            },
                                            "extensionResult": {
                                              "description": "扩展结果",
                                              "deprecated": true,
                                              "type": "string"
                                            },
                                            "extensionTokens": {
                                              "description": "扩展 token",
                                              "deprecated": true,
                                              "type": "number"
                                            },
                                            "nodeId": {
                                              "type": "string"
                                            },
                                            "id": {
                                              "type": "string"
                                            },
                                            "moduleType": {
                                              "type": "string",
                                              "enum": [
                                                "emptyNode",
                                                "globalVariable",
                                                "comment",
                                                "workflowStart",
                                                "chatNode",
                                                "datasetSearchNode",
                                                "datasetConcatNode",
                                                "answerNode",
                                                "classifyQuestion",
                                                "contentExtract",
                                                "httpRequest468",
                                                "pluginInput",
                                                "pluginOutput",
                                                "cfr",
                                                "agent",
                                                "tools",
                                                "stopTool",
                                                "toolParams",
                                                "ifElseNode",
                                                "variableUpdate",
                                                "code",
                                                "textEditor",
                                                "customFeedback",
                                                "readFiles",
                                                "userSelect",
                                                "loop",
                                                "loopStart",
                                                "loopEnd",
                                                "parallelRun",
                                                "loopRun",
                                                "loopRunStart",
                                                "loopRunBreak",
                                                "formInput",
                                                "tool",
                                                "toolSet",
                                                "appModule",
                                                "pluginModule",
                                                "app"
                                              ]
                                            },
                                            "moduleName": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "nodeId",
                                            "id",
                                            "moduleType",
                                            "moduleName"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "useAgentSandbox": {
                                    "type": "boolean"
                                  },
                                  "totalQuoteList": {
                                    "type": "array",
                                    "items": {
                                      "anyOf": [
                                        {
                                          "description": "搜索数据响应项",
                                          "type": "object",
                                          "properties": {
                                            "q": {
                                              "allOf": [
                                                {
                                                  "description": "问题/主文本",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "first"
                                              }
                                            },
                                            "a": {
                                              "allOf": [
                                                {
                                                  "description": "回答/补充文本",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageId": {
                                              "allOf": [
                                                {
                                                  "description": "图片 ID",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imagePreivewUrl": {
                                              "allOf": [
                                                {
                                                  "description": "图片预览 URL",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "updateTime": {
                                              "allOf": [
                                                {
                                                  "description": "更新时间",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexStatus": {
                                              "allOf": [
                                                {
                                                  "description": "索引状态，字段缺失表示已索引的历史数据",
                                                  "type": "string",
                                                  "enum": [
                                                    "indexing",
                                                    "indexed",
                                                    "error",
                                                    "rebuildIndexPending",
                                                    "rebuildIndexRunning",
                                                    "rebuildIndexFailed",
                                                    "rebuildSynonymPending",
                                                    "rebuildSynonymRunning",
                                                    "rebuildSynonymFailed"
                                                  ]
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "indexErrorMsg": {
                                              "allOf": [
                                                {
                                                  "description": "索引错误信息",
                                                  "type": "string"
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "imageDescMap": {
                                              "allOf": [
                                                {
                                                  "description": "图片描述映射",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "metadata": {
                                              "allOf": [
                                                {
                                                  "description": "自定义元数据",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {}
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "middle"
                                              }
                                            },
                                            "synonymMappings": {
                                              "allOf": [
                                                {
                                                  "description": "分块或用户问题中出现的原词到标准词映射",
                                                  "type": "object",
                                                  "propertyNames": {
                                                    "type": "string"
                                                  },
                                                  "additionalProperties": {
                                                    "type": "string"
                                                  }
                                                }
                                              ],
                                              "x-fastgpt-union-parameter": {
                                                "label": "",
                                                "position": "last"
                                              }
                                            },
                                            "id": {
                                              "description": "数据 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "datasetId": {
                                              "description": "数据集 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "集合 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceName": {
                                              "description": "来源名称",
                                              "type": "string"
                                            },
                                            "sourceId": {
                                              "description": "来源 ID",
                                              "type": "string"
                                            },
                                            "chunkIndex": {
                                              "description": "块索引",
                                              "type": "number"
                                            },
                                            "score": {
                                              "description": "评分列表",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "评分类型",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "评分值",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "索引",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "检索排名",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "q",
                                            "id",
                                            "datasetId",
                                            "collectionId",
                                            "updateTime",
                                            "sourceName",
                                            "chunkIndex",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "description": "搜索数据引用响应项（精简）",
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "description": "数据 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "chunkIndex": {
                                              "description": "块索引",
                                              "type": "number"
                                            },
                                            "datasetId": {
                                              "description": "数据集 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "collectionId": {
                                              "description": "集合 ID",
                                              "example": "68ee0bd23d17260b7829b137",
                                              "type": "string",
                                              "pattern": "^[0-9a-fA-F]{24}$"
                                            },
                                            "sourceId": {
                                              "description": "来源 ID",
                                              "type": "string"
                                            },
                                            "sourceName": {
                                              "description": "来源名称",
                                              "type": "string"
                                            },
                                            "score": {
                                              "description": "评分列表",
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "description": "评分类型",
                                                    "type": "string",
                                                    "enum": [
                                                      "embedding",
                                                      "fullText",
                                                      "reRank",
                                                      "rrf"
                                                    ]
                                                  },
                                                  "value": {
                                                    "description": "评分值",
                                                    "type": "number"
                                                  },
                                                  "index": {
                                                    "description": "索引",
                                                    "type": "number"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "value",
                                                  "index"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "retrievalRank": {
                                              "description": "检索排名",
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "chunkIndex",
                                            "datasetId",
                                            "collectionId",
                                            "sourceName",
                                            "score"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  },
                                  "toolCiteLinks": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "errorText": {
                                    "type": "object",
                                    "properties": {
                                      "moduleName": {
                                        "type": "string"
                                      },
                                      "errorText": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "moduleName",
                                      "errorText"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "llmModuleAccount": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "historyPreviewLength": {
                                    "deprecated": true,
                                    "type": "number"
                                  },
                                  "_id": {
                                    "example": "68ee0bd23d17260b7829b137",
                                    "description": "ObjectId",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  "dataId": {
                                    "description": "聊天业务标识，用于消息详情、反馈及轮次关联，推荐使用此字段",
                                    "type": "string"
                                  },
                                  "id": {
                                    "deprecated": true,
                                    "description": "兼容旧客户端的 dataId 别名；已弃用，请使用 dataId",
                                    "type": "string"
                                  },
                                  "time": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "obj",
                                  "value",
                                  "dataId"
                                ],
                                "additionalProperties": {},
                                "description": ""
                              }
                            ]
                          }
                        },
                        "total": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "prevCursor": {
                          "description": "向前翻页的 dataId，直接传入 prevId，服务端以 Human 定位轮次起点；无前页或当前列表为空时为 null",
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "nextCursor": {
                          "description": "向后翻页的 dataId，直接传入 nextId，服务端以 AI 定位轮次终点；无后页或当前列表为空时为 null",
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "hasMorePrev",
                        "hasMoreNext",
                        "list",
                        "total",
                        "prevCursor",
                        "nextCursor"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/getResData": {
      "get": {
        "summary": "获取对话响应详细数据",
        "description": "根据 dataId 获取对话中某条 AI 回复的详细响应数据",
        "tags": [
          "对话管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "anyOf": [
                {
                  "title": "应用会话",
                  "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                  "properties": {
                    "appId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a05",
                          "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "first"
                      }
                    },
                    "sourceType": {
                      "allOf": [
                        {
                          "example": "chatAgentHelper",
                          "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                          "type": "string",
                          "enum": [
                            "app",
                            "chatAgentHelper",
                            "workflowBuilder"
                          ]
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "last"
                      }
                    }
                  },
                  "required": [
                    "appId"
                  ],
                  "allOf": [
                    {
                      "anyOf": [
                        {
                          "title": "默认身份",
                          "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                          "type": "object",
                          "properties": {
                            "chatId": {
                              "description": "会话ID",
                              "type": "string",
                              "maxLength": 1024
                            },
                            "dataId": {
                              "description": "对话数据ID",
                              "type": "string"
                            }
                          },
                          "required": [
                            "dataId"
                          ]
                        },
                        {
                          "title": "自定义使用者",
                          "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                          "type": "object",
                          "properties": {
                            "customUid": {
                              "allOf": [
                                {
                                  "example": "customer-42",
                                  "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "会话ID",
                              "type": "string",
                              "maxLength": 1024
                            },
                            "dataId": {
                              "description": "对话数据ID",
                              "type": "string"
                            }
                          },
                          "required": [
                            "dataId",
                            "customUid"
                          ]
                        },
                        {
                          "title": "代理团队成员",
                          "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                          "type": "object",
                          "properties": {
                            "authProxy": {
                              "allOf": [
                                {
                                  "example": "{\"tmbId\":\"68ad85a7463006c963799a06\"}",
                                  "description": "代理身份的 JSON 字符串，例如 {\"tmbId\":\"团队成员ID\"} 或 {\"username\":\"用户名\"}",
                                  "type": "string"
                                }
                              ],
                              "x-fastgpt-union-parameter": {
                                "label": "",
                                "position": "only"
                              }
                            },
                            "chatId": {
                              "description": "会话ID",
                              "type": "string",
                              "maxLength": 1024
                            },
                            "dataId": {
                              "description": "对话数据ID",
                              "type": "string"
                            }
                          },
                          "required": [
                            "dataId",
                            "authProxy"
                          ]
                        }
                      ]
                    },
                    {}
                  ],
                  "x-fastgpt-union-layout": true
                },
                {
                  "title": "Skill 调试会话",
                  "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                  "type": "object",
                  "properties": {
                    "skillId": {
                      "allOf": [
                        {
                          "example": "68ad85a7463006c963799a06",
                          "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    },
                    "chatId": {
                      "description": "会话ID",
                      "type": "string",
                      "maxLength": 1024
                    },
                    "dataId": {
                      "description": "对话数据ID",
                      "type": "string"
                    }
                  },
                  "required": [
                    "skillId",
                    "dataId"
                  ]
                },
                {
                  "title": "外链会话",
                  "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                  "type": "object",
                  "properties": {
                    "outLinkAuthData": {
                      "allOf": [
                        {
                          "example": "{\"shareId\":\"share-id\",\"outLinkUid\":\"outlink-user-id\"}",
                          "description": "外链鉴权数据的 JSON 字符串，包含 shareId 和 outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                          "type": "string"
                        }
                      ],
                      "x-fastgpt-union-parameter": {
                        "label": "",
                        "position": "only"
                      }
                    },
                    "chatId": {
                      "description": "会话ID",
                      "type": "string",
                      "maxLength": 1024
                    },
                    "dataId": {
                      "description": "对话数据ID",
                      "type": "string"
                    }
                  },
                  "required": [
                    "outLinkAuthData",
                    "dataId"
                  ]
                },
                {
                  "title": "应用 API Key（无需 appId）",
                  "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                  "anyOf": [
                    {
                      "title": "默认身份",
                      "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                      "type": "object",
                      "properties": {
                        "chatId": {
                          "description": "会话ID",
                          "type": "string",
                          "maxLength": 1024
                        },
                        "dataId": {
                          "description": "对话数据ID",
                          "type": "string"
                        }
                      },
                      "required": [
                        "dataId"
                      ]
                    },
                    {
                      "title": "自定义使用者",
                      "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                      "type": "object",
                      "properties": {
                        "customUid": {
                          "allOf": [
                            {
                              "example": "customer-42",
                              "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            }
                          ],
                          "x-fastgpt-union-parameter": {
                            "label": "",
                            "position": "only"
                          }
                        },
                        "chatId": {
                          "description": "会话ID",
                          "type": "string",
                          "maxLength": 1024
                        },
                        "dataId": {
                          "description": "对话数据ID",
                          "type": "string"
                        }
                      },
                      "required": [
                        "dataId",
                        "customUid"
                      ]
                    }
                  ]
                }
              ]
            },
            "required": true,
            "style": "form",
            "explode": true,
            "examples": {
              "default": {
                "value": {
                  "appId": "68ad85a7463006c963799a05",
                  "dataId": "string"
                },
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功返回响应数据",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/getQuote": {
      "post": {
        "summary": "获取对话引用数据",
        "description": "获取指定对话消息的数据集引用列表，需要对话访问权限",
        "tags": [
          "对话管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "对话消息 dataId",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "datasetDataIdList": {
                                "example": [
                                  "68ad85a7463006c963799a05"
                                ],
                                "description": "数据集数据 ID 列表",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              },
                              "collectionIdList": {
                                "example": [
                                  "68ad85a7463006c963799a06"
                                ],
                                "description": "集合 ID 列表",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "datasetDataIdList",
                              "collectionIdList"
                            ]
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "对话消息 dataId",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "datasetDataIdList": {
                                "example": [
                                  "68ad85a7463006c963799a05"
                                ],
                                "description": "数据集数据 ID 列表",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              },
                              "collectionIdList": {
                                "example": [
                                  "68ad85a7463006c963799a06"
                                ],
                                "description": "集合 ID 列表",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "datasetDataIdList",
                              "collectionIdList",
                              "customUid"
                            ]
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key 代理调用身份。仅开启 authProxy 的个人密钥可用；按团队成员 ID 或用户名指定，二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "对话消息 dataId",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "datasetDataIdList": {
                                "example": [
                                  "68ad85a7463006c963799a05"
                                ],
                                "description": "数据集数据 ID 列表",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              },
                              "collectionIdList": {
                                "example": [
                                  "68ad85a7463006c963799a06"
                                ],
                                "description": "集合 ID 列表",
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "datasetDataIdList",
                              "collectionIdList",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill 调试会话",
                    "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "chatItemDataId": {
                        "example": "item_abc123",
                        "description": "对话消息 dataId",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "datasetDataIdList": {
                        "example": [
                          "68ad85a7463006c963799a05"
                        ],
                        "description": "数据集数据 ID 列表",
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "collectionIdList": {
                        "example": [
                          "68ad85a7463006c963799a06"
                        ],
                        "description": "集合 ID 列表",
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId",
                      "chatItemDataId",
                      "datasetDataIdList",
                      "collectionIdList"
                    ]
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权数据，包含 shareId/outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "chatItemDataId": {
                        "example": "item_abc123",
                        "description": "对话消息 dataId",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "datasetDataIdList": {
                        "example": [
                          "68ad85a7463006c963799a05"
                        ],
                        "description": "数据集数据 ID 列表",
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "collectionIdList": {
                        "example": [
                          "68ad85a7463006c963799a06"
                        ],
                        "description": "集合 ID 列表",
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId",
                      "chatItemDataId",
                      "datasetDataIdList",
                      "collectionIdList"
                    ]
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "会话ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "chatItemDataId": {
                            "example": "item_abc123",
                            "description": "对话消息 dataId",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "datasetDataIdList": {
                            "example": [
                              "68ad85a7463006c963799a05"
                            ],
                            "description": "数据集数据 ID 列表",
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "collectionIdList": {
                            "example": [
                              "68ad85a7463006c963799a06"
                            ],
                            "description": "集合 ID 列表",
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          }
                        },
                        "required": [
                          "chatId",
                          "chatItemDataId",
                          "datasetDataIdList",
                          "collectionIdList"
                        ]
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "会话ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "chatItemDataId": {
                            "example": "item_abc123",
                            "description": "对话消息 dataId",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "datasetDataIdList": {
                            "example": [
                              "68ad85a7463006c963799a05"
                            ],
                            "description": "数据集数据 ID 列表",
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "collectionIdList": {
                            "example": [
                              "68ad85a7463006c963799a06"
                            ],
                            "description": "集合 ID 列表",
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          }
                        },
                        "required": [
                          "chatId",
                          "chatItemDataId",
                          "datasetDataIdList",
                          "collectionIdList",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "string",
                "chatItemDataId": "item_abc123",
                "datasetDataIdList": [
                  "68ad85a7463006c963799a05"
                ],
                "collectionIdList": [
                  "68ad85a7463006c963799a06"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回引用数据列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "description": "知识库引用数据列表",
                        "type": "object",
                        "properties": {
                          "_id": {
                            "description": "数据 ID",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          },
                          "q": {
                            "description": "问题/主文本",
                            "type": "string"
                          },
                          "a": {
                            "description": "回答/补充文本",
                            "type": "string"
                          },
                          "imagePreivewUrl": {
                            "description": "图片预览 URL",
                            "type": "string"
                          },
                          "history": {
                            "description": "历史版本",
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "q": {
                                  "description": "问题/主文本",
                                  "type": "string"
                                },
                                "a": {
                                  "description": "回答/补充文本",
                                  "type": "string"
                                },
                                "imageId": {
                                  "description": "图片 ID",
                                  "type": "string"
                                },
                                "updateTime": {
                                  "description": "更新时间",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "q",
                                "updateTime"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "updateTime": {
                            "description": "更新时间",
                            "type": "string"
                          },
                          "index": {
                            "description": "块索引",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "updated": {
                            "description": "是否已更新",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "_id",
                          "q",
                          "updateTime",
                          "index"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/getCollectionQuote": {
      "post": {
        "summary": "获取集合分页引用数据",
        "description": "以链式分页方式获取指定集合的引用数据，支持前后翻页，需要对话访问权限",
        "tags": [
          "对话管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "description": "会话 ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "对话消息 dataId",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "collectionId": {
                                "description": "集合 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "pageSize": {
                                "description": "每页条数，默认 20，范围 [1, 30]",
                                "default": 20,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 30
                              },
                              "anchor": {
                                "description": "当前锚点 chunkIndex",
                                "type": "number"
                              },
                              "initialId": {
                                "description": "初始定位数据 ID",
                                "type": "string"
                              },
                              "nextId": {
                                "description": "向后翻页的游标 ID",
                                "type": "string"
                              },
                              "prevId": {
                                "description": "向前翻页的游标 ID",
                                "type": "string"
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "collectionId"
                            ]
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话 ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "对话消息 dataId",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "collectionId": {
                                "description": "集合 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "pageSize": {
                                "description": "每页条数，默认 20，范围 [1, 30]",
                                "default": 20,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 30
                              },
                              "anchor": {
                                "description": "当前锚点 chunkIndex",
                                "type": "number"
                              },
                              "initialId": {
                                "description": "初始定位数据 ID",
                                "type": "string"
                              },
                              "nextId": {
                                "description": "向后翻页的游标 ID",
                                "type": "string"
                              },
                              "prevId": {
                                "description": "向前翻页的游标 ID",
                                "type": "string"
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "collectionId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key 代理调用身份。仅开启 authProxy 的个人密钥可用；按团队成员 ID 或用户名指定，二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "description": "会话 ID",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "chatItemDataId": {
                                "example": "item_abc123",
                                "description": "对话消息 dataId",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "collectionId": {
                                "description": "集合 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "pageSize": {
                                "description": "每页条数，默认 20，范围 [1, 30]",
                                "default": 20,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 30
                              },
                              "anchor": {
                                "description": "当前锚点 chunkIndex",
                                "type": "number"
                              },
                              "initialId": {
                                "description": "初始定位数据 ID",
                                "type": "string"
                              },
                              "nextId": {
                                "description": "向后翻页的游标 ID",
                                "type": "string"
                              },
                              "prevId": {
                                "description": "向前翻页的游标 ID",
                                "type": "string"
                              }
                            },
                            "required": [
                              "chatId",
                              "chatItemDataId",
                              "collectionId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill 调试会话",
                    "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话 ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "chatItemDataId": {
                        "example": "item_abc123",
                        "description": "对话消息 dataId",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "collectionId": {
                        "description": "集合 ID",
                        "example": "68ee0bd23d17260b7829b137",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      "pageSize": {
                        "description": "每页条数，默认 20，范围 [1, 30]",
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 30
                      },
                      "anchor": {
                        "description": "当前锚点 chunkIndex",
                        "type": "number"
                      },
                      "initialId": {
                        "description": "初始定位数据 ID",
                        "type": "string"
                      },
                      "nextId": {
                        "description": "向后翻页的游标 ID",
                        "type": "string"
                      },
                      "prevId": {
                        "description": "向前翻页的游标 ID",
                        "type": "string"
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId",
                      "chatItemDataId",
                      "collectionId"
                    ]
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权数据，包含 shareId/outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "description": "会话 ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      },
                      "chatItemDataId": {
                        "example": "item_abc123",
                        "description": "对话消息 dataId",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "collectionId": {
                        "description": "集合 ID",
                        "example": "68ee0bd23d17260b7829b137",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      "pageSize": {
                        "description": "每页条数，默认 20，范围 [1, 30]",
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 30
                      },
                      "anchor": {
                        "description": "当前锚点 chunkIndex",
                        "type": "number"
                      },
                      "initialId": {
                        "description": "初始定位数据 ID",
                        "type": "string"
                      },
                      "nextId": {
                        "description": "向后翻页的游标 ID",
                        "type": "string"
                      },
                      "prevId": {
                        "description": "向前翻页的游标 ID",
                        "type": "string"
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId",
                      "chatItemDataId",
                      "collectionId"
                    ]
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "description": "会话 ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "chatItemDataId": {
                            "example": "item_abc123",
                            "description": "对话消息 dataId",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "collectionId": {
                            "description": "集合 ID",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          },
                          "pageSize": {
                            "description": "每页条数，默认 20，范围 [1, 30]",
                            "default": 20,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 30
                          },
                          "anchor": {
                            "description": "当前锚点 chunkIndex",
                            "type": "number"
                          },
                          "initialId": {
                            "description": "初始定位数据 ID",
                            "type": "string"
                          },
                          "nextId": {
                            "description": "向后翻页的游标 ID",
                            "type": "string"
                          },
                          "prevId": {
                            "description": "向前翻页的游标 ID",
                            "type": "string"
                          }
                        },
                        "required": [
                          "chatId",
                          "chatItemDataId",
                          "collectionId"
                        ]
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "description": "会话 ID",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "chatItemDataId": {
                            "example": "item_abc123",
                            "description": "对话消息 dataId",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "collectionId": {
                            "description": "集合 ID",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          },
                          "pageSize": {
                            "description": "每页条数，默认 20，范围 [1, 30]",
                            "default": 20,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 30
                          },
                          "anchor": {
                            "description": "当前锚点 chunkIndex",
                            "type": "number"
                          },
                          "initialId": {
                            "description": "初始定位数据 ID",
                            "type": "string"
                          },
                          "nextId": {
                            "description": "向后翻页的游标 ID",
                            "type": "string"
                          },
                          "prevId": {
                            "description": "向前翻页的游标 ID",
                            "type": "string"
                          }
                        },
                        "required": [
                          "chatId",
                          "chatItemDataId",
                          "collectionId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "string",
                "chatItemDataId": "item_abc123",
                "collectionId": "68ee0bd23d17260b7829b137"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回分页引用数据",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "description": "数据 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "q": {
                                "description": "问题/主文本",
                                "type": "string"
                              },
                              "a": {
                                "description": "回答/补充文本",
                                "type": "string"
                              },
                              "imagePreivewUrl": {
                                "description": "图片预览 URL",
                                "type": "string"
                              },
                              "history": {
                                "description": "历史版本",
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "q": {
                                      "description": "问题/主文本",
                                      "type": "string"
                                    },
                                    "a": {
                                      "description": "回答/补充文本",
                                      "type": "string"
                                    },
                                    "imageId": {
                                      "description": "图片 ID",
                                      "type": "string"
                                    },
                                    "updateTime": {
                                      "description": "更新时间",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "q",
                                    "updateTime"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "updateTime": {
                                "description": "更新时间",
                                "type": "string"
                              },
                              "index": {
                                "description": "块索引",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "updated": {
                                "description": "是否已更新",
                                "type": "boolean"
                              },
                              "id": {
                                "description": "数据 ID（alias _id）",
                                "type": "string"
                              },
                              "anchor": {
                                "description": "chunk 序号（alias index）",
                                "type": "number"
                              }
                            },
                            "required": [
                              "_id",
                              "q",
                              "updateTime",
                              "index",
                              "id"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "hasMorePrev": {
                          "description": "是否还有更多前置数据",
                          "type": "boolean"
                        },
                        "hasMoreNext": {
                          "description": "是否还有更多后置数据",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "list",
                        "hasMorePrev",
                        "hasMoreNext"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/chat/record/delete": {
      "delete": {
        "summary": "删除对话",
        "description": "通过 JSON Body 软删除指定消息，outLinkAuthData 传对象，contentIds 传数组。Ask/Preview 的待回答状态由剩余消息推导；删除末轮回答及后续 AI 后可重新回答。",
        "tags": [
          "对话管理"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "应用会话",
                    "description": "通过 appId 定位会话。接口同时支持 API Key 和登录态时，Authorization 优先于 token/Cookie。",
                    "properties": {
                      "appId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "应用 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "sourceType": {
                        "allOf": [
                          {
                            "example": "chatAgentHelper",
                            "description": "appId 对应的会话资源类型。缺省为 App 会话；辅助生成会话传对应 sourceType。",
                            "type": "string",
                            "enum": [
                              "app",
                              "chatAgentHelper",
                              "workflowBuilder"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "appId"
                    ],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "默认身份",
                            "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                            "type": "object",
                            "properties": {
                              "chatId": {
                                "example": "chat123",
                                "description": "会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "contentId": {
                                "example": "content123",
                                "description": "要删除的消息 ID",
                                "type": "string"
                              },
                              "contentIds": {
                                "example": [
                                  "content123",
                                  "content456"
                                ],
                                "description": "要删除的消息 ID 列表",
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "chatId"
                            ]
                          },
                          {
                            "title": "自定义使用者",
                            "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                            "type": "object",
                            "properties": {
                              "customUid": {
                                "allOf": [
                                  {
                                    "example": "customer-42",
                                    "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "contentId": {
                                "example": "content123",
                                "description": "要删除的消息 ID",
                                "type": "string"
                              },
                              "contentIds": {
                                "example": [
                                  "content123",
                                  "content456"
                                ],
                                "description": "要删除的消息 ID 列表",
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "chatId",
                              "customUid"
                            ]
                          },
                          {
                            "title": "代理团队成员",
                            "description": "通过 authProxy 代表同团队成员执行，解析出有效 tmbId 后按该成员权限校验。仅开启代理权限的个人密钥可用，与 customUid 互斥。",
                            "type": "object",
                            "properties": {
                              "authProxy": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "description": "API Key 代理调用身份。仅开启 authProxy 的个人密钥可用；按团队成员 ID 或用户名指定，二者同时传入时优先使用 tmbId，解析时过滤 username；tmbId 无效时不回退到用户名",
                                    "anyOf": [
                                      {
                                        "title": "按团队成员 ID",
                                        "type": "object",
                                        "properties": {
                                          "tmbId": {
                                            "allOf": [
                                              {
                                                "description": "API Key 代理调用的团队成员 ID，优先于 username",
                                                "example": "68ee0bd23d17260b7829b137",
                                                "type": "string",
                                                "pattern": "^[0-9a-fA-F]{24}$"
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "tmbId"
                                        ],
                                        "description": ""
                                      },
                                      {
                                        "title": "按用户名",
                                        "type": "object",
                                        "properties": {
                                          "username": {
                                            "allOf": [
                                              {
                                                "example": "user@example.com",
                                                "description": "API Key 代理调用的团队成员用户名",
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 128
                                              }
                                            ],
                                            "x-fastgpt-union-parameter": {
                                              "label": "",
                                              "position": "only"
                                            }
                                          }
                                        },
                                        "required": [
                                          "username"
                                        ],
                                        "description": ""
                                      }
                                    ]
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "",
                                  "position": "only"
                                }
                              },
                              "chatId": {
                                "example": "chat123",
                                "description": "会话 ID",
                                "type": "string",
                                "maxLength": 1024
                              },
                              "contentId": {
                                "example": "content123",
                                "description": "要删除的消息 ID",
                                "type": "string"
                              },
                              "contentIds": {
                                "example": [
                                  "content123",
                                  "content456"
                                ],
                                "description": "要删除的消息 ID 列表",
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "chatId",
                              "authProxy"
                            ]
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  },
                  {
                    "title": "Skill 调试会话",
                    "description": "通过 skillId 定位调试会话，优先于 appId 并忽略其 sourceType，使用接口允许的请求头凭证鉴权。",
                    "type": "object",
                    "properties": {
                      "skillId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a06",
                            "description": "Skill Edit 调试 ID，使用接口允许的请求头凭证鉴权。",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "example": "chat123",
                        "description": "会话 ID",
                        "type": "string",
                        "maxLength": 1024
                      },
                      "contentId": {
                        "example": "content123",
                        "description": "要删除的消息 ID",
                        "type": "string"
                      },
                      "contentIds": {
                        "example": [
                          "content123",
                          "content456"
                        ],
                        "description": "要删除的消息 ID 列表",
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "skillId",
                      "chatId"
                    ]
                  },
                  {
                    "title": "外链会话",
                    "description": "通过 outLinkAuthData 解析真实应用，优先于 skillId 和 appId 并忽略其 sourceType。外链身份优先于请求头身份；token/Cookie 可以同时传入，受保护外链仍会校验登录态。外链校验失败时不会回退到普通资源鉴权。",
                    "type": "object",
                    "properties": {
                      "outLinkAuthData": {
                        "allOf": [
                          {
                            "description": "外链鉴权数据，包含 shareId/outLinkUid。优先于 skillId 和 appId，忽略低优先级字段；允许同时携带 token/Cookie，受保护外链仍需校验登录态。",
                            "type": "object",
                            "properties": {
                              "shareId": {
                                "description": "分享链接ID",
                                "type": "string",
                                "minLength": 1
                              },
                              "outLinkUid": {
                                "description": "外链用户ID",
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "shareId",
                              "outLinkUid"
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "chatId": {
                        "example": "chat123",
                        "description": "会话 ID",
                        "type": "string",
                        "maxLength": 1024
                      },
                      "contentId": {
                        "example": "content123",
                        "description": "要删除的消息 ID",
                        "type": "string"
                      },
                      "contentIds": {
                        "example": [
                          "content123",
                          "content456"
                        ],
                        "description": "要删除的消息 ID 列表",
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "outLinkAuthData",
                      "chatId"
                    ]
                  },
                  {
                    "title": "应用 API Key（无需 appId）",
                    "description": "Authorization 使用绑定应用的 APP API Key 时无需传 appId 或 sourceType，服务端从 Key 绑定取得应用，sourceType 固定为 app。个人密钥和登录态不能使用此省略方式；显式传入 appId 时仍以 Key 绑定为准。",
                    "anyOf": [
                      {
                        "title": "默认身份",
                        "description": "不传 customUid 和 authProxy，沿用凭证对应的团队成员身份。适用于直接以当前鉴权成员调用应用。",
                        "type": "object",
                        "properties": {
                          "chatId": {
                            "example": "chat123",
                            "description": "会话 ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "contentId": {
                            "example": "content123",
                            "description": "要删除的消息 ID",
                            "type": "string"
                          },
                          "contentIds": {
                            "example": [
                              "content123",
                              "content456"
                            ],
                            "description": "要删除的消息 ID 列表",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "chatId"
                        ]
                      },
                      {
                        "title": "自定义使用者",
                        "description": "通过 customUid 对接自己平台的使用者，不改变鉴权成员及权限。发起对话时作为使用者和工作流 userId；管理对话时按该值限制使用者范围。",
                        "type": "object",
                        "properties": {
                          "customUid": {
                            "allOf": [
                              {
                                "example": "customer-42",
                                "description": "仅普通应用的 API Key 调用支持。精确匹配对话的外部使用者 ID（outLinkUid），不匹配 tmbId；省略时保留原访问范围，传入时限制读取、修改及删除。最长 1024 字符，不接受空字符串或 null，不改变鉴权成员。",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "chatId": {
                            "example": "chat123",
                            "description": "会话 ID",
                            "type": "string",
                            "maxLength": 1024
                          },
                          "contentId": {
                            "example": "content123",
                            "description": "要删除的消息 ID",
                            "type": "string"
                          },
                          "contentIds": {
                            "example": [
                              "content123",
                              "content456"
                            ],
                            "description": "要删除的消息 ID 列表",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "chatId",
                          "customUid"
                        ]
                      }
                    ]
                  }
                ]
              },
              "example": {
                "appId": "68ad85a7463006c963799a05",
                "chatId": "chat123"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "删除成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/create": {
      "post": {
        "summary": "创建知识库",
        "description": "创建新的知识库,支持多种类型(普通知识库、文件夹、网站知识库等)",
        "tags": [
          "知识库管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "parentId": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "父级文件夹 ID,不传则创建在根目录",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "example": "dataset",
                    "description": "知识库类型",
                    "type": "string",
                    "enum": [
                      "folder",
                      "dataset",
                      "websiteDataset",
                      "externalFile",
                      "apiDataset",
                      "feishu",
                      "yuque",
                      "dingtalk"
                    ]
                  },
                  "name": {
                    "example": "我的知识库",
                    "description": "知识库名称",
                    "type": "string"
                  },
                  "intro": {
                    "example": "这是一个用于存储产品文档的知识库",
                    "description": "知识库简介",
                    "type": "string"
                  },
                  "avatar": {
                    "example": "/imgs/dataset/avatar.png",
                    "description": "知识库头像，可不传，返回时使用默认图标",
                    "type": "string"
                  },
                  "vectorModelId": {
                    "description": "向量模型 ID，不传则使用默认向量模型",
                    "type": "string"
                  },
                  "vectorModel": {
                    "example": "text-embedding-3-small",
                    "description": "向量模型标识，不传则使用默认向量模型",
                    "deprecated": true,
                    "type": "string"
                  },
                  "agentModelId": {
                    "description": "知识库 Agent 模型 ID，不传则使用默认模型",
                    "type": "string"
                  },
                  "agentModel": {
                    "example": "gpt-4o-mini",
                    "description": "知识库 Agent 模型标识，不传则使用默认模型",
                    "deprecated": true,
                    "type": "string"
                  },
                  "vlmModelId": {
                    "description": "视觉语言模型 ID；未传沿用默认，null 或空字符串表示不设置",
                    "example": "",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "vlmModel": {
                    "example": "gpt-4o",
                    "description": "视觉语言模型标识",
                    "deprecated": true,
                    "type": "string"
                  },
                  "apiDatasetServer": {
                    "description": "第三方知识库服务器配置(API/飞书/语雀/钉钉)",
                    "type": "object",
                    "properties": {
                      "apiServer": {
                        "description": "API 服务器配置",
                        "type": "object",
                        "properties": {
                          "baseUrl": {
                            "type": "string"
                          },
                          "authorization": {
                            "type": "string"
                          },
                          "basePath": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "baseUrl"
                        ]
                      },
                      "feishuServer": {
                        "description": "飞书服务器配置",
                        "type": "object",
                        "properties": {
                          "appId": {
                            "type": "string"
                          },
                          "appSecret": {
                            "type": "string"
                          },
                          "folderToken": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "appId",
                          "folderToken"
                        ]
                      },
                      "yuqueServer": {
                        "description": "语雀服务器配置",
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "token": {
                            "type": "string"
                          },
                          "basePath": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "userId"
                        ]
                      },
                      "dingtalkServer": {
                        "description": "钉钉知识库配置",
                        "type": "object",
                        "properties": {
                          "appKey": {
                            "type": "string"
                          },
                          "appSecret": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "operatorId": {
                            "type": "string"
                          },
                          "workspaceId": {
                            "type": "string"
                          },
                          "rootNodeId": {
                            "type": "string"
                          },
                          "workspaceName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "appKey",
                          "userId"
                        ]
                      }
                    }
                  },
                  "sangforFileParseConfig": {
                    "description": "外部文档解析开关(页眉页脚/附录/图片识别/图转表),仅对 customPdfParse 解析路径生效",
                    "type": "object",
                    "properties": {
                      "keep_header_footer": {
                        "description": "是否保留页眉页脚，默认关闭（删除页眉页脚）",
                        "type": "boolean"
                      },
                      "keep_appendix": {
                        "description": "是否保留附录，默认开启",
                        "type": "boolean"
                      },
                      "image_analysis": {
                        "description": "是否保留图片识别（含印章）结果，默认关闭",
                        "type": "boolean"
                      },
                      "chart_analysis": {
                        "description": "是否保留图表转表格结果（同时保留原图片），默认关闭",
                        "type": "boolean"
                      }
                    }
                  },
                  "inheritPermission": {
                    "example": true,
                    "description": "是否继承父级权限（默认 true）：true = 创建时合并父级权限快照，并跟随父级后续权限变更；false = 独立创建，仅写创建者 owner 权限，不合并父级权限，父级后续权限变更也不再传播到该节点",
                    "type": "boolean"
                  }
                },
                "required": [
                  "type",
                  "name",
                  "intro"
                ]
              },
              "example": {
                "type": "folder",
                "name": "我的知识库",
                "intro": "这是一个用于存储产品文档的知识库"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回新创建的知识库 ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/list": {
      "post": {
        "deprecated": true,
        "summary": "获取知识库列表",
        "description": "已弃用，请使用 POST /core/dataset/listV2。旧接口保留兼容，返回当前用户有权限访问的知识库数组，支持按类型和关键词筛选；V2 返回分页结构 { list, total }",
        "tags": [
          "知识库管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "example": {
                  "parentId": null,
                  "type": "dataset",
                  "searchKey": "产品文档"
                },
                "type": "object",
                "properties": {
                  "parentId": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "父级文件夹 ID,null 或不传表示根目录",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "example": "dataset",
                    "description": "知识库类型筛选",
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "folder",
                          "dataset",
                          "websiteDataset",
                          "externalFile",
                          "apiDataset",
                          "feishu",
                          "yuque",
                          "dingtalk"
                        ]
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "folder",
                            "dataset",
                            "websiteDataset",
                            "externalFile",
                            "apiDataset",
                            "feishu",
                            "yuque",
                            "dingtalk"
                          ]
                        }
                      }
                    ]
                  },
                  "searchKey": {
                    "example": "产品文档",
                    "description": "搜索关键词,按名称和简介模糊匹配",
                    "type": "string"
                  },
                  "sort": {
                    "default": "updateTimeDesc",
                    "example": "updateTimeDesc",
                    "description": "列表排序，缺省按最近修改倒序",
                    "x-enumDescriptions": {
                      "updateTimeDesc": "按修改时间倒序，最近修改的排在前面（默认）",
                      "createTimeDesc": "按创建时间倒序，最新创建的排在前面",
                      "createTimeAsc": "按创建时间升序，最早创建的排在前面"
                    },
                    "type": "string",
                    "enum": [
                      "updateTimeDesc",
                      "createTimeDesc",
                      "createTimeAsc"
                    ]
                  },
                  "tmbIds": {
                    "description": "按创建者筛选；空数组返回空列表",
                    "type": "array",
                    "items": {
                      "example": "68ee0bd23d17260b7829b137",
                      "description": "ObjectId",
                      "type": "string",
                      "pattern": "^[0-9a-fA-F]{24}$"
                    }
                  }
                }
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回知识库列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "_id": {
                            "description": "数据集 ID",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          },
                          "tmbId": {
                            "description": "团队成员 ID",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          },
                          "avatar": {
                            "description": "头像",
                            "default": "/icon/logo.svg",
                            "type": "string"
                          },
                          "createTime": {
                            "description": "创建时间",
                            "type": "string"
                          },
                          "updateTime": {
                            "description": "更新时间",
                            "type": "string"
                          },
                          "name": {
                            "description": "名称",
                            "type": "string"
                          },
                          "intro": {
                            "description": "简介",
                            "type": "string"
                          },
                          "type": {
                            "description": "数据集类型",
                            "type": "string",
                            "enum": [
                              "folder",
                              "dataset",
                              "websiteDataset",
                              "externalFile",
                              "apiDataset",
                              "feishu",
                              "yuque",
                              "dingtalk"
                            ]
                          },
                          "permission": {
                            "description": "权限对象序列化后的 JSON 结构",
                            "type": "object",
                            "properties": {
                              "role": {
                                "description": "权限角色值",
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "isOwner": {
                                "description": "是否为所有者",
                                "type": "boolean"
                              },
                              "hasManagePer": {
                                "description": "是否拥有管理权限",
                                "type": "boolean"
                              },
                              "hasWritePer": {
                                "description": "是否拥有写权限",
                                "type": "boolean"
                              },
                              "hasReadPer": {
                                "description": "是否拥有读权限",
                                "type": "boolean"
                              },
                              "hasManageRole": {
                                "description": "是否包含管理角色",
                                "type": "boolean"
                              },
                              "hasWriteRole": {
                                "description": "是否包含写角色",
                                "type": "boolean"
                              },
                              "hasReadRole": {
                                "description": "是否包含读角色",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "role",
                              "isOwner",
                              "hasManagePer",
                              "hasWritePer",
                              "hasReadPer",
                              "hasManageRole",
                              "hasWriteRole",
                              "hasReadRole"
                            ],
                            "additionalProperties": {}
                          },
                          "appCount": {
                            "description": "被正式应用引用的数量，开启引用统计时仅非文件夹资源的 Owner 返回",
                            "example": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "fileCount": {
                            "description": "知识库所有层级的非目录集合数量，不按文件权限过滤；仅 listV2 请求 withFileCount 时返回，folder 类型不返回",
                            "example": 0,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "vectorModel": {
                            "description": "向量模型；目录或模型已删除时为空，已停用模型仍返回展示数据",
                            "type": "object",
                            "properties": {
                              "pricing": {
                                "description": "每固定计价单位的积分单价；缺省免费",
                                "example": {
                                  "unitPrice": 2
                                },
                                "type": "object",
                                "properties": {
                                  "unitPrice": {
                                    "description": "综合单价；Token/TTS 每百万数量，STT 时长模式固定为每 60 秒",
                                    "example": 2,
                                    "type": "number",
                                    "minimum": 0
                                  }
                                },
                                "additionalProperties": false
                              },
                              "provider": {
                                "type": "string",
                                "minLength": 1
                              },
                              "model": {
                                "type": "string",
                                "minLength": 1
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "scope": {
                                "default": "system",
                                "type": "string",
                                "enum": [
                                  "system",
                                  "team"
                                ]
                              },
                              "sortOrder": {
                                "description": "同一作用域内的模型展示 rank，数值越小越靠前",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "tmbId": {
                                "anyOf": [
                                  {
                                    "example": "68ee0bd23d17260b7829b137",
                                    "description": "ObjectId",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "teamId": {
                                "anyOf": [
                                  {
                                    "example": "68ee0bd23d17260b7829b137",
                                    "description": "ObjectId",
                                    "type": "string",
                                    "pattern": "^[0-9a-fA-F]{24}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isActive": {
                                "type": "boolean"
                              },
                              "isUpcomingDeprecation": {
                                "description": "模型是否即将下架",
                                "example": true,
                                "type": "boolean"
                              },
                              "requestUrl": {
                                "type": "string"
                              },
                              "requestAuth": {
                                "type": "string"
                              },
                              "testMode": {
                                "type": "boolean"
                              },
                              "type": {
                                "type": "string",
                                "const": "embedding"
                              },
                              "config": {
                                "type": "object",
                                "properties": {
                                  "defaultToken": {
                                    "type": "number"
                                  },
                                  "maxToken": {
                                    "type": "number"
                                  },
                                  "weight": {
                                    "default": 0,
                                    "type": "number"
                                  },
                                  "hidden": {
                                    "type": "boolean"
                                  },
                                  "vision": {
                                    "type": "boolean"
                                  },
                                  "normalization": {
                                    "type": "boolean"
                                  },
                                  "batchSize": {
                                    "type": "number"
                                  },
                                  "defaultConfig": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {}
                                  },
                                  "dbConfig": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {}
                                  },
                                  "queryConfig": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {}
                                  }
                                },
                                "required": [
                                  "defaultToken",
                                  "maxToken",
                                  "weight"
                                ],
                                "additionalProperties": false
                              },
                              "modelId": {
                                "type": "string"
                              },
                              "avatar": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "provider",
                              "model",
                              "name",
                              "scope",
                              "type",
                              "config",
                              "modelId"
                            ],
                            "additionalProperties": false
                          },
                          "inheritPermission": {
                            "description": "继承权限",
                            "type": "boolean"
                          },
                          "private": {
                            "description": "是否私有",
                            "type": "boolean"
                          },
                          "folderAccessMode": {
                            "example": "navigate",
                            "description": "文件夹访问方式；navigate 仅允许浏览可读后代，不授予真实读取权限",
                            "type": "string",
                            "enum": [
                              "read",
                              "navigate"
                            ]
                          },
                          "sourceMember": {
                            "description": "来源成员",
                            "type": "object",
                            "properties": {
                              "name": {
                                "example": "张三",
                                "description": "成员名称",
                                "type": "string"
                              },
                              "avatar": {
                                "description": "成员头像",
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "example": "active",
                                "description": "成员状态",
                                "type": "string",
                                "enum": [
                                  "active",
                                  "leave",
                                  "forbidden"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "status"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "_id",
                          "tmbId",
                          "avatar",
                          "createTime",
                          "updateTime",
                          "name",
                          "intro",
                          "type",
                          "permission",
                          "inheritPermission"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/listV2": {
      "post": {
        "summary": "获取知识库列表 V2",
        "description": "分页获取或按 datasetIds 精确查询当前用户有权限访问的知识库；提供 datasetIds 时优先按 ID 查询，解析时过滤 parentId 和分页参数，保留公共筛选字段",
        "tags": [
          "知识库管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "按 IDs 获取",
                    "type": "object",
                    "properties": {
                      "datasetIds": {
                        "allOf": [
                          {
                            "example": [
                              "68ad85a7463006c963799a05"
                            ],
                            "description": "按知识库或文件夹 ID 精确查询，最多 500 个；优先匹配该分支，解析时过滤 parentId 和分页参数，保留公共筛选字段",
                            "minItems": 1,
                            "maxItems": 500,
                            "type": "array",
                            "items": {
                              "example": "68ee0bd23d17260b7829b137",
                              "description": "ObjectId",
                              "type": "string",
                              "pattern": "^[0-9a-fA-F]{24}$"
                            }
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "type": {
                        "example": "dataset",
                        "description": "知识库类型筛选",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "folder",
                              "dataset",
                              "websiteDataset",
                              "externalFile",
                              "apiDataset",
                              "feishu",
                              "yuque",
                              "dingtalk"
                            ]
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "folder",
                                "dataset",
                                "websiteDataset",
                                "externalFile",
                                "apiDataset",
                                "feishu",
                                "yuque",
                                "dingtalk"
                              ]
                            }
                          }
                        ]
                      },
                      "searchKey": {
                        "example": "产品文档",
                        "description": "搜索关键词,按名称和简介模糊匹配",
                        "type": "string"
                      },
                      "sort": {
                        "default": "updateTimeDesc",
                        "example": "updateTimeDesc",
                        "description": "列表排序，缺省按最近修改倒序",
                        "x-enumDescriptions": {
                          "updateTimeDesc": "按修改时间倒序，最近修改的排在前面（默认）",
                          "createTimeDesc": "按创建时间倒序，最新创建的排在前面",
                          "createTimeAsc": "按创建时间升序，最早创建的排在前面"
                        },
                        "type": "string",
                        "enum": [
                          "updateTimeDesc",
                          "createTimeDesc",
                          "createTimeAsc"
                        ]
                      },
                      "tmbIds": {
                        "description": "按创建者筛选；空数组返回空列表",
                        "type": "array",
                        "items": {
                          "example": "68ee0bd23d17260b7829b137",
                          "description": "ObjectId",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      },
                      "withAppCount": {
                        "example": true,
                        "description": "是否返回被正式应用引用的数量；默认不统计，仅非文件夹资源的 Owner 可查看",
                        "type": "boolean"
                      },
                      "withFileCount": {
                        "example": true,
                        "description": "是否计算并返回知识库文件总数，默认不计算；统计所有层级的非目录集合，不按文件权限过滤",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "datasetIds"
                    ],
                    "description": ""
                  },
                  {
                    "title": "分页获取",
                    "description": "",
                    "properties": {
                      "parentId": {
                        "allOf": [
                          {
                            "example": null,
                            "description": "父级文件夹 ID；null 或空字符串表示根目录；搜索时限定在指定目录及其子树，不传则搜索全部可读知识库",
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^([0-9a-fA-F]{24})?$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [],
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "title": "按偏移量获取",
                            "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                            "type": "object",
                            "properties": {
                              "offset": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "分页参数"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "first"
                                },
                                "example": 0,
                                "description": "偏移量，从 0 开始",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "example": 20,
                                    "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "last"
                                }
                              },
                              "type": {
                                "example": "dataset",
                                "description": "知识库类型筛选",
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "folder",
                                      "dataset",
                                      "websiteDataset",
                                      "externalFile",
                                      "apiDataset",
                                      "feishu",
                                      "yuque",
                                      "dingtalk"
                                    ]
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "folder",
                                        "dataset",
                                        "websiteDataset",
                                        "externalFile",
                                        "apiDataset",
                                        "feishu",
                                        "yuque",
                                        "dingtalk"
                                      ]
                                    }
                                  }
                                ]
                              },
                              "searchKey": {
                                "example": "产品文档",
                                "description": "搜索关键词,按名称和简介模糊匹配",
                                "type": "string"
                              },
                              "sort": {
                                "default": "updateTimeDesc",
                                "example": "updateTimeDesc",
                                "description": "列表排序，缺省按最近修改倒序",
                                "x-enumDescriptions": {
                                  "updateTimeDesc": "按修改时间倒序，最近修改的排在前面（默认）",
                                  "createTimeDesc": "按创建时间倒序，最新创建的排在前面",
                                  "createTimeAsc": "按创建时间升序，最早创建的排在前面"
                                },
                                "type": "string",
                                "enum": [
                                  "updateTimeDesc",
                                  "createTimeDesc",
                                  "createTimeAsc"
                                ]
                              },
                              "tmbIds": {
                                "description": "按创建者筛选；空数组返回空列表",
                                "type": "array",
                                "items": {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                }
                              },
                              "withAppCount": {
                                "example": true,
                                "description": "是否返回被正式应用引用的数量；默认不统计，仅非文件夹资源的 Owner 可查看",
                                "type": "boolean"
                              },
                              "withFileCount": {
                                "example": true,
                                "description": "是否计算并返回知识库文件总数，默认不计算；统计所有层级的非目录集合，不按文件权限过滤",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "offset"
                            ]
                          },
                          {
                            "title": "按页码获取",
                            "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                            "type": "object",
                            "properties": {
                              "pageNum": {
                                "x-fastgpt-union-group": {
                                  "id": "pagination",
                                  "label": "分页参数"
                                },
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "first"
                                },
                                "example": 1,
                                "description": "页码，从 1 开始；传入 offset 时忽略",
                                "default": 1,
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pageSize": {
                                "allOf": [
                                  {
                                    "x-fastgpt-union-group": {
                                      "id": "pagination",
                                      "label": "分页参数"
                                    },
                                    "example": 20,
                                    "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                                    "default": 20,
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 500
                                  }
                                ],
                                "x-fastgpt-union-parameter": {
                                  "label": "分页参数",
                                  "position": "last"
                                }
                              },
                              "type": {
                                "example": "dataset",
                                "description": "知识库类型筛选",
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "folder",
                                      "dataset",
                                      "websiteDataset",
                                      "externalFile",
                                      "apiDataset",
                                      "feishu",
                                      "yuque",
                                      "dingtalk"
                                    ]
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "folder",
                                        "dataset",
                                        "websiteDataset",
                                        "externalFile",
                                        "apiDataset",
                                        "feishu",
                                        "yuque",
                                        "dingtalk"
                                      ]
                                    }
                                  }
                                ]
                              },
                              "searchKey": {
                                "example": "产品文档",
                                "description": "搜索关键词,按名称和简介模糊匹配",
                                "type": "string"
                              },
                              "sort": {
                                "default": "updateTimeDesc",
                                "example": "updateTimeDesc",
                                "description": "列表排序，缺省按最近修改倒序",
                                "x-enumDescriptions": {
                                  "updateTimeDesc": "按修改时间倒序，最近修改的排在前面（默认）",
                                  "createTimeDesc": "按创建时间倒序，最新创建的排在前面",
                                  "createTimeAsc": "按创建时间升序，最早创建的排在前面"
                                },
                                "type": "string",
                                "enum": [
                                  "updateTimeDesc",
                                  "createTimeDesc",
                                  "createTimeAsc"
                                ]
                              },
                              "tmbIds": {
                                "description": "按创建者筛选；空数组返回空列表",
                                "type": "array",
                                "items": {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                }
                              },
                              "withAppCount": {
                                "example": true,
                                "description": "是否返回被正式应用引用的数量；默认不统计，仅非文件夹资源的 Owner 可查看",
                                "type": "boolean"
                              },
                              "withFileCount": {
                                "example": true,
                                "description": "是否计算并返回知识库文件总数，默认不计算；统计所有层级的非目录集合，不按文件权限过滤",
                                "type": "boolean"
                              }
                            }
                          }
                        ]
                      },
                      {}
                    ],
                    "x-fastgpt-union-layout": true
                  }
                ]
              },
              "example": {
                "datasetIds": [
                  "68ad85a7463006c963799a05"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回知识库列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "default": 0,
                          "type": "number"
                        },
                        "list": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "description": "数据集 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "tmbId": {
                                "description": "团队成员 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "avatar": {
                                "description": "头像",
                                "default": "/icon/logo.svg",
                                "type": "string"
                              },
                              "createTime": {
                                "description": "创建时间",
                                "type": "string"
                              },
                              "updateTime": {
                                "description": "更新时间",
                                "type": "string"
                              },
                              "name": {
                                "description": "名称",
                                "type": "string"
                              },
                              "intro": {
                                "description": "简介",
                                "type": "string"
                              },
                              "type": {
                                "description": "数据集类型",
                                "type": "string",
                                "enum": [
                                  "folder",
                                  "dataset",
                                  "websiteDataset",
                                  "externalFile",
                                  "apiDataset",
                                  "feishu",
                                  "yuque",
                                  "dingtalk"
                                ]
                              },
                              "permission": {
                                "description": "权限对象序列化后的 JSON 结构",
                                "type": "object",
                                "properties": {
                                  "role": {
                                    "description": "权限角色值",
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "isOwner": {
                                    "description": "是否为所有者",
                                    "type": "boolean"
                                  },
                                  "hasManagePer": {
                                    "description": "是否拥有管理权限",
                                    "type": "boolean"
                                  },
                                  "hasWritePer": {
                                    "description": "是否拥有写权限",
                                    "type": "boolean"
                                  },
                                  "hasReadPer": {
                                    "description": "是否拥有读权限",
                                    "type": "boolean"
                                  },
                                  "hasManageRole": {
                                    "description": "是否包含管理角色",
                                    "type": "boolean"
                                  },
                                  "hasWriteRole": {
                                    "description": "是否包含写角色",
                                    "type": "boolean"
                                  },
                                  "hasReadRole": {
                                    "description": "是否包含读角色",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "role",
                                  "isOwner",
                                  "hasManagePer",
                                  "hasWritePer",
                                  "hasReadPer",
                                  "hasManageRole",
                                  "hasWriteRole",
                                  "hasReadRole"
                                ],
                                "additionalProperties": {}
                              },
                              "appCount": {
                                "description": "被正式应用引用的数量，开启引用统计时仅非文件夹资源的 Owner 返回",
                                "example": 0,
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "fileCount": {
                                "description": "知识库所有层级的非目录集合数量，不按文件权限过滤；仅 listV2 请求 withFileCount 时返回，folder 类型不返回",
                                "example": 0,
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "vectorModel": {
                                "description": "向量模型；目录或模型已删除时为空，已停用模型仍返回展示数据",
                                "type": "object",
                                "properties": {
                                  "pricing": {
                                    "description": "每固定计价单位的积分单价；缺省免费",
                                    "example": {
                                      "unitPrice": 2
                                    },
                                    "type": "object",
                                    "properties": {
                                      "unitPrice": {
                                        "description": "综合单价；Token/TTS 每百万数量，STT 时长模式固定为每 60 秒",
                                        "example": 2,
                                        "type": "number",
                                        "minimum": 0
                                      }
                                    },
                                    "additionalProperties": false
                                  },
                                  "provider": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "model": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "scope": {
                                    "default": "system",
                                    "type": "string",
                                    "enum": [
                                      "system",
                                      "team"
                                    ]
                                  },
                                  "sortOrder": {
                                    "description": "同一作用域内的模型展示 rank，数值越小越靠前",
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "tmbId": {
                                    "anyOf": [
                                      {
                                        "example": "68ee0bd23d17260b7829b137",
                                        "description": "ObjectId",
                                        "type": "string",
                                        "pattern": "^[0-9a-fA-F]{24}$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "teamId": {
                                    "anyOf": [
                                      {
                                        "example": "68ee0bd23d17260b7829b137",
                                        "description": "ObjectId",
                                        "type": "string",
                                        "pattern": "^[0-9a-fA-F]{24}$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "isActive": {
                                    "type": "boolean"
                                  },
                                  "isUpcomingDeprecation": {
                                    "description": "模型是否即将下架",
                                    "example": true,
                                    "type": "boolean"
                                  },
                                  "requestUrl": {
                                    "type": "string"
                                  },
                                  "requestAuth": {
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "embedding"
                                  },
                                  "config": {
                                    "type": "object",
                                    "properties": {
                                      "defaultToken": {
                                        "type": "number"
                                      },
                                      "maxToken": {
                                        "type": "number"
                                      },
                                      "weight": {
                                        "default": 0,
                                        "type": "number"
                                      },
                                      "hidden": {
                                        "type": "boolean"
                                      },
                                      "vision": {
                                        "type": "boolean"
                                      },
                                      "normalization": {
                                        "type": "boolean"
                                      },
                                      "batchSize": {
                                        "type": "number"
                                      },
                                      "defaultConfig": {
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      },
                                      "dbConfig": {
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      },
                                      "queryConfig": {
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      }
                                    },
                                    "required": [
                                      "defaultToken",
                                      "maxToken",
                                      "weight"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "modelId": {
                                    "type": "string"
                                  },
                                  "avatar": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "model",
                                  "name",
                                  "scope",
                                  "type",
                                  "config",
                                  "modelId"
                                ],
                                "additionalProperties": false
                              },
                              "inheritPermission": {
                                "description": "继承权限",
                                "type": "boolean"
                              },
                              "private": {
                                "description": "是否私有",
                                "type": "boolean"
                              },
                              "folderAccessMode": {
                                "example": "navigate",
                                "description": "文件夹访问方式；navigate 仅允许浏览可读后代，不授予真实读取权限",
                                "type": "string",
                                "enum": [
                                  "read",
                                  "navigate"
                                ]
                              },
                              "sourceMember": {
                                "description": "来源成员",
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "example": "张三",
                                    "description": "成员名称",
                                    "type": "string"
                                  },
                                  "avatar": {
                                    "description": "成员头像",
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "example": "active",
                                    "description": "成员状态",
                                    "type": "string",
                                    "enum": [
                                      "active",
                                      "leave",
                                      "forbidden"
                                    ]
                                  }
                                },
                                "required": [
                                  "name",
                                  "status"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "_id",
                              "tmbId",
                              "avatar",
                              "createTime",
                              "updateTime",
                              "name",
                              "intro",
                              "type",
                              "permission",
                              "inheritPermission"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "total",
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/detail": {
      "get": {
        "summary": "获取知识库详情",
        "description": "获取知识库详细信息,包括模型配置、权限和同步状态",
        "tags": [
          "知识库管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "example": "68ad85a7463006c963799a05",
              "description": "知识库 ID",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "required": true,
            "description": "知识库 ID",
            "examples": {
              "default": {
                "value": "68ad85a7463006c963799a05",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功返回知识库详情（不包含创建时间）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "description": "数据集 ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "parentId": {
                          "description": "父级 ID",
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^([0-9a-fA-F]{24})?$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "userId": {
                          "description": "用户 ID",
                          "deprecated": true,
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "teamId": {
                          "description": "团队 ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "tmbId": {
                          "description": "团队成员 ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "updateTime": {
                          "description": "更新时间",
                          "type": "string"
                        },
                        "inheritPermission": {
                          "description": "继承权限",
                          "type": "boolean"
                        },
                        "collectionPermissionEnabled": {
                          "description": "collection 级权限开关：false 表示关闭态（默认，可读性等于 dataset）",
                          "type": "boolean"
                        },
                        "avatar": {
                          "description": "头像",
                          "default": "/icon/logo.svg",
                          "type": "string"
                        },
                        "name": {
                          "description": "名称",
                          "type": "string"
                        },
                        "intro": {
                          "description": "简介",
                          "type": "string"
                        },
                        "type": {
                          "description": "数据集类型",
                          "type": "string",
                          "enum": [
                            "folder",
                            "dataset",
                            "websiteDataset",
                            "externalFile",
                            "apiDataset",
                            "feishu",
                            "yuque",
                            "dingtalk"
                          ]
                        },
                        "vectorModelId": {
                          "description": "向量模型 ID",
                          "type": "string"
                        },
                        "agentModelId": {
                          "description": "AI 模型 ID",
                          "type": "string"
                        },
                        "vlmModelId": {
                          "description": "视觉语言模型 ID",
                          "type": "string"
                        },
                        "websiteConfig": {
                          "description": "网站配置",
                          "type": "object",
                          "properties": {
                            "url": {
                              "description": "网站 URL",
                              "type": "string"
                            },
                            "selector": {
                              "description": "网站选择器",
                              "type": "string"
                            }
                          },
                          "required": [
                            "url",
                            "selector"
                          ],
                          "additionalProperties": false
                        },
                        "chunkSettings": {
                          "description": "分块配置",
                          "type": "object",
                          "properties": {
                            "trainingType": {
                              "description": "训练类型",
                              "type": "string",
                              "enum": [
                                "chunk",
                                "qa",
                                "imageParse",
                                "backup",
                                "template",
                                "auto"
                              ]
                            },
                            "chunkTriggerType": {
                              "description": "分块触发时机",
                              "type": "string",
                              "enum": [
                                "minSize",
                                "forceChunk",
                                "maxSize"
                              ]
                            },
                            "chunkTriggerMinSize": {
                              "description": "分块触发最小大小",
                              "type": "number"
                            },
                            "dataEnhanceCollectionName": {
                              "description": "增加集合名到分块里",
                              "type": "boolean"
                            },
                            "imageIndex": {
                              "description": "图片索引",
                              "type": "boolean"
                            },
                            "autoIndexes": {
                              "description": "自动生成索引",
                              "type": "boolean"
                            },
                            "indexPrefixTitle": {
                              "description": "索引前缀标题",
                              "type": "boolean"
                            },
                            "chunkSettingMode": {
                              "description": "系统参数/自定义参数",
                              "type": "string",
                              "enum": [
                                "auto",
                                "custom",
                                "intelligent"
                              ]
                            },
                            "chunkSplitMode": {
                              "description": "分块拆分模式",
                              "type": "string",
                              "enum": [
                                "paragraph",
                                "size",
                                "char"
                              ]
                            },
                            "paragraphChunkAIMode": {
                              "description": "段落分块 AI 模式",
                              "type": "string",
                              "enum": [
                                "auto",
                                "force",
                                "forbid"
                              ]
                            },
                            "paragraphChunkDeep": {
                              "description": "段落分块深度",
                              "type": "number"
                            },
                            "paragraphChunkMinSize": {
                              "description": "段落分块最小大小",
                              "type": "number"
                            },
                            "chunkSize": {
                              "description": "分块大小",
                              "type": "number"
                            },
                            "chunkSplitter": {
                              "description": "自定义最高优先分割符号",
                              "type": "string"
                            },
                            "indexSize": {
                              "description": "索引大小",
                              "type": "number"
                            },
                            "qaPrompt": {
                              "description": "QA 拆分提示词",
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        "sangforFileParseConfig": {
                          "description": "外部文档解析配置",
                          "type": "object",
                          "properties": {
                            "keep_header_footer": {
                              "description": "是否保留页眉页脚，默认关闭（删除页眉页脚）",
                              "type": "boolean"
                            },
                            "keep_appendix": {
                              "description": "是否保留附录，默认开启",
                              "type": "boolean"
                            },
                            "image_analysis": {
                              "description": "是否保留图片识别（含印章）结果，默认关闭",
                              "type": "boolean"
                            },
                            "chart_analysis": {
                              "description": "是否保留图表转表格结果（同时保留原图片），默认关闭",
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        },
                        "apiDatasetServer": {
                          "description": "API 服务器配置",
                          "type": "object",
                          "properties": {
                            "apiServer": {
                              "description": "API 服务器配置",
                              "type": "object",
                              "properties": {
                                "baseUrl": {
                                  "type": "string"
                                },
                                "authorization": {
                                  "type": "string"
                                },
                                "basePath": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "baseUrl"
                              ],
                              "additionalProperties": false
                            },
                            "feishuServer": {
                              "description": "飞书服务器配置",
                              "type": "object",
                              "properties": {
                                "appId": {
                                  "type": "string"
                                },
                                "appSecret": {
                                  "type": "string"
                                },
                                "folderToken": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "appId",
                                "folderToken"
                              ],
                              "additionalProperties": false
                            },
                            "yuqueServer": {
                              "description": "语雀服务器配置",
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "token": {
                                  "type": "string"
                                },
                                "basePath": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "userId"
                              ],
                              "additionalProperties": false
                            },
                            "dingtalkServer": {
                              "description": "钉钉知识库配置",
                              "type": "object",
                              "properties": {
                                "appKey": {
                                  "type": "string"
                                },
                                "appSecret": {
                                  "type": "string"
                                },
                                "userId": {
                                  "type": "string"
                                },
                                "operatorId": {
                                  "type": "string"
                                },
                                "workspaceId": {
                                  "type": "string"
                                },
                                "rootNodeId": {
                                  "type": "string"
                                },
                                "workspaceName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "appKey",
                                "userId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false
                        },
                        "deleteTime": {
                          "description": "删除时间",
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "autoSync": {
                          "description": "自动同步",
                          "type": "boolean"
                        },
                        "externalReadUrl": {
                          "description": "外部读取 URL",
                          "deprecated": true,
                          "type": "string"
                        },
                        "defaultPermission": {
                          "description": "默认权限",
                          "deprecated": true,
                          "type": "number"
                        },
                        "apiServer": {
                          "description": "API 服务器配置",
                          "deprecated": true,
                          "type": "object",
                          "properties": {
                            "baseUrl": {
                              "type": "string"
                            },
                            "authorization": {
                              "type": "string"
                            },
                            "basePath": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "baseUrl"
                          ],
                          "additionalProperties": false
                        },
                        "feishuServer": {
                          "description": "飞书服务器配置",
                          "deprecated": true,
                          "type": "object",
                          "properties": {
                            "appId": {
                              "type": "string"
                            },
                            "appSecret": {
                              "type": "string"
                            },
                            "folderToken": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "appId",
                            "folderToken"
                          ],
                          "additionalProperties": false
                        },
                        "yuqueServer": {
                          "description": "语雀服务器配置",
                          "deprecated": true,
                          "type": "object",
                          "properties": {
                            "userId": {
                              "type": "string"
                            },
                            "token": {
                              "type": "string"
                            },
                            "basePath": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        "dingtalkServer": {
                          "description": "钉钉知识库配置",
                          "deprecated": true,
                          "type": "object",
                          "properties": {
                            "appKey": {
                              "type": "string"
                            },
                            "appSecret": {
                              "type": "string"
                            },
                            "userId": {
                              "type": "string"
                            },
                            "operatorId": {
                              "type": "string"
                            },
                            "workspaceId": {
                              "type": "string"
                            },
                            "rootNodeId": {
                              "type": "string"
                            },
                            "workspaceName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "appKey",
                            "userId"
                          ],
                          "additionalProperties": false
                        },
                        "status": {
                          "description": "状态",
                          "type": "string",
                          "enum": [
                            "active",
                            "syncing",
                            "waiting",
                            "error"
                          ]
                        },
                        "hasTrainingTask": {
                          "description": "是否存在普通训练任务或待处理、处理中、失败的索引/同义词重建数据",
                          "example": false,
                          "type": "boolean"
                        },
                        "errorMsg": {
                          "description": "错误信息",
                          "type": "string"
                        },
                        "vectorModel": {
                          "description": "向量模型；模型已删除时为空，已停用模型仍返回展示数据",
                          "type": "object",
                          "properties": {
                            "pricing": {
                              "description": "每固定计价单位的积分单价；缺省免费",
                              "example": {
                                "unitPrice": 2
                              },
                              "type": "object",
                              "properties": {
                                "unitPrice": {
                                  "description": "综合单价；Token/TTS 每百万数量，STT 时长模式固定为每 60 秒",
                                  "example": 2,
                                  "type": "number",
                                  "minimum": 0
                                }
                              },
                              "additionalProperties": false
                            },
                            "provider": {
                              "type": "string",
                              "minLength": 1
                            },
                            "model": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "scope": {
                              "default": "system",
                              "type": "string",
                              "enum": [
                                "system",
                                "team"
                              ]
                            },
                            "sortOrder": {
                              "description": "同一作用域内的模型展示 rank，数值越小越靠前",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "tmbId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "teamId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "isActive": {
                              "type": "boolean"
                            },
                            "isUpcomingDeprecation": {
                              "description": "模型是否即将下架",
                              "example": true,
                              "type": "boolean"
                            },
                            "requestUrl": {
                              "type": "string"
                            },
                            "requestAuth": {
                              "type": "string"
                            },
                            "testMode": {
                              "type": "boolean"
                            },
                            "type": {
                              "type": "string",
                              "const": "embedding"
                            },
                            "config": {
                              "type": "object",
                              "properties": {
                                "defaultToken": {
                                  "type": "number"
                                },
                                "maxToken": {
                                  "type": "number"
                                },
                                "weight": {
                                  "default": 0,
                                  "type": "number"
                                },
                                "hidden": {
                                  "type": "boolean"
                                },
                                "vision": {
                                  "type": "boolean"
                                },
                                "normalization": {
                                  "type": "boolean"
                                },
                                "batchSize": {
                                  "type": "number"
                                },
                                "defaultConfig": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                "dbConfig": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                "queryConfig": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                }
                              },
                              "required": [
                                "defaultToken",
                                "maxToken",
                                "weight"
                              ],
                              "additionalProperties": false
                            },
                            "modelId": {
                              "type": "string"
                            },
                            "avatar": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "provider",
                            "model",
                            "name",
                            "scope",
                            "type",
                            "config",
                            "modelId"
                          ],
                          "additionalProperties": false
                        },
                        "agentModel": {
                          "description": "AI 模型；模型已删除时为空，已停用模型仍返回展示数据",
                          "type": "object",
                          "properties": {
                            "pricing": {
                              "description": "LLM 每百万 Tokens 阶梯价格；缺省免费",
                              "example": {
                                "tiers": [
                                  {
                                    "inputPrice": 2,
                                    "outputPrice": 4
                                  }
                                ]
                              },
                              "type": "object",
                              "properties": {
                                "tiers": {
                                  "description": "LLM 阶梯价格，下限从上一档上限推导",
                                  "maxItems": 5,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "maxInputTokensK": {
                                        "description": "本档输入上限，单位 K Tokens；省略表示无限",
                                        "example": 32,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "inputPrice": {
                                        "description": "每百万输入 Tokens 的积分单价",
                                        "example": 2,
                                        "type": "number",
                                        "minimum": 0
                                      },
                                      "outputPrice": {
                                        "description": "每百万输出 Tokens 的积分单价",
                                        "example": 4,
                                        "type": "number",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "inputPrice",
                                      "outputPrice"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "additionalProperties": false
                            },
                            "provider": {
                              "type": "string",
                              "minLength": 1
                            },
                            "model": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "scope": {
                              "default": "system",
                              "type": "string",
                              "enum": [
                                "system",
                                "team"
                              ]
                            },
                            "sortOrder": {
                              "description": "同一作用域内的模型展示 rank，数值越小越靠前",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "tmbId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "teamId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "isActive": {
                              "type": "boolean"
                            },
                            "isUpcomingDeprecation": {
                              "description": "模型是否即将下架",
                              "example": true,
                              "type": "boolean"
                            },
                            "requestUrl": {
                              "type": "string"
                            },
                            "requestAuth": {
                              "type": "string"
                            },
                            "testMode": {
                              "type": "boolean"
                            },
                            "type": {
                              "type": "string",
                              "const": "llm"
                            },
                            "config": {
                              "type": "object",
                              "properties": {
                                "maxContext": {
                                  "type": "number"
                                },
                                "maxResponse": {
                                  "type": "number"
                                },
                                "quoteMaxToken": {
                                  "type": "number"
                                },
                                "maxTemperature": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "showTopP": {
                                  "type": "boolean"
                                },
                                "responseFormatList": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "showStopSign": {
                                  "type": "boolean"
                                },
                                "censor": {
                                  "type": "boolean"
                                },
                                "vision": {
                                  "type": "boolean"
                                },
                                "audio": {
                                  "type": "boolean"
                                },
                                "video": {
                                  "type": "boolean"
                                },
                                "reasoning": {
                                  "type": "boolean"
                                },
                                "reasoningEffort": {
                                  "type": "boolean"
                                },
                                "functionCall": {
                                  "type": "boolean"
                                },
                                "toolChoice": {
                                  "type": "boolean"
                                },
                                "defaultSystemChatPrompt": {
                                  "type": "string"
                                },
                                "defaultConfig": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                "fieldMap": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "maxContext",
                                "maxResponse",
                                "quoteMaxToken"
                              ],
                              "additionalProperties": false
                            },
                            "modelId": {
                              "type": "string"
                            },
                            "avatar": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "provider",
                            "model",
                            "name",
                            "scope",
                            "type",
                            "config",
                            "modelId"
                          ],
                          "additionalProperties": false
                        },
                        "vlmModel": {
                          "description": "视觉语言模型",
                          "type": "object",
                          "properties": {
                            "pricing": {
                              "description": "LLM 每百万 Tokens 阶梯价格；缺省免费",
                              "example": {
                                "tiers": [
                                  {
                                    "inputPrice": 2,
                                    "outputPrice": 4
                                  }
                                ]
                              },
                              "type": "object",
                              "properties": {
                                "tiers": {
                                  "description": "LLM 阶梯价格，下限从上一档上限推导",
                                  "maxItems": 5,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "maxInputTokensK": {
                                        "description": "本档输入上限，单位 K Tokens；省略表示无限",
                                        "example": 32,
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "inputPrice": {
                                        "description": "每百万输入 Tokens 的积分单价",
                                        "example": 2,
                                        "type": "number",
                                        "minimum": 0
                                      },
                                      "outputPrice": {
                                        "description": "每百万输出 Tokens 的积分单价",
                                        "example": 4,
                                        "type": "number",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "inputPrice",
                                      "outputPrice"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "additionalProperties": false
                            },
                            "provider": {
                              "type": "string",
                              "minLength": 1
                            },
                            "model": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "scope": {
                              "default": "system",
                              "type": "string",
                              "enum": [
                                "system",
                                "team"
                              ]
                            },
                            "sortOrder": {
                              "description": "同一作用域内的模型展示 rank，数值越小越靠前",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "tmbId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "teamId": {
                              "anyOf": [
                                {
                                  "example": "68ee0bd23d17260b7829b137",
                                  "description": "ObjectId",
                                  "type": "string",
                                  "pattern": "^[0-9a-fA-F]{24}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "isActive": {
                              "type": "boolean"
                            },
                            "isUpcomingDeprecation": {
                              "description": "模型是否即将下架",
                              "example": true,
                              "type": "boolean"
                            },
                            "requestUrl": {
                              "type": "string"
                            },
                            "requestAuth": {
                              "type": "string"
                            },
                            "testMode": {
                              "type": "boolean"
                            },
                            "type": {
                              "type": "string",
                              "const": "llm"
                            },
                            "config": {
                              "type": "object",
                              "properties": {
                                "maxContext": {
                                  "type": "number"
                                },
                                "maxResponse": {
                                  "type": "number"
                                },
                                "quoteMaxToken": {
                                  "type": "number"
                                },
                                "maxTemperature": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "showTopP": {
                                  "type": "boolean"
                                },
                                "responseFormatList": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "showStopSign": {
                                  "type": "boolean"
                                },
                                "censor": {
                                  "type": "boolean"
                                },
                                "vision": {
                                  "type": "boolean"
                                },
                                "audio": {
                                  "type": "boolean"
                                },
                                "video": {
                                  "type": "boolean"
                                },
                                "reasoning": {
                                  "type": "boolean"
                                },
                                "reasoningEffort": {
                                  "type": "boolean"
                                },
                                "functionCall": {
                                  "type": "boolean"
                                },
                                "toolChoice": {
                                  "type": "boolean"
                                },
                                "defaultSystemChatPrompt": {
                                  "type": "string"
                                },
                                "defaultConfig": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                "fieldMap": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "maxContext",
                                "maxResponse",
                                "quoteMaxToken"
                              ],
                              "additionalProperties": false
                            },
                            "modelId": {
                              "type": "string"
                            },
                            "avatar": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "provider",
                            "model",
                            "name",
                            "scope",
                            "type",
                            "config",
                            "modelId"
                          ],
                          "additionalProperties": false
                        },
                        "permission": {
                          "description": "权限对象序列化后的 JSON 结构",
                          "type": "object",
                          "properties": {
                            "role": {
                              "description": "权限角色值",
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "isOwner": {
                              "description": "是否为所有者",
                              "type": "boolean"
                            },
                            "hasManagePer": {
                              "description": "是否拥有管理权限",
                              "type": "boolean"
                            },
                            "hasWritePer": {
                              "description": "是否拥有写权限",
                              "type": "boolean"
                            },
                            "hasReadPer": {
                              "description": "是否拥有读权限",
                              "type": "boolean"
                            },
                            "hasManageRole": {
                              "description": "是否包含管理角色",
                              "type": "boolean"
                            },
                            "hasWriteRole": {
                              "description": "是否包含写角色",
                              "type": "boolean"
                            },
                            "hasReadRole": {
                              "description": "是否包含读角色",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "role",
                            "isOwner",
                            "hasManagePer",
                            "hasWritePer",
                            "hasReadPer",
                            "hasManageRole",
                            "hasWriteRole",
                            "hasReadRole"
                          ],
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "_id",
                        "teamId",
                        "tmbId",
                        "updateTime",
                        "inheritPermission",
                        "avatar",
                        "name",
                        "intro",
                        "type",
                        "status",
                        "hasTrainingTask",
                        "permission"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/delete": {
      "delete": {
        "summary": "删除知识库",
        "description": "删除知识库及其所有子知识库,需要所有者权限",
        "tags": [
          "知识库管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "example": "68ad85a7463006c963799a05",
              "description": "知识库 ID",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "required": true,
            "description": "知识库 ID",
            "examples": {
              "default": {
                "value": "68ad85a7463006c963799a05",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功删除知识库",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/update": {
      "put": {
        "summary": "更新知识库",
        "description": "更新知识库信息、配置或移动知识库到其他目录",
        "tags": [
          "知识库管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "知识库 ID",
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$"
                  },
                  "parentId": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "父级文件夹 ID,传 null 表示移动到根目录",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "example": "我的知识库",
                    "description": "知识库名称",
                    "type": "string"
                  },
                  "avatar": {
                    "example": "/imgs/dataset/avatar.png",
                    "description": "知识库头像",
                    "type": "string"
                  },
                  "intro": {
                    "example": "这是一个用于存储产品文档的知识库",
                    "description": "知识库简介",
                    "type": "string"
                  },
                  "agentModelId": {
                    "description": "知识库 Agent 模型 ID；未传不修改，不允许清空",
                    "type": "string",
                    "minLength": 1
                  },
                  "agentModel": {
                    "description": "旧版知识库 Agent 模型标识，仅未传 agentModelId 时使用",
                    "deprecated": true,
                    "type": "string",
                    "minLength": 1
                  },
                  "vlmModelId": {
                    "description": "视觉语言模型 ID；未传不修改，null 或空字符串表示清空",
                    "example": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "vlmModel": {
                    "description": "旧版视觉语言模型标识，仅未传 vlmModelId 时使用；null 或空字符串表示清空",
                    "deprecated": true,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "websiteConfig": {
                    "description": "网站知识库配置",
                    "type": "object",
                    "properties": {
                      "url": {
                        "description": "网站 URL",
                        "type": "string"
                      },
                      "selector": {
                        "description": "网站选择器",
                        "type": "string"
                      }
                    },
                    "required": [
                      "url",
                      "selector"
                    ]
                  },
                  "externalReadUrl": {
                    "description": "外部读取 URL",
                    "type": "string"
                  },
                  "apiDatasetServer": {
                    "description": "第三方知识库服务器配置(API/飞书/语雀/钉钉)",
                    "type": "object",
                    "properties": {
                      "apiServer": {
                        "description": "API 服务器配置",
                        "type": "object",
                        "properties": {
                          "baseUrl": {
                            "type": "string"
                          },
                          "authorization": {
                            "type": "string"
                          },
                          "basePath": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "baseUrl"
                        ]
                      },
                      "feishuServer": {
                        "description": "飞书服务器配置",
                        "type": "object",
                        "properties": {
                          "appId": {
                            "type": "string"
                          },
                          "appSecret": {
                            "type": "string"
                          },
                          "folderToken": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "appId",
                          "folderToken"
                        ]
                      },
                      "yuqueServer": {
                        "description": "语雀服务器配置",
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "token": {
                            "type": "string"
                          },
                          "basePath": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "userId"
                        ]
                      },
                      "dingtalkServer": {
                        "description": "钉钉知识库配置",
                        "type": "object",
                        "properties": {
                          "appKey": {
                            "type": "string"
                          },
                          "appSecret": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "operatorId": {
                            "type": "string"
                          },
                          "workspaceId": {
                            "type": "string"
                          },
                          "rootNodeId": {
                            "type": "string"
                          },
                          "workspaceName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "appKey",
                          "userId"
                        ]
                      }
                    }
                  },
                  "autoSync": {
                    "description": "是否自动同步",
                    "type": "boolean"
                  },
                  "chunkSettings": {
                    "description": "分块配置",
                    "type": "object",
                    "properties": {
                      "trainingType": {
                        "description": "训练类型",
                        "type": "string",
                        "enum": [
                          "chunk",
                          "qa",
                          "imageParse",
                          "backup",
                          "template",
                          "auto"
                        ]
                      },
                      "chunkTriggerType": {
                        "description": "分块触发时机",
                        "type": "string",
                        "enum": [
                          "minSize",
                          "forceChunk",
                          "maxSize"
                        ]
                      },
                      "chunkTriggerMinSize": {
                        "description": "分块触发最小大小",
                        "type": "number"
                      },
                      "dataEnhanceCollectionName": {
                        "description": "增加集合名到分块里",
                        "type": "boolean"
                      },
                      "imageIndex": {
                        "description": "图片索引",
                        "type": "boolean"
                      },
                      "autoIndexes": {
                        "description": "自动生成索引",
                        "type": "boolean"
                      },
                      "indexPrefixTitle": {
                        "description": "索引前缀标题",
                        "type": "boolean"
                      },
                      "chunkSettingMode": {
                        "description": "系统参数/自定义参数",
                        "type": "string",
                        "enum": [
                          "auto",
                          "custom",
                          "intelligent"
                        ]
                      },
                      "chunkSplitMode": {
                        "description": "分块拆分模式",
                        "type": "string",
                        "enum": [
                          "paragraph",
                          "size",
                          "char"
                        ]
                      },
                      "paragraphChunkAIMode": {
                        "description": "段落分块 AI 模式",
                        "type": "string",
                        "enum": [
                          "auto",
                          "force",
                          "forbid"
                        ]
                      },
                      "paragraphChunkDeep": {
                        "description": "段落分块深度",
                        "type": "number"
                      },
                      "paragraphChunkMinSize": {
                        "description": "段落分块最小大小",
                        "type": "number"
                      },
                      "chunkSize": {
                        "description": "分块大小",
                        "type": "number"
                      },
                      "chunkSplitter": {
                        "description": "自定义最高优先分割符号",
                        "type": "string"
                      },
                      "indexSize": {
                        "description": "索引大小",
                        "type": "number"
                      },
                      "qaPrompt": {
                        "description": "QA 拆分提示词",
                        "type": "string"
                      }
                    }
                  },
                  "sangforFileParseConfig": {
                    "description": "外部文档解析开关(页眉页脚/附录/图片识别/图转表),仅对 customPdfParse 解析路径生效;编辑后仅对新解析的文件生效",
                    "type": "object",
                    "properties": {
                      "keep_header_footer": {
                        "description": "是否保留页眉页脚，默认关闭（删除页眉页脚）",
                        "type": "boolean"
                      },
                      "keep_appendix": {
                        "description": "是否保留附录，默认开启",
                        "type": "boolean"
                      },
                      "image_analysis": {
                        "description": "是否保留图片识别（含印章）结果，默认关闭",
                        "type": "boolean"
                      },
                      "chart_analysis": {
                        "description": "是否保留图表转表格结果（同时保留原图片），默认关闭",
                        "type": "boolean"
                      }
                    }
                  }
                },
                "required": [
                  "id"
                ]
              },
              "example": {
                "id": "68ad85a7463006c963799a05"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功更新知识库",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/create": {
      "post": {
        "summary": "创建空集合/目录",
        "description": "创建空数据集合或者目录",
        "tags": [
          "集合创建"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "datasetId": {
                    "description": "数据集 ID",
                    "type": "string"
                  },
                  "parentId": {
                    "description": "父级目录 ID",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "description": "集合名称",
                    "type": "string"
                  },
                  "type": {
                    "description": "集合类型（folder: 文件夹，virtual: 手动集合）",
                    "type": "string",
                    "enum": [
                      "folder",
                      "virtual"
                    ]
                  },
                  "tags": {
                    "description": "标签列表。字符串元素为旧格式标签名（按名称归并到 default_tag array 标签）；对象元素为 { tag: 标签名, value: 标签值 }，按标签名解析",
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tag": {
                              "type": "string"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          },
                          "required": [
                            "tag",
                            "value"
                          ]
                        }
                      ]
                    }
                  },
                  "inheritPermission": {
                    "example": true,
                    "description": "是否继承父级权限（默认 true），仅对文件夹（type=folder）生效，仅供 sangfor 使用（FastGPT UI 未使用）：true = 继承父级（根 folder 继承 dataset）；false = 独立创建，仅写 owner 权限快照、不合并父级权限，父级后续权限变更也不再传播到该节点；传 false 时所属知识库必须已启用文件级权限，否则返回 collectionPermissionDisabled",
                    "type": "boolean"
                  }
                },
                "required": [
                  "datasetId",
                  "name",
                  "type"
                ]
              },
              "example": {
                "datasetId": "string",
                "name": "string",
                "type": "folder"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回新创建的集合 ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/create/localFile": {
      "post": {
        "summary": "上传本地文件创建集合",
        "description": "通过 multipart/form-data 上传文件，自动存储至 S3 后创建集合并触发训练。`file` 字段为二进制文件，`data` 字段为 JSON 序列化的集合参数对象",
        "tags": [
          "集合创建"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "encoding": {
                "data": {
                  "contentType": "application/json"
                }
              },
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "format": "binary",
                    "description": "上传的文件（二进制）",
                    "type": "string"
                  },
                  "data": {
                    "description": "集合参数（JSON 序列化后传入）",
                    "type": "object",
                    "properties": {
                      "trainingType": {
                        "description": "训练类型",
                        "type": "string",
                        "enum": [
                          "chunk",
                          "qa",
                          "imageParse",
                          "backup",
                          "template",
                          "auto"
                        ]
                      },
                      "chunkTriggerType": {
                        "description": "分块触发时机",
                        "type": "string",
                        "enum": [
                          "minSize",
                          "forceChunk",
                          "maxSize"
                        ]
                      },
                      "chunkTriggerMinSize": {
                        "description": "分块触发最小大小",
                        "type": "number"
                      },
                      "dataEnhanceCollectionName": {
                        "description": "增加集合名到分块里",
                        "type": "boolean"
                      },
                      "imageIndex": {
                        "description": "图片索引",
                        "type": "boolean"
                      },
                      "autoIndexes": {
                        "description": "自动生成索引",
                        "type": "boolean"
                      },
                      "indexPrefixTitle": {
                        "description": "索引前缀标题",
                        "type": "boolean"
                      },
                      "chunkSettingMode": {
                        "description": "系统参数/自定义参数",
                        "type": "string",
                        "enum": [
                          "auto",
                          "custom",
                          "intelligent"
                        ]
                      },
                      "chunkSplitMode": {
                        "description": "分块拆分模式",
                        "type": "string",
                        "enum": [
                          "paragraph",
                          "size",
                          "char"
                        ]
                      },
                      "paragraphChunkAIMode": {
                        "description": "段落分块 AI 模式",
                        "type": "string",
                        "enum": [
                          "auto",
                          "force",
                          "forbid"
                        ]
                      },
                      "paragraphChunkDeep": {
                        "description": "段落分块深度",
                        "type": "number"
                      },
                      "paragraphChunkMinSize": {
                        "description": "段落分块最小大小",
                        "type": "number"
                      },
                      "chunkSize": {
                        "description": "分块大小",
                        "type": "number"
                      },
                      "chunkSplitter": {
                        "description": "自定义最高优先分割符号",
                        "type": "string"
                      },
                      "indexSize": {
                        "description": "索引大小",
                        "type": "number"
                      },
                      "qaPrompt": {
                        "description": "QA 拆分提示词",
                        "type": "string"
                      },
                      "parentId": {
                        "description": "父级目录 ID",
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^([0-9a-fA-F]{24})?$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "metadata": {
                        "description": "元数据",
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "customPdfParse": {
                        "description": "自定义 PDF 解析",
                        "type": "boolean"
                      },
                      "datasetId": {
                        "description": "数据集 ID",
                        "type": "string"
                      },
                      "tags": {
                        "description": "标签列表。字符串元素为旧格式标签名（按名称归并到 default_tag array 标签）；对象元素为 { tag: 标签名, value: 标签值 }，按标签名解析",
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "tag",
                                "value"
                              ]
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "datasetId"
                    ]
                  }
                },
                "required": [
                  "file",
                  "data"
                ]
              },
              "example": {
                "file": "string",
                "data": {
                  "datasetId": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回集合 ID 及数据插入结果",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/create/link": {
      "post": {
        "summary": "通过链接创建集合",
        "description": "抓取指定 URL 内容创建集合并触发训练",
        "tags": [
          "集合创建"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "trainingType": {
                    "description": "训练类型",
                    "type": "string",
                    "enum": [
                      "chunk",
                      "qa",
                      "imageParse",
                      "backup",
                      "template",
                      "auto"
                    ]
                  },
                  "chunkTriggerType": {
                    "description": "分块触发时机",
                    "type": "string",
                    "enum": [
                      "minSize",
                      "forceChunk",
                      "maxSize"
                    ]
                  },
                  "chunkTriggerMinSize": {
                    "description": "分块触发最小大小",
                    "type": "number"
                  },
                  "dataEnhanceCollectionName": {
                    "description": "增加集合名到分块里",
                    "type": "boolean"
                  },
                  "imageIndex": {
                    "description": "图片索引",
                    "type": "boolean"
                  },
                  "autoIndexes": {
                    "description": "自动生成索引",
                    "type": "boolean"
                  },
                  "indexPrefixTitle": {
                    "description": "索引前缀标题",
                    "type": "boolean"
                  },
                  "chunkSettingMode": {
                    "description": "系统参数/自定义参数",
                    "type": "string",
                    "enum": [
                      "auto",
                      "custom",
                      "intelligent"
                    ]
                  },
                  "chunkSplitMode": {
                    "description": "分块拆分模式",
                    "type": "string",
                    "enum": [
                      "paragraph",
                      "size",
                      "char"
                    ]
                  },
                  "paragraphChunkAIMode": {
                    "description": "段落分块 AI 模式",
                    "type": "string",
                    "enum": [
                      "auto",
                      "force",
                      "forbid"
                    ]
                  },
                  "paragraphChunkDeep": {
                    "description": "段落分块深度",
                    "type": "number"
                  },
                  "paragraphChunkMinSize": {
                    "description": "段落分块最小大小",
                    "type": "number"
                  },
                  "chunkSize": {
                    "description": "分块大小",
                    "type": "number"
                  },
                  "chunkSplitter": {
                    "description": "自定义最高优先分割符号",
                    "type": "string"
                  },
                  "indexSize": {
                    "description": "索引大小",
                    "type": "number"
                  },
                  "qaPrompt": {
                    "description": "QA 拆分提示词",
                    "type": "string"
                  },
                  "parentId": {
                    "description": "父级目录 ID",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "description": "元数据",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "customPdfParse": {
                    "description": "自定义 PDF 解析",
                    "type": "boolean"
                  },
                  "datasetId": {
                    "description": "数据集 ID",
                    "type": "string"
                  },
                  "tags": {
                    "description": "标签列表。字符串元素为旧格式标签名（按名称归并到 default_tag array 标签）；对象元素为 { tag: 标签名, value: 标签值 }，按标签名解析",
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tag": {
                              "type": "string"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          },
                          "required": [
                            "tag",
                            "value"
                          ]
                        }
                      ]
                    }
                  },
                  "link": {
                    "description": "链接 URL",
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "datasetId",
                  "link"
                ]
              },
              "example": {
                "datasetId": "string",
                "link": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回集合 ID 及数据插入结果",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/create/text": {
      "post": {
        "summary": "通过文本创建集合",
        "description": "将文本内容存储为文件后创建集合并触发训练",
        "tags": [
          "集合创建"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "trainingType": {
                    "description": "训练类型",
                    "type": "string",
                    "enum": [
                      "chunk",
                      "qa",
                      "imageParse",
                      "backup",
                      "template",
                      "auto"
                    ]
                  },
                  "chunkTriggerType": {
                    "description": "分块触发时机",
                    "type": "string",
                    "enum": [
                      "minSize",
                      "forceChunk",
                      "maxSize"
                    ]
                  },
                  "chunkTriggerMinSize": {
                    "description": "分块触发最小大小",
                    "type": "number"
                  },
                  "dataEnhanceCollectionName": {
                    "description": "增加集合名到分块里",
                    "type": "boolean"
                  },
                  "imageIndex": {
                    "description": "图片索引",
                    "type": "boolean"
                  },
                  "autoIndexes": {
                    "description": "自动生成索引",
                    "type": "boolean"
                  },
                  "indexPrefixTitle": {
                    "description": "索引前缀标题",
                    "type": "boolean"
                  },
                  "chunkSettingMode": {
                    "description": "系统参数/自定义参数",
                    "type": "string",
                    "enum": [
                      "auto",
                      "custom",
                      "intelligent"
                    ]
                  },
                  "chunkSplitMode": {
                    "description": "分块拆分模式",
                    "type": "string",
                    "enum": [
                      "paragraph",
                      "size",
                      "char"
                    ]
                  },
                  "paragraphChunkAIMode": {
                    "description": "段落分块 AI 模式",
                    "type": "string",
                    "enum": [
                      "auto",
                      "force",
                      "forbid"
                    ]
                  },
                  "paragraphChunkDeep": {
                    "description": "段落分块深度",
                    "type": "number"
                  },
                  "paragraphChunkMinSize": {
                    "description": "段落分块最小大小",
                    "type": "number"
                  },
                  "chunkSize": {
                    "description": "分块大小",
                    "type": "number"
                  },
                  "chunkSplitter": {
                    "description": "自定义最高优先分割符号",
                    "type": "string"
                  },
                  "indexSize": {
                    "description": "索引大小",
                    "type": "number"
                  },
                  "qaPrompt": {
                    "description": "QA 拆分提示词",
                    "type": "string"
                  },
                  "parentId": {
                    "description": "父级目录 ID",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "description": "元数据",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "customPdfParse": {
                    "description": "自定义 PDF 解析",
                    "type": "boolean"
                  },
                  "datasetId": {
                    "description": "数据集 ID",
                    "type": "string"
                  },
                  "tags": {
                    "description": "标签列表。字符串元素为旧格式标签名（按名称归并到 default_tag array 标签）；对象元素为 { tag: 标签名, value: 标签值 }，按标签名解析",
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tag": {
                              "type": "string"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          },
                          "required": [
                            "tag",
                            "value"
                          ]
                        }
                      ]
                    }
                  },
                  "name": {
                    "description": "集合名称",
                    "type": "string"
                  },
                  "text": {
                    "description": "文本内容",
                    "type": "string"
                  }
                },
                "required": [
                  "datasetId",
                  "name",
                  "text"
                ]
              },
              "example": {
                "datasetId": "string",
                "name": "string",
                "text": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回集合 ID 及数据插入结果",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/create/apiCollection": {
      "post": {
        "summary": "通过 API 数据集创建集合（V1）",
        "description": "根据 apiFileId 从第三方 API 数据源拉取单个文件并创建集合",
        "deprecated": true,
        "tags": [
          "集合创建"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "trainingType": {
                    "description": "训练类型",
                    "type": "string",
                    "enum": [
                      "chunk",
                      "qa",
                      "imageParse",
                      "backup",
                      "template",
                      "auto"
                    ]
                  },
                  "chunkTriggerType": {
                    "description": "分块触发时机",
                    "type": "string",
                    "enum": [
                      "minSize",
                      "forceChunk",
                      "maxSize"
                    ]
                  },
                  "chunkTriggerMinSize": {
                    "description": "分块触发最小大小",
                    "type": "number"
                  },
                  "dataEnhanceCollectionName": {
                    "description": "增加集合名到分块里",
                    "type": "boolean"
                  },
                  "imageIndex": {
                    "description": "图片索引",
                    "type": "boolean"
                  },
                  "autoIndexes": {
                    "description": "自动生成索引",
                    "type": "boolean"
                  },
                  "indexPrefixTitle": {
                    "description": "索引前缀标题",
                    "type": "boolean"
                  },
                  "chunkSettingMode": {
                    "description": "系统参数/自定义参数",
                    "type": "string",
                    "enum": [
                      "auto",
                      "custom",
                      "intelligent"
                    ]
                  },
                  "chunkSplitMode": {
                    "description": "分块拆分模式",
                    "type": "string",
                    "enum": [
                      "paragraph",
                      "size",
                      "char"
                    ]
                  },
                  "paragraphChunkAIMode": {
                    "description": "段落分块 AI 模式",
                    "type": "string",
                    "enum": [
                      "auto",
                      "force",
                      "forbid"
                    ]
                  },
                  "paragraphChunkDeep": {
                    "description": "段落分块深度",
                    "type": "number"
                  },
                  "paragraphChunkMinSize": {
                    "description": "段落分块最小大小",
                    "type": "number"
                  },
                  "chunkSize": {
                    "description": "分块大小",
                    "type": "number"
                  },
                  "chunkSplitter": {
                    "description": "自定义最高优先分割符号",
                    "type": "string"
                  },
                  "indexSize": {
                    "description": "索引大小",
                    "type": "number"
                  },
                  "qaPrompt": {
                    "description": "QA 拆分提示词",
                    "type": "string"
                  },
                  "parentId": {
                    "description": "父级目录 ID",
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([0-9a-fA-F]{24})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "description": "元数据",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "customPdfParse": {
                    "description": "自定义 PDF 解析",
                    "type": "boolean"
                  },
                  "datasetId": {
                    "description": "数据集 ID",
                    "type": "string"
                  },
                  "tags": {
                    "description": "标签列表。字符串元素为旧格式标签名（按名称归并到 default_tag array 标签）；对象元素为 { tag: 标签名, value: 标签值 }，按标签名解析",
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "tag": {
                              "type": "string"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          },
                          "required": [
                            "tag",
                            "value"
                          ]
                        }
                      ]
                    }
                  },
                  "name": {
                    "description": "集合名称",
                    "type": "string"
                  },
                  "apiFileId": {
                    "description": "API 文件 ID",
                    "type": "string"
                  }
                },
                "required": [
                  "datasetId",
                  "name",
                  "apiFileId"
                ]
              },
              "example": {
                "datasetId": "string",
                "name": "string",
                "apiFileId": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功创建集合",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "successCount": {
                          "description": "本次新建的 collection 数",
                          "type": "number"
                        },
                        "failedCount": {
                          "description": "写入失败或被级联跳过的节点数",
                          "type": "number"
                        }
                      },
                      "required": [
                        "successCount",
                        "failedCount"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/getDownloadTicket": {
      "post": {
        "summary": "申请知识库集合批量下载凭证",
        "description": "校验并准备通用知识库集合批量下载所需的短效一次性凭证",
        "tags": [
          "集合管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "datasetId": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "知识库 ID",
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$"
                  },
                  "collectionIds": {
                    "example": [
                      "68ad85a7463006c963799a06"
                    ],
                    "description": "需要下载的集合 ID 列表",
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "example": "68ee0bd23d17260b7829b137",
                      "description": "ObjectId",
                      "type": "string",
                      "pattern": "^[0-9a-fA-F]{24}$"
                    }
                  }
                },
                "required": [
                  "datasetId",
                  "collectionIds"
                ]
              },
              "example": {
                "datasetId": "68ad85a7463006c963799a05",
                "collectionIds": [
                  "68ad85a7463006c963799a06"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回短效一次性下载凭证",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "ticket": {
                          "example": "01JZZ8B7M5Y7QJX9J7S5V7QJ4F",
                          "description": "短效一次性下载凭证",
                          "type": "string",
                          "minLength": 1
                        },
                        "expiresAt": {
                          "example": "2026-09-22T10:00:00.000Z",
                          "description": "凭证过期时间",
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                        }
                      },
                      "required": [
                        "ticket",
                        "expiresAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/batchDownload": {
      "get": {
        "summary": "下载知识库集合归档文件",
        "description": "使用短效凭证将预检后的集合原始文件流式归档为 ZIP 文件",
        "tags": [
          "集合管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "ticket",
            "schema": {
              "example": "01JZZ8B7M5Y7QJX9J7S5V7QJ4F",
              "description": "申请下载接口返回的短效一次性凭证",
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "申请下载接口返回的短效一次性凭证",
            "examples": {
              "default": {
                "value": "01JZZ8B7M5Y7QJX9J7S5V7QJ4F",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功返回 ZIP 归档文件流",
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "description": "ZIP 归档文件流",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/delete": {
      "post": {
        "x-required-parameter-alternatives": [
          [
            {
              "in": "body",
              "name": "id"
            }
          ],
          [
            {
              "in": "body",
              "name": "collectionIds"
            }
          ],
          [
            {
              "in": "body",
              "name": "datasetId"
            },
            {
              "in": "body",
              "name": "apiFileIds"
            }
          ],
          [
            {
              "in": "query",
              "name": "id"
            }
          ]
        ],
        "summary": "删除集合",
        "description": "删除一个或多个集合及其子集合。请求体三选一：body.id（单个集合）、body.collectionIds（集合列表）、body.datasetId + body.apiFileIds（API 文件库外部文件或目录 ID）。仅集合所有者（owner）可删除；持有 manage/write 权限的协作者不可删除。按 apiFileIds 定位时全部未命中会返回集合不存在错误。旧版 query.id 仍兼容但已弃用，请改用 body.id；使用 query.id 时请求体可缺失或为 {}，同时提供合法请求体时 query.id 优先，非法请求体仍会被拒绝。未提供任何定位参数时拒绝请求",
        "tags": [
          "集合管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "example": "68ad85a7463006c963799a05",
              "description": "旧版用于指定单个集合 ID，已弃用，请改用 body.id",
              "deprecated": true,
              "type": "string"
            },
            "description": "旧版用于指定单个集合 ID，已弃用，请改用 body.id",
            "required": false,
            "examples": {
              "default": {
                "value": "68ad85a7463006c963799a05",
                "x-disabled": true
              }
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "按集合 ID 删除",
                    "description": "删除单个集合及其全部子集合",
                    "type": "object",
                    "properties": {
                      "id": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "集合 ID，删除该集合及其全部子集合",
                            "type": "string",
                            "minLength": 1
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "title": "按集合 ID 列表删除",
                    "description": "批量删除多个集合及其全部子集合",
                    "type": "object",
                    "properties": {
                      "collectionIds": {
                        "allOf": [
                          {
                            "example": [
                              "68ad85a7463006c963799a05"
                            ],
                            "description": "集合 ID 列表，删除每个集合及其全部子集合",
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      }
                    },
                    "required": [
                      "collectionIds"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "title": "按 API 文件 ID 删除",
                    "description": "外部集成只知道外部文件或目录 ID 时使用：在指定知识库内按 apiFileId 定位集合，删除命中的集合及其全部子集合",
                    "type": "object",
                    "properties": {
                      "datasetId": {
                        "allOf": [
                          {
                            "example": "68ad85a7463006c963799a05",
                            "description": "API 文件库对应的知识库 ID",
                            "type": "string",
                            "minLength": 1
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "apiFileIds": {
                        "allOf": [
                          {
                            "example": [
                              "6893c04c0a1c3e0012a3b4c5"
                            ],
                            "description": "API 文件库的外部文件或目录 ID 列表；全部未命中时返回集合不存在",
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      }
                    },
                    "required": [
                      "datasetId",
                      "apiFileIds"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "title": "旧版 query.id 兼容",
                    "description": "仅通过旧版 query.id 定位时允许空请求体；未提供任何定位参数时拒绝请求",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                ]
              },
              "example": {
                "id": "68ad85a7463006c963799a05"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功删除集合",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/detail": {
      "get": {
        "summary": "获取集合详情",
        "description": "获取集合详细信息，包括索引数量、错误数量、文件信息等。需要所属数据集读权限与集合读权限",
        "tags": [
          "集合管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "description": "集合 ID",
              "type": "string"
            },
            "required": true,
            "description": "集合 ID",
            "examples": {
              "default": {
                "value": "string",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功返回集合详情",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/listV2": {
      "post": {
        "summary": "获取集合列表（分页）",
        "description": "获取数据集集合列表，支持分页、搜索、标签过滤。需要数据集读权限；传入 parentId 时同时校验该文件夹读权限。知识库开启文件级权限后，列表按当前成员逐条可读的集合过滤，并返回每个集合的有效权限",
        "tags": [
          "集合管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "按偏移量获取",
                    "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                    "type": "object",
                    "properties": {
                      "offset": {
                        "x-fastgpt-union-group": {
                          "id": "pagination",
                          "label": "分页参数"
                        },
                        "x-fastgpt-union-parameter": {
                          "label": "分页参数",
                          "position": "first"
                        },
                        "example": 0,
                        "description": "偏移量，从 0 开始",
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "pageSize": {
                        "allOf": [
                          {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "example": 20,
                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "分页参数",
                          "position": "last"
                        }
                      },
                      "datasetId": {
                        "description": "数据集 ID",
                        "type": "string"
                      },
                      "parentId": {
                        "description": "父级目录 ID",
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "searchText": {
                        "description": "搜索文本",
                        "default": "",
                        "type": "string",
                        "maxLength": 100
                      },
                      "selectFolder": {
                        "description": "只返回文件夹",
                        "default": false,
                        "type": "boolean"
                      },
                      "tagFilters": {
                        "description": "按标签值过滤。同一标签多值为 OR，不同标签为 AND",
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "tagId": {
                              "example": "68ad85a7463006c963799a05",
                              "description": "标签 ID",
                              "type": "string",
                              "pattern": "^[0-9a-fA-F]{24}$"
                            },
                            "values": {
                              "example": [
                                "PRD"
                              ],
                              "description": "选中的标签值。文本/选项为字符串，数字为数值，日期为 UTC 毫秒时间戳。同一标签多值为 OR",
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "number"
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "tagId",
                            "values"
                          ]
                        }
                      },
                      "sortBy": {
                        "description": "排序字段，支持名称、创建时间和更新时间",
                        "example": "name",
                        "default": "updateTime",
                        "type": "string",
                        "enum": [
                          "name",
                          "createTime",
                          "updateTime"
                        ]
                      },
                      "sortOrder": {
                        "description": "排序方向",
                        "example": "asc",
                        "default": "desc",
                        "type": "string",
                        "enum": [
                          "asc",
                          "desc"
                        ]
                      },
                      "simple": {
                        "description": "简单模式（不统计数量）",
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "offset",
                      "datasetId"
                    ]
                  },
                  {
                    "title": "按页码获取",
                    "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                    "type": "object",
                    "properties": {
                      "pageNum": {
                        "x-fastgpt-union-group": {
                          "id": "pagination",
                          "label": "分页参数"
                        },
                        "x-fastgpt-union-parameter": {
                          "label": "分页参数",
                          "position": "first"
                        },
                        "example": 1,
                        "description": "页码，从 1 开始；传入 offset 时忽略",
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "pageSize": {
                        "allOf": [
                          {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "example": 20,
                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "分页参数",
                          "position": "last"
                        }
                      },
                      "datasetId": {
                        "description": "数据集 ID",
                        "type": "string"
                      },
                      "parentId": {
                        "description": "父级目录 ID",
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "searchText": {
                        "description": "搜索文本",
                        "default": "",
                        "type": "string",
                        "maxLength": 100
                      },
                      "selectFolder": {
                        "description": "只返回文件夹",
                        "default": false,
                        "type": "boolean"
                      },
                      "tagFilters": {
                        "description": "按标签值过滤。同一标签多值为 OR，不同标签为 AND",
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "tagId": {
                              "example": "68ad85a7463006c963799a05",
                              "description": "标签 ID",
                              "type": "string",
                              "pattern": "^[0-9a-fA-F]{24}$"
                            },
                            "values": {
                              "example": [
                                "PRD"
                              ],
                              "description": "选中的标签值。文本/选项为字符串，数字为数值，日期为 UTC 毫秒时间戳。同一标签多值为 OR",
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "number"
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "tagId",
                            "values"
                          ]
                        }
                      },
                      "sortBy": {
                        "description": "排序字段，支持名称、创建时间和更新时间",
                        "example": "name",
                        "default": "updateTime",
                        "type": "string",
                        "enum": [
                          "name",
                          "createTime",
                          "updateTime"
                        ]
                      },
                      "sortOrder": {
                        "description": "排序方向",
                        "example": "asc",
                        "default": "desc",
                        "type": "string",
                        "enum": [
                          "asc",
                          "desc"
                        ]
                      },
                      "simple": {
                        "description": "简单模式（不统计数量）",
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "datasetId"
                    ]
                  }
                ]
              },
              "example": {
                "offset": 0,
                "datasetId": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回集合列表和总数",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/collection/update": {
      "post": {
        "summary": "更新数据集集合信息",
        "description": "更新数据集集合信息，支持通过集合ID或数据集ID+外部文件ID定位集合。需要集合写权限；变更 parentId 视为移动，源父级与目标父级均需管理权限（根目录与文件夹之间移动还需团队知识库创建权限），且不接受 inheritPermission，独立态保持独立、继承态保持继承",
        "tags": [
          "集合管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "anyOf": [
                  {
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "allOf": [
                          {
                            "description": "集合ID，与 datasetId+externalFileId 二选一",
                            "example": "68ee0bd23d17260b7829b137",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "only"
                        }
                      },
                      "parentId": {
                        "description": "父级目录ID",
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^([0-9a-fA-F]{24})?$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "description": "集合名称",
                        "type": "string"
                      },
                      "tags": {
                        "description": "标签列表（支持 String 旧格式 或 { tag, value } 新格式）",
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "tag",
                                "value"
                              ]
                            }
                          ]
                        }
                      },
                      "forbid": {
                        "description": "是否禁用",
                        "type": "boolean"
                      },
                      "createTime": {
                        "description": "创建时间",
                        "type": "string"
                      },
                      "datasetId": {
                        "description": "数据集ID，配合 externalFileId 使用",
                        "type": "string"
                      },
                      "externalFileId": {
                        "description": "外部文件ID，配合 datasetId 使用",
                        "type": "string"
                      }
                    },
                    "title": "提供 id",
                    "description": ""
                  },
                  {
                    "required": [
                      "datasetId",
                      "externalFileId"
                    ],
                    "properties": {
                      "datasetId": {
                        "allOf": [
                          {
                            "description": "数据集ID，配合 externalFileId 使用",
                            "type": "string"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "first"
                        }
                      },
                      "externalFileId": {
                        "allOf": [
                          {
                            "description": "外部文件ID，配合 datasetId 使用",
                            "type": "string"
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "",
                          "position": "last"
                        }
                      },
                      "id": {
                        "description": "集合ID，与 datasetId+externalFileId 二选一",
                        "example": "68ee0bd23d17260b7829b137",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      "parentId": {
                        "description": "父级目录ID",
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^([0-9a-fA-F]{24})?$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "description": "集合名称",
                        "type": "string"
                      },
                      "tags": {
                        "description": "标签列表（支持 String 旧格式 或 { tag, value } 新格式）",
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "tag",
                                "value"
                              ]
                            }
                          ]
                        }
                      },
                      "forbid": {
                        "description": "是否禁用",
                        "type": "boolean"
                      },
                      "createTime": {
                        "description": "创建时间",
                        "type": "string"
                      }
                    },
                    "title": "提供 datasetId、externalFileId",
                    "description": ""
                  }
                ]
              },
              "example": {
                "id": "68ee0bd23d17260b7829b137"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功更新集合信息",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/data/v2/list": {
      "post": {
        "summary": "获取数据列表",
        "description": "分页查询集合内的数据列表，支持关键词搜索，包含图片预览 URL",
        "tags": [
          "数据管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "title": "按偏移量获取",
                    "description": "通过 offset 指定起始位置，从 0 开始；同时传入页码时优先使用 offset。",
                    "type": "object",
                    "properties": {
                      "offset": {
                        "x-fastgpt-union-group": {
                          "id": "pagination",
                          "label": "分页参数"
                        },
                        "x-fastgpt-union-parameter": {
                          "label": "分页参数",
                          "position": "first"
                        },
                        "example": 0,
                        "description": "偏移量，从 0 开始",
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "pageSize": {
                        "allOf": [
                          {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "example": 20,
                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "分页参数",
                          "position": "last"
                        }
                      },
                      "collectionId": {
                        "example": "68ad85a7463006c963799a06",
                        "description": "集合 ID",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      "searchText": {
                        "example": "FastGPT",
                        "description": "搜索关键词，按 q/a 字段模糊匹配",
                        "type": "string"
                      }
                    },
                    "required": [
                      "offset",
                      "collectionId"
                    ]
                  },
                  {
                    "title": "按页码获取",
                    "description": "通过页码获取，默认第 1 页；pageSize 控制每页条数。",
                    "type": "object",
                    "properties": {
                      "pageNum": {
                        "x-fastgpt-union-group": {
                          "id": "pagination",
                          "label": "分页参数"
                        },
                        "x-fastgpt-union-parameter": {
                          "label": "分页参数",
                          "position": "first"
                        },
                        "example": 1,
                        "description": "页码，从 1 开始；传入 offset 时忽略",
                        "default": 1,
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "pageSize": {
                        "allOf": [
                          {
                            "x-fastgpt-union-group": {
                              "id": "pagination",
                              "label": "分页参数"
                            },
                            "example": 20,
                            "description": "每页条数，默认 20，最大 500，超出自动按 500 处理",
                            "default": 20,
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 500
                          }
                        ],
                        "x-fastgpt-union-parameter": {
                          "label": "分页参数",
                          "position": "last"
                        }
                      },
                      "collectionId": {
                        "example": "68ad85a7463006c963799a06",
                        "description": "集合 ID",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      "searchText": {
                        "example": "FastGPT",
                        "description": "搜索关键词，按 q/a 字段模糊匹配",
                        "type": "string"
                      }
                    },
                    "required": [
                      "collectionId"
                    ]
                  }
                ]
              },
              "example": {
                "offset": 0,
                "collectionId": "68ad85a7463006c963799a06"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回分页数据列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "default": 0,
                          "type": "number"
                        },
                        "list": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "description": "数据 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "datasetId": {
                                "description": "数据集 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "collectionId": {
                                "description": "集合 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "q": {
                                "description": "问题/主文本",
                                "type": "string"
                              },
                              "a": {
                                "description": "回答/补充文本",
                                "type": "string"
                              },
                              "imageId": {
                                "description": "图片 ID",
                                "type": "string"
                              },
                              "imageSize": {
                                "description": "图片大小（字节）",
                                "type": "number"
                              },
                              "imagePreviewUrl": {
                                "description": "图片预览 URL",
                                "type": "string"
                              },
                              "chunkIndex": {
                                "description": "块索引",
                                "type": "number"
                              },
                              "indexStatus": {
                                "description": "索引状态，字段缺失表示已索引的历史数据",
                                "type": "string",
                                "enum": [
                                  "indexing",
                                  "indexed",
                                  "error",
                                  "rebuildIndexPending",
                                  "rebuildIndexRunning",
                                  "rebuildIndexFailed",
                                  "rebuildSynonymPending",
                                  "rebuildSynonymRunning",
                                  "rebuildSynonymFailed"
                                ]
                              },
                              "indexErrorMsg": {
                                "description": "索引错误信息",
                                "type": "string"
                              },
                              "updated": {
                                "description": "是否已更新",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "_id",
                              "datasetId",
                              "collectionId"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "total",
                        "list"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/data/detail": {
      "get": {
        "summary": "获取数据详情",
        "description": "获取单条数据集数据的详细信息，包括向量索引",
        "tags": [
          "数据管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "example": "68ad85a7463006c963799a05",
              "description": "数据 ID",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "required": true,
            "description": "数据 ID",
            "examples": {
              "default": {
                "value": "68ad85a7463006c963799a05",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功返回数据详情",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "q": {
                          "description": "问题/主文本",
                          "type": "string"
                        },
                        "a": {
                          "description": "回答/补充文本",
                          "type": "string"
                        },
                        "imageId": {
                          "description": "图片 ID",
                          "type": "string"
                        },
                        "id": {
                          "description": "数据 ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "teamId": {
                          "description": "团队 ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "datasetId": {
                          "description": "数据集 ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "collectionId": {
                          "description": "集合 ID",
                          "example": "68ee0bd23d17260b7829b137",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        },
                        "imagePreivewUrl": {
                          "description": "图片预览 URL",
                          "type": "string"
                        },
                        "updateTime": {
                          "description": "更新时间",
                          "type": "string"
                        },
                        "sourceName": {
                          "description": "来源名称",
                          "type": "string"
                        },
                        "sourceId": {
                          "description": "来源 ID",
                          "type": "string"
                        },
                        "chunkIndex": {
                          "description": "块索引",
                          "type": "number"
                        },
                        "indexes": {
                          "description": "向量索引",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "description": "索引类型, 外部接口不需要传，都 custom，其他 type 是系统自动生成的",
                                "default": "custom",
                                "type": "string",
                                "enum": [
                                  "default",
                                  "imageEmbedding",
                                  "summary",
                                  "question",
                                  "image",
                                  "custom"
                                ]
                              },
                              "dataId": {
                                "description": "向量库里数据 ID（可选），可用于相同索引不重复创建，节省一次向量更新",
                                "type": "string"
                              },
                              "text": {
                                "description": "默认就是索引的文本内容，特殊的：\nimageEmbedding - 图片的 objectKey/url",
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "dataId",
                              "text"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "indexStatus": {
                          "description": "索引状态，字段缺失表示已索引的历史数据",
                          "type": "string",
                          "enum": [
                            "indexing",
                            "indexed",
                            "error",
                            "rebuildIndexPending",
                            "rebuildIndexRunning",
                            "rebuildIndexFailed",
                            "rebuildSynonymPending",
                            "rebuildSynonymRunning",
                            "rebuildSynonymFailed"
                          ]
                        },
                        "indexErrorMsg": {
                          "description": "索引错误信息",
                          "type": "string"
                        },
                        "imageDescMap": {
                          "description": "图片描述映射",
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "isOwner": {
                          "description": "是否为 owner",
                          "type": "boolean"
                        },
                        "metadata": {
                          "description": "自定义元数据",
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "q",
                        "id",
                        "teamId",
                        "datasetId",
                        "collectionId",
                        "updateTime",
                        "sourceName",
                        "chunkIndex",
                        "indexes",
                        "isOwner"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/data/update": {
      "put": {
        "summary": "更新数据",
        "description": "更新数据集数据的 q、a 和向量索引，触发重新向量化",
        "tags": [
          "数据管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dataId": {
                    "example": "68ad85a7463006c963799a05",
                    "description": "数据 ID",
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$"
                  },
                  "q": {
                    "example": "什么是 FastGPT？",
                    "description": "问题/主文本",
                    "type": "string"
                  },
                  "a": {
                    "example": "FastGPT 是一个 AI Agent 构建平台",
                    "description": "回答/补充文本",
                    "type": "string"
                  },
                  "indexes": {
                    "description": "向量索引列表",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "description": "索引类型, 外部接口不需要传，都 custom，其他 type 是系统自动生成的",
                          "default": "custom",
                          "type": "string",
                          "enum": [
                            "default",
                            "imageEmbedding",
                            "summary",
                            "question",
                            "image",
                            "custom"
                          ]
                        },
                        "text": {
                          "description": "默认就是索引的文本内容，特殊的：\nimageEmbedding - 图片的 objectKey/url",
                          "type": "string"
                        },
                        "dataId": {
                          "example": "68ad85a7463006c963799a05",
                          "description": "向量库里数据 ID（可选），可用于相同索引不重复创建，节省一次向量更新",
                          "type": "string"
                        }
                      },
                      "required": [
                        "text"
                      ]
                    }
                  },
                  "imageId": {
                    "description": "图片 ID",
                    "type": "string"
                  },
                  "indexPrefix": {
                    "description": "索引前缀标题",
                    "type": "string"
                  }
                },
                "required": [
                  "dataId",
                  "q"
                ]
              },
              "example": {
                "dataId": "68ad85a7463006c963799a05",
                "q": "什么是 FastGPT？"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "更新成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "q": {
                          "example": "![image.png](/api/system/file/d/alias.exp.sig)",
                          "description": "展示态问题/主文本，内部 S3 图片会替换为签名访问地址",
                          "type": "string"
                        },
                        "a": {
                          "example": "FastGPT 是一个 AI Agent 构建平台",
                          "description": "展示态回答/补充文本，内部 S3 图片会替换为签名访问地址",
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/data/delete": {
      "delete": {
        "summary": "删除数据",
        "description": "删除指定数据集数据，需要写权限",
        "tags": [
          "数据管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "example": "68ad85a7463006c963799a05",
              "description": "数据 ID",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "required": true,
            "description": "数据 ID",
            "examples": {
              "default": {
                "value": "68ad85a7463006c963799a05",
                "x-disabled": false
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "删除成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "删除成功",
                      "not": {}
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/data/pushData": {
      "post": {
        "summary": "推送数据到训练队列",
        "description": "批量推送数据到训练队列，最多 200 条",
        "tags": [
          "数据管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "collectionId": {
                    "example": "68ad85a7463006c963799a06",
                    "description": "集合 ID",
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$"
                  },
                  "data": {
                    "description": "数据列表，最多 200 条",
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "q": {
                          "example": "什么是 FastGPT？",
                          "description": "问题/主文本",
                          "type": "string"
                        },
                        "a": {
                          "description": "回答/补充文本",
                          "type": "string"
                        },
                        "imageId": {
                          "description": "图片 ID",
                          "type": "string"
                        },
                        "chunkIndex": {
                          "example": 0,
                          "description": "块索引",
                          "type": "number"
                        },
                        "indexes": {
                          "description": "额外向量索引",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "description": "索引类型, 外部接口不需要传，都 custom，其他 type 是系统自动生成的",
                                "default": "custom",
                                "type": "string",
                                "enum": [
                                  "default",
                                  "imageEmbedding",
                                  "summary",
                                  "question",
                                  "image",
                                  "custom"
                                ]
                              },
                              "text": {
                                "description": "默认就是索引的文本内容，特殊的：\nimageEmbedding - 图片的 objectKey/url",
                                "type": "string"
                              }
                            },
                            "required": [
                              "text"
                            ]
                          }
                        },
                        "metadata": {
                          "description": "自定义元数据",
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      }
                    }
                  },
                  "trainingType": {
                    "description": "训练类型",
                    "type": "string",
                    "enum": [
                      "chunk",
                      "qa",
                      "imageParse",
                      "backup",
                      "template",
                      "auto"
                    ]
                  },
                  "indexSize": {
                    "description": "索引大小限制",
                    "type": "number"
                  },
                  "autoIndexes": {
                    "description": "是否自动生成索引",
                    "type": "boolean"
                  },
                  "imageIndex": {
                    "description": "是否生成图片索引",
                    "type": "boolean"
                  },
                  "prompt": {
                    "description": "自定义提示词",
                    "type": "string"
                  },
                  "billId": {
                    "description": "可选的训练账单 ID；不传时自动创建",
                    "type": "string"
                  },
                  "trainingMode": {
                    "description": "训练类型",
                    "deprecated": true,
                    "type": "string",
                    "enum": [
                      "chunk",
                      "qa",
                      "imageParse",
                      "backup",
                      "template",
                      "auto"
                    ]
                  }
                },
                "required": [
                  "collectionId",
                  "data"
                ]
              },
              "example": {
                "collectionId": "68ad85a7463006c963799a06",
                "data": [
                  {}
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功返回插入条数",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "响应载荷。当前 OpenAPI 契约暂未声明该字段的具体结构，请参见状态描述。"
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/batch/move": {
      "post": {
        "summary": "批量移动知识库",
        "description": "批量移动知识库或文件夹，具体权限、目录深度和继承权限由知识库模块校验",
        "tags": [
          "知识库管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "批量移动资源。具体资源的目录环路、深度和权限校验由资源模块负责",
                "type": "object",
                "properties": {
                  "ids": {
                    "description": "需要批量操作的资源 ID 列表",
                    "example": [
                      "68ad85a7463006c963799a05"
                    ],
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "example": "68ee0bd23d17260b7829b137",
                      "description": "ObjectId",
                      "type": "string",
                      "pattern": "^[0-9a-fA-F]{24}$"
                    }
                  },
                  "parentId": {
                    "description": "目标父级目录 ID；传 null 表示移动到根目录",
                    "example": "68ad85a7463006c963799a06",
                    "anyOf": [
                      {
                        "example": "68ee0bd23d17260b7829b137",
                        "description": "ObjectId",
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "ids",
                  "parentId"
                ]
              },
              "example": {
                "ids": [
                  "68ad85a7463006c963799a05"
                ],
                "parentId": "68ee0bd23d17260b7829b137"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功移动知识库",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "批量资源操作结果",
                      "type": "object",
                      "properties": {
                        "successIds": {
                          "description": "成功处理的请求资源 ID 列表",
                          "example": [
                            "68ad85a7463006c963799a05"
                          ],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        },
                        "failedIds": {
                          "description": "处理失败的请求资源 ID 列表",
                          "example": [],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        },
                        "affectedIds": {
                          "description": "实际发生变化的资源 ID 列表；删除操作可包含被删除的子资源 ID",
                          "example": [
                            "68ad85a7463006c963799a05"
                          ],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        }
                      },
                      "required": [
                        "successIds",
                        "failedIds",
                        "affectedIds"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/batch/delete": {
      "post": {
        "summary": "批量删除知识库",
        "description": "批量删除知识库或文件夹，具体子树处理和异步清理由知识库模块负责",
        "tags": [
          "知识库管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "批量删除资源。具体资源的权限校验、子树处理和异步清理由资源模块负责",
                "type": "object",
                "properties": {
                  "ids": {
                    "description": "需要批量操作的资源 ID 列表",
                    "example": [
                      "68ad85a7463006c963799a05"
                    ],
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "example": "68ee0bd23d17260b7829b137",
                      "description": "ObjectId",
                      "type": "string",
                      "pattern": "^[0-9a-fA-F]{24}$"
                    }
                  }
                },
                "required": [
                  "ids"
                ]
              },
              "example": {
                "ids": [
                  "68ad85a7463006c963799a05"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功删除知识库",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "批量资源操作结果",
                      "type": "object",
                      "properties": {
                        "successIds": {
                          "description": "成功处理的请求资源 ID 列表",
                          "example": [
                            "68ad85a7463006c963799a05"
                          ],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        },
                        "failedIds": {
                          "description": "处理失败的请求资源 ID 列表",
                          "example": [],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        },
                        "affectedIds": {
                          "description": "实际发生变化的资源 ID 列表；删除操作可包含被删除的子资源 ID",
                          "example": [
                            "68ad85a7463006c963799a05"
                          ],
                          "type": "array",
                          "items": {
                            "example": "68ee0bd23d17260b7829b137",
                            "description": "ObjectId",
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$"
                          }
                        }
                      },
                      "required": [
                        "successIds",
                        "failedIds",
                        "affectedIds"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/dataset/search": {
      "post": {
        "summary": "知识库搜索",
        "description": "使用 API Key 或登录态联合检索多个可读知识库。向量召回要求有效 embedding 模型一致；结果按集合权限过滤。result.topk 与 result.maxTokens 二选一；都不传时默认 topk=20，不设置 token 预算。topk 返回排序后的前 1–100 条，不做 token 过滤；maxTokens 按完整数据块 token 预算截断，无业务上限。为兼容同时传入两种预算的请求，HTTP 入口优先保留 topk 并忽略 maxTokens。响应 meta 只包含实际执行信息。",
        "tags": [
          "知识库搜索"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "结构化多知识库检索参数；身份由 Authorization API Key 或登录态解析",
                "type": "object",
                "properties": {
                  "scope": {
                    "description": "搜索范围",
                    "example": {
                      "datasetIds": [
                        "507f1f77bcf86cd799439011"
                      ]
                    },
                    "type": "object",
                    "properties": {
                      "datasetIds": {
                        "description": "目标知识库 ID，最多 100 个；服务端去重，逐个校验读取权限",
                        "example": [
                          "507f1f77bcf86cd799439011"
                        ],
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "example": "68ee0bd23d17260b7829b137",
                          "description": "ObjectId",
                          "type": "string",
                          "pattern": "^[0-9a-fA-F]{24}$"
                        }
                      },
                      "filter": {
                        "description": "集合与标签筛选，需要服务端提供筛选能力",
                        "example": {
                          "collectionIds": [
                            "507f1f77bcf86cd799439012"
                          ]
                        },
                        "type": "object",
                        "properties": {
                          "collectionIds": {
                            "description": "限制在这些集合或目录内搜索，与其他筛选条件求交集",
                            "example": [
                              "507f1f77bcf86cd799439011"
                            ],
                            "minItems": 1,
                            "maxItems": 500,
                            "type": "array",
                            "items": {
                              "example": "68ee0bd23d17260b7829b137",
                              "description": "ObjectId",
                              "type": "string",
                              "pattern": "^[0-9a-fA-F]{24}$"
                            }
                          },
                          "createTime": {
                            "description": "集合创建时间范围",
                            "example": {
                              "gte": "2026-01-01T00:00:00Z"
                            },
                            "type": "object",
                            "properties": {
                              "gte": {
                                "description": "创建时间下界，含边界",
                                "example": "2026-01-01T00:00:00Z",
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              "lte": {
                                "description": "创建时间上界，含边界",
                                "example": "2026-12-31T23:59:59Z",
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "additionalProperties": false
                          },
                          "tags": {
                            "description": "标签条件；and 与 or 两组之间求交集",
                            "example": {
                              "and": [
                                {
                                  "tag": "department",
                                  "op": "$eq",
                                  "value": "support"
                                }
                              ]
                            },
                            "type": "object",
                            "properties": {
                              "and": {
                                "description": "全部满足的标签条件",
                                "example": [
                                  {
                                    "tag": "department",
                                    "op": "$eq",
                                    "value": "support"
                                  }
                                ],
                                "minItems": 1,
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "标签是否为空",
                                              "example": "$notEmpty",
                                              "type": "string",
                                              "enum": [
                                                "$empty",
                                                "$notEmpty"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "only"
                                          }
                                        },
                                        "tag": {
                                          "description": "标签名称",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "标量比较操作符",
                                              "example": "$eq",
                                              "type": "string",
                                              "enum": [
                                                "$eq",
                                                "$ne",
                                                "$gt",
                                                "$lt",
                                                "$gte",
                                                "$lte"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "标签比较值",
                                              "example": "support",
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "number"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "标签名称",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "包含比较操作符",
                                              "example": "$contains",
                                              "type": "string",
                                              "enum": [
                                                "$contains",
                                                "$notContains"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "匹配的文本或选项",
                                              "example": "support",
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                {
                                                  "minItems": 1,
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "标签名称",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "文本匹配操作符",
                                              "example": "$startsWith",
                                              "type": "string",
                                              "enum": [
                                                "$startsWith",
                                                "$endsWith",
                                                "$regex"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "文本或正则表达式",
                                              "example": "support",
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "标签名称",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "数组比较操作符",
                                              "example": "$in",
                                              "type": "string",
                                              "enum": [
                                                "$is",
                                                "$isNot",
                                                "$in",
                                                "$notIn"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "匹配的选项列表",
                                              "example": [
                                                "support",
                                                "sales"
                                              ],
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "标签名称",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              },
                              "or": {
                                "description": "至少满足一项的标签条件",
                                "example": [
                                  {
                                    "tag": "department",
                                    "op": "$eq",
                                    "value": "sales"
                                  }
                                ],
                                "minItems": 1,
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "标签是否为空",
                                              "example": "$notEmpty",
                                              "type": "string",
                                              "enum": [
                                                "$empty",
                                                "$notEmpty"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "only"
                                          }
                                        },
                                        "tag": {
                                          "description": "标签名称",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "标量比较操作符",
                                              "example": "$eq",
                                              "type": "string",
                                              "enum": [
                                                "$eq",
                                                "$ne",
                                                "$gt",
                                                "$lt",
                                                "$gte",
                                                "$lte"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "标签比较值",
                                              "example": "support",
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "number"
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "标签名称",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "包含比较操作符",
                                              "example": "$contains",
                                              "type": "string",
                                              "enum": [
                                                "$contains",
                                                "$notContains"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "匹配的文本或选项",
                                              "example": "support",
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                {
                                                  "minItems": 1,
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                }
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "标签名称",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "文本匹配操作符",
                                              "example": "$startsWith",
                                              "type": "string",
                                              "enum": [
                                                "$startsWith",
                                                "$endsWith",
                                                "$regex"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "文本或正则表达式",
                                              "example": "support",
                                              "type": "string",
                                              "minLength": 1
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "标签名称",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "allOf": [
                                            {
                                              "description": "数组比较操作符",
                                              "example": "$in",
                                              "type": "string",
                                              "enum": [
                                                "$is",
                                                "$isNot",
                                                "$in",
                                                "$notIn"
                                              ]
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "first"
                                          }
                                        },
                                        "value": {
                                          "allOf": [
                                            {
                                              "description": "匹配的选项列表",
                                              "example": [
                                                "support",
                                                "sales"
                                              ],
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            }
                                          ],
                                          "x-fastgpt-union-parameter": {
                                            "label": "",
                                            "position": "last"
                                          }
                                        },
                                        "tag": {
                                          "description": "标签名称",
                                          "example": "department",
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 100
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "op",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "description": ""
                                    }
                                  ],
                                  "type": "object"
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "datasetIds"
                    ],
                    "additionalProperties": false
                  },
                  "query": {
                    "description": "搜索内容",
                    "example": {
                      "text": "如何创建知识库？"
                    },
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "text": {
                            "allOf": [
                              {
                                "description": "查询文本，trim 后最多 10000 字符；与图片至少提供一项",
                                "example": "如何创建知识库？",
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 10000
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "first"
                            }
                          },
                          "imageKeys": {
                            "allOf": [
                              {
                                "default": [],
                                "description": "本团队上传的临时图片对象 key，最多 10 张",
                                "example": [
                                  "temp/teamId/search-image.png"
                                ],
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "last"
                            }
                          }
                        },
                        "required": [
                          "text"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      },
                      {
                        "type": "object",
                        "properties": {
                          "imageKeys": {
                            "allOf": [
                              {
                                "description": "本团队上传的临时图片对象 key，最多 10 张",
                                "example": [
                                  "temp/teamId/search-image.png"
                                ],
                                "minItems": 1,
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "first"
                            }
                          },
                          "text": {
                            "allOf": [
                              {
                                "default": "",
                                "description": "查询文本，trim 后最多 10000 字符；与图片至少提供一项",
                                "example": "如何创建知识库？",
                                "type": "string",
                                "maxLength": 10000
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "last"
                            }
                          }
                        },
                        "required": [
                          "imageKeys"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      }
                    ]
                  },
                  "retrieval": {
                    "description": "召回配置",
                    "example": {
                      "mode": "mixedRecall",
                      "embeddingWeight": 0.5
                    },
                    "default": {},
                    "type": "object",
                    "properties": {
                      "mode": {
                        "description": "embedding、fullTextRecall 或 mixedRecall",
                        "example": "mixedRecall",
                        "default": "embedding",
                        "type": "string",
                        "enum": [
                          "embedding",
                          "fullTextRecall",
                          "mixedRecall"
                        ]
                      },
                      "embeddingWeight": {
                        "description": "混合检索中向量结果的融合权重",
                        "example": 0.5,
                        "default": 0.5,
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "additionalProperties": false
                  },
                  "rerank": {
                    "description": "重排配置；关闭时不能传模型或权重",
                    "example": {
                      "enabled": false
                    },
                    "default": {
                      "enabled": false
                    },
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "allOf": [
                              {
                                "description": "关闭重排",
                                "example": false,
                                "type": "boolean",
                                "const": false
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "enabled"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "allOf": [
                              {
                                "description": "启用重排",
                                "example": true,
                                "type": "boolean",
                                "const": true
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "first"
                            }
                          },
                          "modelId": {
                            "allOf": [
                              {
                                "description": "模型 ID；省略时使用有权调用的默认模型",
                                "example": "model-identifier",
                                "type": "string",
                                "minLength": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "middle"
                            }
                          },
                          "candidateNum": {
                            "allOf": [
                              {
                                "description": "重排候选数，范围 10–100；省略时使用默认值 100",
                                "example": 100,
                                "type": "integer",
                                "minimum": 10,
                                "maximum": 100
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "middle"
                            }
                          },
                          "weight": {
                            "allOf": [
                              {
                                "description": "重排结果的融合权重",
                                "example": 0.5,
                                "default": 0.5,
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "last"
                            }
                          }
                        },
                        "required": [
                          "enabled"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      }
                    ],
                    "type": "object"
                  },
                  "queryExtension": {
                    "description": "查询扩展配置",
                    "example": {
                      "enabled": false
                    },
                    "default": {
                      "enabled": false
                    },
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "allOf": [
                              {
                                "description": "关闭查询扩展",
                                "example": false,
                                "type": "boolean",
                                "const": false
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          }
                        },
                        "required": [
                          "enabled"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "allOf": [
                              {
                                "description": "启用查询扩展",
                                "example": true,
                                "type": "boolean",
                                "const": true
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "first"
                            }
                          },
                          "modelId": {
                            "allOf": [
                              {
                                "description": "模型 ID；省略时使用有权调用的默认模型",
                                "example": "model-identifier",
                                "type": "string",
                                "minLength": 1
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "middle"
                            }
                          },
                          "background": {
                            "allOf": [
                              {
                                "description": "帮助模型理解查询的背景信息",
                                "example": "FastGPT 使用文档",
                                "default": "",
                                "type": "string",
                                "maxLength": 100000
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "last"
                            }
                          }
                        },
                        "required": [
                          "enabled"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      }
                    ],
                    "type": "object"
                  },
                  "result": {
                    "description": "条数和 token 预算二选一；未指定时默认 topk=20，不设置 token 预算",
                    "example": {
                      "topk": 20,
                      "similarity": 0
                    },
                    "default": {},
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "maxTokens": {
                            "allOf": [
                              {
                                "description": "结果总 token 预算，无业务上限；保留完整数据块，最后一块可能使预算超出",
                                "example": 25000,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 9007199254740991
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "similarity": {
                            "description": "沿用检索分数阈值语义；是否生效以 usingSimilarityFilter 为准",
                            "example": 0,
                            "default": 0,
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          }
                        },
                        "required": [
                          "maxTokens"
                        ],
                        "additionalProperties": false,
                        "description": ""
                      },
                      {
                        "type": "object",
                        "properties": {
                          "topk": {
                            "allOf": [
                              {
                                "description": "返回排序后的前 k 条，范围 1–100；未传两种预算时默认 20，不做 token 过滤",
                                "example": 20,
                                "default": 20,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100
                              }
                            ],
                            "x-fastgpt-union-parameter": {
                              "label": "",
                              "position": "only"
                            }
                          },
                          "similarity": {
                            "description": "沿用检索分数阈值语义；是否生效以 usingSimilarityFilter 为准",
                            "example": 0,
                            "default": 0,
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          }
                        },
                        "additionalProperties": false,
                        "description": ""
                      }
                    ]
                  },
                  "usageScene": {
                    "description": "账单用途：search 显示知识库搜索，searchTest 显示搜索测试；不影响检索和权限",
                    "example": "search",
                    "default": "search",
                    "type": "string",
                    "enum": [
                      "search",
                      "searchTest"
                    ]
                  }
                },
                "required": [
                  "scope",
                  "query"
                ],
                "additionalProperties": false
              },
              "example": {
                "scope": {
                  "datasetIds": [
                    "507f1f77bcf86cd799439011"
                  ]
                },
                "query": {
                  "text": "如何创建知识库？"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "命中片段和实际检索配置",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "description": "合并排序后的命中片段及实际搜索配置",
                      "type": "object",
                      "properties": {
                        "list": {
                          "description": "合并排序后的知识库数据块",
                          "example": [],
                          "type": "array",
                          "items": {
                            "description": "搜索数据响应项",
                            "type": "object",
                            "properties": {
                              "q": {
                                "description": "问题/主文本",
                                "type": "string"
                              },
                              "a": {
                                "description": "回答/补充文本",
                                "type": "string"
                              },
                              "imageId": {
                                "description": "图片 ID",
                                "type": "string"
                              },
                              "id": {
                                "description": "数据 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "datasetId": {
                                "description": "数据集 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "collectionId": {
                                "description": "集合 ID",
                                "example": "68ee0bd23d17260b7829b137",
                                "type": "string",
                                "pattern": "^[0-9a-fA-F]{24}$"
                              },
                              "imagePreivewUrl": {
                                "description": "图片预览 URL",
                                "type": "string"
                              },
                              "updateTime": {
                                "description": "更新时间",
                                "type": "string"
                              },
                              "sourceName": {
                                "description": "来源名称",
                                "type": "string"
                              },
                              "sourceId": {
                                "description": "来源 ID",
                                "type": "string"
                              },
                              "chunkIndex": {
                                "description": "块索引",
                                "type": "number"
                              },
                              "indexStatus": {
                                "description": "索引状态，字段缺失表示已索引的历史数据",
                                "type": "string",
                                "enum": [
                                  "indexing",
                                  "indexed",
                                  "error",
                                  "rebuildIndexPending",
                                  "rebuildIndexRunning",
                                  "rebuildIndexFailed",
                                  "rebuildSynonymPending",
                                  "rebuildSynonymRunning",
                                  "rebuildSynonymFailed"
                                ]
                              },
                              "indexErrorMsg": {
                                "description": "索引错误信息",
                                "type": "string"
                              },
                              "imageDescMap": {
                                "description": "图片描述映射",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "string"
                                }
                              },
                              "score": {
                                "description": "评分列表",
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "description": "评分类型",
                                      "type": "string",
                                      "enum": [
                                        "embedding",
                                        "fullText",
                                        "reRank",
                                        "rrf"
                                      ]
                                    },
                                    "value": {
                                      "description": "评分值",
                                      "type": "number"
                                    },
                                    "index": {
                                      "description": "索引",
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "value",
                                    "index"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "metadata": {
                                "description": "自定义元数据",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "retrievalRank": {
                                "description": "检索排名",
                                "type": "number"
                              },
                              "synonymMappings": {
                                "description": "分块或用户问题中出现的原词到标准词映射",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "q",
                              "id",
                              "datasetId",
                              "collectionId",
                              "updateTime",
                              "sourceName",
                              "chunkIndex",
                              "score"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "meta": {
                          "type": "object",
                          "properties": {
                            "durationMs": {
                              "description": "搜索耗时，毫秒",
                              "example": 128,
                              "type": "number",
                              "minimum": 0
                            },
                            "usingSimilarityFilter": {
                              "description": "本次是否实际启用相似度过滤",
                              "example": true,
                              "type": "boolean"
                            },
                            "usingReRank": {
                              "description": "本次是否实际执行重排",
                              "example": false,
                              "type": "boolean"
                            },
                            "queryExtensionModelId": {
                              "description": "实际执行查询扩展的模型 ID",
                              "example": "model-identifier",
                              "type": "string"
                            }
                          },
                          "required": [
                            "durationMs",
                            "usingSimilarityFilter",
                            "usingReRank"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "list",
                        "meta"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/ai/model/summary": {
      "post": {
        "summary": "批量获取模型展示详情",
        "description": "返回模型名称、图标、类型及当前身份或应用基线内的可用状态，不返回执行配置",
        "tags": [
          "模型管理"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelIds": {
                    "description": "待查询的稳定模型 ID，最多 100 个",
                    "example": [
                      "68ad85a7463006c963799a01"
                    ],
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "appId": {
                    "description": "应用 ID；存在时会将应用基线资源中的模型视作有权限",
                    "example": "68ad85a7463006c963799a05",
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$"
                  },
                  "outLinkAuthData": {
                    "description": "外链鉴权数据，使用发布者身份计算权限",
                    "example": {
                      "shareId": "share-id",
                      "outLinkUid": "out-link-user-id"
                    },
                    "type": "object",
                    "properties": {
                      "shareId": {
                        "description": "分享链接ID",
                        "type": "string",
                        "minLength": 1
                      },
                      "outLinkUid": {
                        "description": "外链用户ID",
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "shareId",
                      "outLinkUid"
                    ]
                  }
                },
                "required": [
                  "modelIds"
                ]
              },
              "example": {
                "modelIds": [
                  "68ad85a7463006c963799a01"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "正常、停用、已下架或无权限的展示详情",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "models": {
                          "description": "按请求顺序返回的模型展示详情",
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "status": {
                                    "allOf": [
                                      {
                                        "description": "模型不存在",
                                        "type": "string",
                                        "const": "deleted"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "only"
                                    }
                                  },
                                  "modelId": {
                                    "description": "模型稳定 ID",
                                    "example": "68ad85a7463006c963799a01",
                                    "type": "string"
                                  },
                                  "isUpcomingDeprecation": {
                                    "description": "模型是否即将下架",
                                    "example": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "modelId",
                                  "status"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "description": "模型类型，用于应用资源校验；旧版响应可能不包含此字段",
                                        "example": "llm",
                                        "type": "string",
                                        "enum": [
                                          "llm",
                                          "embedding",
                                          "tts",
                                          "stt",
                                          "rerank"
                                        ]
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "name": {
                                    "allOf": [
                                      {
                                        "description": "模型展示名称；无权限时也用于提示",
                                        "example": "GPT-5",
                                        "type": "string"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "avatar": {
                                    "allOf": [
                                      {
                                        "description": "模型 logo 地址",
                                        "example": "/icon/logo.svg",
                                        "type": "string"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "status": {
                                    "allOf": [
                                      {
                                        "description": "当前身份的可用状态；无权限优先于停用",
                                        "example": "active",
                                        "type": "string",
                                        "enum": [
                                          "active",
                                          "disabled",
                                          "forbidden"
                                        ]
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "modelId": {
                                    "description": "模型稳定 ID",
                                    "example": "68ad85a7463006c963799a01",
                                    "type": "string"
                                  },
                                  "isUpcomingDeprecation": {
                                    "description": "模型是否即将下架",
                                    "example": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "modelId",
                                  "name",
                                  "status"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              }
                            ],
                            "type": "object"
                          }
                        }
                      },
                      "required": [
                        "models"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/core/ai/model/list": {
      "get": {
        "summary": "获取公开系统模型",
        "description": "返回价格页展示所需的最小化 active 系统模型与价格信息，无需鉴权",
        "tags": [
          "模型管理"
        ],
        "responses": {
          "200": {
            "description": "成功返回公开系统模型列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "models": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "example": "llm",
                                        "description": "模型类型",
                                        "type": "string",
                                        "const": "llm"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "pricing": {
                                    "allOf": [
                                      {
                                        "description": "LLM 每百万 Tokens 阶梯价格；缺省免费",
                                        "example": {
                                          "tiers": [
                                            {
                                              "inputPrice": 2,
                                              "outputPrice": 4
                                            }
                                          ]
                                        },
                                        "type": "object",
                                        "properties": {
                                          "tiers": {
                                            "description": "LLM 阶梯价格，下限从上一档上限推导",
                                            "maxItems": 5,
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "maxInputTokensK": {
                                                  "description": "本档输入上限，单位 K Tokens；省略表示无限",
                                                  "example": 32,
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0,
                                                  "maximum": 9007199254740991
                                                },
                                                "inputPrice": {
                                                  "description": "每百万输入 Tokens 的积分单价",
                                                  "example": 2,
                                                  "type": "number",
                                                  "minimum": 0
                                                },
                                                "outputPrice": {
                                                  "description": "每百万输出 Tokens 的积分单价",
                                                  "example": 4,
                                                  "type": "number",
                                                  "minimum": 0
                                                }
                                              },
                                              "required": [
                                                "inputPrice",
                                                "outputPrice"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "config": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "maxContext": {
                                            "type": "number"
                                          },
                                          "vision": {
                                            "type": "boolean"
                                          },
                                          "audio": {
                                            "type": "boolean"
                                          },
                                          "video": {
                                            "type": "boolean"
                                          },
                                          "reasoning": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "maxContext"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "name": {
                                    "example": "GPT-5",
                                    "description": "模型展示名称",
                                    "type": "string"
                                  },
                                  "provider": {
                                    "example": "openai",
                                    "description": "模型提供商标识",
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "example": false,
                                    "description": "是否为测试模式",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "provider",
                                  "type",
                                  "config"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "example": "embedding",
                                        "description": "模型类型",
                                        "type": "string",
                                        "const": "embedding"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "pricing": {
                                    "allOf": [
                                      {
                                        "description": "每固定计价单位的积分单价；缺省免费",
                                        "example": {
                                          "unitPrice": 2
                                        },
                                        "type": "object",
                                        "properties": {
                                          "unitPrice": {
                                            "description": "综合单价；Token/TTS 每百万数量，STT 时长模式固定为每 60 秒",
                                            "example": 2,
                                            "type": "number",
                                            "minimum": 0
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "config": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "maxToken": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "maxToken"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "name": {
                                    "example": "GPT-5",
                                    "description": "模型展示名称",
                                    "type": "string"
                                  },
                                  "provider": {
                                    "example": "openai",
                                    "description": "模型提供商标识",
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "example": false,
                                    "description": "是否为测试模式",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "provider",
                                  "type",
                                  "config"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "example": "rerank",
                                        "description": "模型类型",
                                        "type": "string",
                                        "const": "rerank"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "pricing": {
                                    "allOf": [
                                      {
                                        "description": "每固定计价单位的积分单价；缺省免费",
                                        "example": {
                                          "unitPrice": 2
                                        },
                                        "type": "object",
                                        "properties": {
                                          "unitPrice": {
                                            "description": "综合单价；Token/TTS 每百万数量，STT 时长模式固定为每 60 秒",
                                            "example": 2,
                                            "type": "number",
                                            "minimum": 0
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "middle"
                                    }
                                  },
                                  "config": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "maxToken": {
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "name": {
                                    "example": "GPT-5",
                                    "description": "模型展示名称",
                                    "type": "string"
                                  },
                                  "provider": {
                                    "example": "openai",
                                    "description": "模型提供商标识",
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "example": false,
                                    "description": "是否为测试模式",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "provider",
                                  "type",
                                  "config"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "example": "tts",
                                        "description": "模型类型",
                                        "type": "string",
                                        "const": "tts"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "pricing": {
                                    "allOf": [
                                      {
                                        "description": "每固定计价单位的积分单价；缺省免费",
                                        "example": {
                                          "unitPrice": 2
                                        },
                                        "type": "object",
                                        "properties": {
                                          "unitPrice": {
                                            "description": "综合单价；Token/TTS 每百万数量，STT 时长模式固定为每 60 秒",
                                            "example": 2,
                                            "type": "number",
                                            "minimum": 0
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "name": {
                                    "example": "GPT-5",
                                    "description": "模型展示名称",
                                    "type": "string"
                                  },
                                  "provider": {
                                    "example": "openai",
                                    "description": "模型提供商标识",
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "example": false,
                                    "description": "是否为测试模式",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "provider",
                                  "type"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "allOf": [
                                      {
                                        "example": "stt",
                                        "description": "模型类型",
                                        "type": "string",
                                        "const": "stt"
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "first"
                                    }
                                  },
                                  "pricing": {
                                    "allOf": [
                                      {
                                        "description": "STT 固定按每 60 秒或每百万 Tokens 计价；缺省免费",
                                        "example": {
                                          "type": "duration",
                                          "unitPrice": 2
                                        },
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "allOf": [
                                                  {
                                                    "type": "string",
                                                    "const": "duration"
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "first"
                                                }
                                              },
                                              "unitPrice": {
                                                "allOf": [
                                                  {
                                                    "description": "每 60 秒的积分单价",
                                                    "example": 0.2,
                                                    "type": "number",
                                                    "minimum": 0
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "last"
                                                }
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false,
                                            "description": ""
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "allOf": [
                                                  {
                                                    "type": "string",
                                                    "const": "tokens"
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "first"
                                                }
                                              },
                                              "inputPrice": {
                                                "allOf": [
                                                  {
                                                    "description": "每百万输入 Tokens 的积分单价",
                                                    "example": 2,
                                                    "type": "number",
                                                    "minimum": 0
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "middle"
                                                }
                                              },
                                              "outputPrice": {
                                                "allOf": [
                                                  {
                                                    "description": "每百万输出 Tokens 的积分单价",
                                                    "example": 4,
                                                    "type": "number",
                                                    "minimum": 0
                                                  }
                                                ],
                                                "x-fastgpt-union-parameter": {
                                                  "label": "",
                                                  "position": "last"
                                                }
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false,
                                            "description": ""
                                          }
                                        ]
                                      }
                                    ],
                                    "x-fastgpt-union-parameter": {
                                      "label": "",
                                      "position": "last"
                                    }
                                  },
                                  "name": {
                                    "example": "GPT-5",
                                    "description": "模型展示名称",
                                    "type": "string"
                                  },
                                  "provider": {
                                    "example": "openai",
                                    "description": "模型提供商标识",
                                    "type": "string"
                                  },
                                  "testMode": {
                                    "example": false,
                                    "description": "是否为测试模式",
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "provider",
                                  "type"
                                ],
                                "additionalProperties": false,
                                "description": ""
                              }
                            ],
                            "type": "object"
                          }
                        },
                        "providers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "provider": {
                                "description": "模型提供商标识",
                                "type": "string"
                              },
                              "value": {
                                "type": "object",
                                "properties": {
                                  "en": {
                                    "type": "string"
                                  },
                                  "zh-CN": {
                                    "type": "string"
                                  },
                                  "zh-Hant": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "en",
                                  "zh-CN",
                                  "zh-Hant"
                                ],
                                "additionalProperties": false
                              },
                              "avatar": {
                                "description": "模型提供商图标",
                                "type": "string"
                              }
                            },
                            "required": [
                              "provider",
                              "value",
                              "avatar"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "models",
                        "providers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/core/ai/model/catalog": {
      "get": {
        "summary": "获取当前成员可用模型清单",
        "description": "通过登录态或外链身份一次返回对应成员完整可用模型、Provider 和有效默认模型 ID；支持内容版本协商。orderBy=custom 时按自己的团队模型、共享给我的团队模型、系统模型依次展示，各组按自定义 rank 排列；省略时保留运行时顺序，默认模型不受展示排序影响。成员展示页可通过 includeSourceMember=true 补充创建人资料，此时始终返回完整目录；外链忽略该参数",
        "tags": [
          "模型管理"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "version",
            "schema": {
              "description": "客户端已有目录版本",
              "type": "string",
              "minLength": 1
            },
            "description": "客户端已有目录版本",
            "required": false,
            "examples": {
              "default": {
                "value": "string",
                "x-disabled": true
              }
            }
          },
          {
            "in": "query",
            "name": "includeSourceMember",
            "schema": {
              "example": true,
              "description": "补充创建人资料；仅成员生效，开启后始终返回完整目录，不使用版本缓存",
              "type": "boolean"
            },
            "description": "补充创建人资料；仅成员生效，开启后始终返回完整目录，不使用版本缓存",
            "required": false,
            "examples": {
              "default": {
                "value": true,
                "x-disabled": true
              }
            }
          },
          {
            "in": "query",
            "name": "orderBy",
            "schema": {
              "example": "custom",
              "description": "可用模型页展示排序：自己的团队模型、共享给我的团队模型、系统模型依次展示，各组按自定义 rank 排列；省略时保留运行时顺序",
              "type": "string",
              "const": "custom"
            },
            "description": "可用模型页展示排序：自己的团队模型、共享给我的团队模型、系统模型依次展示，各组按自定义 rank 排列；省略时保留运行时顺序",
            "required": false,
            "examples": {
              "default": {
                "value": "custom",
                "x-disabled": true
              }
            }
          },
          {
            "in": "query",
            "name": "outLinkAuthData",
            "schema": {
              "example": "{\"shareId\":\"share-id\",\"outLinkUid\":\"out-link-user-id\"}",
              "description": "分享链接鉴权数据；存在时使用发布链接绑定的成员身份计算模型权限",
              "type": "string"
            },
            "description": "分享链接鉴权数据；存在时使用发布链接绑定的成员身份计算模型权限",
            "required": false,
            "examples": {
              "default": {
                "value": "{\"shareId\":\"share-id\",\"outLinkUid\":\"out-link-user-id\"}",
                "x-disabled": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "版本变化或成员显式请求创建人资料时返回完整目录，否则未变化时仅返回版本",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "FastGPT 标准 HTTP JSON 响应包装结构。",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200,
                      "description": "业务状态码（200 表示成功）。"
                    },
                    "statusText": {
                      "type": "string",
                      "example": "",
                      "description": "状态文本（成功时为空字符串）。"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "响应消息（成功时为空字符串）。"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "description": "当前成员模型目录内容版本",
                          "type": "string"
                        },
                        "data": {
                          "description": "版本变化或成员显式请求创建人资料时返回完整目录；否则版本一致时省略",
                          "type": "object",
                          "properties": {
                            "models": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "pricing": {
                                        "allOf": [
                                          {
                                            "description": "LLM 每百万 Tokens 阶梯价格；缺省免费",
                                            "example": {
                                              "tiers": [
                                                {
                                                  "inputPrice": 2,
                                                  "outputPrice": 4
                                                }
                                              ]
                                            },
                                            "type": "object",
                                            "properties": {
                                              "tiers": {
                                                "description": "LLM 阶梯价格，下限从上一档上限推导",
                                                "maxItems": 5,
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "maxInputTokensK": {
                                                      "description": "本档输入上限，单位 K Tokens；省略表示无限",
                                                      "example": 32,
                                                      "type": "integer",
                                                      "exclusiveMinimum": 0,
                                                      "maximum": 9007199254740991
                                                    },
                                                    "inputPrice": {
                                                      "description": "每百万输入 Tokens 的积分单价",
                                                      "example": 2,
                                                      "type": "number",
                                                      "minimum": 0
                                                    },
                                                    "outputPrice": {
                                                      "description": "每百万输出 Tokens 的积分单价",
                                                      "example": 4,
                                                      "type": "number",
                                                      "minimum": 0
                                                    }
                                                  },
                                                  "required": [
                                                    "inputPrice",
                                                    "outputPrice"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "type": {
                                        "allOf": [
                                          {
                                            "type": "string",
                                            "const": "llm"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "config": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "maxContext": {
                                                "type": "number"
                                              },
                                              "maxResponse": {
                                                "type": "number"
                                              },
                                              "quoteMaxToken": {
                                                "type": "number"
                                              },
                                              "maxTemperature": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "showTopP": {
                                                "type": "boolean"
                                              },
                                              "responseFormatList": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              "showStopSign": {
                                                "type": "boolean"
                                              },
                                              "censor": {
                                                "type": "boolean"
                                              },
                                              "vision": {
                                                "type": "boolean"
                                              },
                                              "audio": {
                                                "type": "boolean"
                                              },
                                              "video": {
                                                "type": "boolean"
                                              },
                                              "reasoning": {
                                                "type": "boolean"
                                              },
                                              "reasoningEffort": {
                                                "type": "boolean"
                                              },
                                              "functionCall": {
                                                "type": "boolean"
                                              },
                                              "toolChoice": {
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "maxContext",
                                              "maxResponse",
                                              "quoteMaxToken"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      },
                                      "modelId": {
                                        "description": "模型稳定 ID",
                                        "type": "string"
                                      },
                                      "model": {
                                        "description": "Provider 请求使用的模型标识",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "模型展示名称",
                                        "type": "string"
                                      },
                                      "provider": {
                                        "description": "模型提供商标识",
                                        "type": "string"
                                      },
                                      "scope": {
                                        "description": "模型实例作用域",
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "team"
                                        ]
                                      },
                                      "sortOrder": {
                                        "description": "同一作用域内的模型展示 rank，数值越小越靠前",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "tmbId": {
                                        "description": "模型归属成员 ID",
                                        "type": "string"
                                      },
                                      "sourceMember": {
                                        "description": "创建人资料，仅成员展示请求返回",
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "example": "张三",
                                            "description": "成员名称",
                                            "type": "string"
                                          },
                                          "avatar": {
                                            "description": "成员头像",
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "example": "active",
                                            "description": "成员状态",
                                            "type": "string",
                                            "enum": [
                                              "active",
                                              "leave",
                                              "forbidden"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "status"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "avatar": {
                                        "description": "模型图标",
                                        "type": "string"
                                      },
                                      "isActive": {
                                        "description": "模型是否启用",
                                        "type": "boolean"
                                      },
                                      "isUpcomingDeprecation": {
                                        "description": "模型是否即将下架",
                                        "example": true,
                                        "type": "boolean"
                                      },
                                      "testMode": {
                                        "description": "是否为测试模式",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId",
                                      "model",
                                      "name",
                                      "provider",
                                      "scope",
                                      "type",
                                      "config"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "pricing": {
                                        "allOf": [
                                          {
                                            "description": "每固定计价单位的积分单价；缺省免费",
                                            "example": {
                                              "unitPrice": 2
                                            },
                                            "type": "object",
                                            "properties": {
                                              "unitPrice": {
                                                "description": "综合单价；Token/TTS 每百万数量，STT 时长模式固定为每 60 秒",
                                                "example": 2,
                                                "type": "number",
                                                "minimum": 0
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "type": {
                                        "allOf": [
                                          {
                                            "type": "string",
                                            "const": "embedding"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "config": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "defaultToken": {
                                                "type": "number"
                                              },
                                              "maxToken": {
                                                "type": "number"
                                              },
                                              "weight": {
                                                "default": 0,
                                                "type": "number"
                                              },
                                              "hidden": {
                                                "type": "boolean"
                                              },
                                              "vision": {
                                                "type": "boolean"
                                              },
                                              "normalization": {
                                                "type": "boolean"
                                              },
                                              "batchSize": {
                                                "type": "number"
                                              }
                                            },
                                            "required": [
                                              "defaultToken",
                                              "maxToken",
                                              "weight"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      },
                                      "modelId": {
                                        "description": "模型稳定 ID",
                                        "type": "string"
                                      },
                                      "model": {
                                        "description": "Provider 请求使用的模型标识",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "模型展示名称",
                                        "type": "string"
                                      },
                                      "provider": {
                                        "description": "模型提供商标识",
                                        "type": "string"
                                      },
                                      "scope": {
                                        "description": "模型实例作用域",
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "team"
                                        ]
                                      },
                                      "sortOrder": {
                                        "description": "同一作用域内的模型展示 rank，数值越小越靠前",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "tmbId": {
                                        "description": "模型归属成员 ID",
                                        "type": "string"
                                      },
                                      "sourceMember": {
                                        "description": "创建人资料，仅成员展示请求返回",
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "example": "张三",
                                            "description": "成员名称",
                                            "type": "string"
                                          },
                                          "avatar": {
                                            "description": "成员头像",
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "example": "active",
                                            "description": "成员状态",
                                            "type": "string",
                                            "enum": [
                                              "active",
                                              "leave",
                                              "forbidden"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "status"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "avatar": {
                                        "description": "模型图标",
                                        "type": "string"
                                      },
                                      "isActive": {
                                        "description": "模型是否启用",
                                        "type": "boolean"
                                      },
                                      "isUpcomingDeprecation": {
                                        "description": "模型是否即将下架",
                                        "example": true,
                                        "type": "boolean"
                                      },
                                      "testMode": {
                                        "description": "是否为测试模式",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId",
                                      "model",
                                      "name",
                                      "provider",
                                      "scope",
                                      "type",
                                      "config"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "pricing": {
                                        "allOf": [
                                          {
                                            "description": "每固定计价单位的积分单价；缺省免费",
                                            "example": {
                                              "unitPrice": 2
                                            },
                                            "type": "object",
                                            "properties": {
                                              "unitPrice": {
                                                "description": "综合单价；Token/TTS 每百万数量，STT 时长模式固定为每 60 秒",
                                                "example": 2,
                                                "type": "number",
                                                "minimum": 0
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "type": {
                                        "allOf": [
                                          {
                                            "type": "string",
                                            "const": "rerank"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "config": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "maxToken": {
                                                "type": "number"
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      },
                                      "modelId": {
                                        "description": "模型稳定 ID",
                                        "type": "string"
                                      },
                                      "model": {
                                        "description": "Provider 请求使用的模型标识",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "模型展示名称",
                                        "type": "string"
                                      },
                                      "provider": {
                                        "description": "模型提供商标识",
                                        "type": "string"
                                      },
                                      "scope": {
                                        "description": "模型实例作用域",
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "team"
                                        ]
                                      },
                                      "sortOrder": {
                                        "description": "同一作用域内的模型展示 rank，数值越小越靠前",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "tmbId": {
                                        "description": "模型归属成员 ID",
                                        "type": "string"
                                      },
                                      "sourceMember": {
                                        "description": "创建人资料，仅成员展示请求返回",
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "example": "张三",
                                            "description": "成员名称",
                                            "type": "string"
                                          },
                                          "avatar": {
                                            "description": "成员头像",
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "example": "active",
                                            "description": "成员状态",
                                            "type": "string",
                                            "enum": [
                                              "active",
                                              "leave",
                                              "forbidden"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "status"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "avatar": {
                                        "description": "模型图标",
                                        "type": "string"
                                      },
                                      "isActive": {
                                        "description": "模型是否启用",
                                        "type": "boolean"
                                      },
                                      "isUpcomingDeprecation": {
                                        "description": "模型是否即将下架",
                                        "example": true,
                                        "type": "boolean"
                                      },
                                      "testMode": {
                                        "description": "是否为测试模式",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId",
                                      "model",
                                      "name",
                                      "provider",
                                      "scope",
                                      "type",
                                      "config"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "pricing": {
                                        "allOf": [
                                          {
                                            "description": "每固定计价单位的积分单价；缺省免费",
                                            "example": {
                                              "unitPrice": 2
                                            },
                                            "type": "object",
                                            "properties": {
                                              "unitPrice": {
                                                "description": "综合单价；Token/TTS 每百万数量，STT 时长模式固定为每 60 秒",
                                                "example": 2,
                                                "type": "number",
                                                "minimum": 0
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "type": {
                                        "allOf": [
                                          {
                                            "type": "string",
                                            "const": "tts"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "config": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "voices": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "label": {
                                                      "type": "string"
                                                    },
                                                    "value": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "label",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              }
                                            },
                                            "required": [
                                              "voices"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      },
                                      "modelId": {
                                        "description": "模型稳定 ID",
                                        "type": "string"
                                      },
                                      "model": {
                                        "description": "Provider 请求使用的模型标识",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "模型展示名称",
                                        "type": "string"
                                      },
                                      "provider": {
                                        "description": "模型提供商标识",
                                        "type": "string"
                                      },
                                      "scope": {
                                        "description": "模型实例作用域",
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "team"
                                        ]
                                      },
                                      "sortOrder": {
                                        "description": "同一作用域内的模型展示 rank，数值越小越靠前",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "tmbId": {
                                        "description": "模型归属成员 ID",
                                        "type": "string"
                                      },
                                      "sourceMember": {
                                        "description": "创建人资料，仅成员展示请求返回",
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "example": "张三",
                                            "description": "成员名称",
                                            "type": "string"
                                          },
                                          "avatar": {
                                            "description": "成员头像",
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "example": "active",
                                            "description": "成员状态",
                                            "type": "string",
                                            "enum": [
                                              "active",
                                              "leave",
                                              "forbidden"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "status"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "avatar": {
                                        "description": "模型图标",
                                        "type": "string"
                                      },
                                      "isActive": {
                                        "description": "模型是否启用",
                                        "type": "boolean"
                                      },
                                      "isUpcomingDeprecation": {
                                        "description": "模型是否即将下架",
                                        "example": true,
                                        "type": "boolean"
                                      },
                                      "testMode": {
                                        "description": "是否为测试模式",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId",
                                      "model",
                                      "name",
                                      "provider",
                                      "scope",
                                      "type",
                                      "config"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "pricing": {
                                        "allOf": [
                                          {
                                            "description": "STT 固定按每 60 秒或每百万 Tokens 计价；缺省免费",
                                            "example": {
                                              "type": "duration",
                                              "unitPrice": 2
                                            },
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "duration"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "unitPrice": {
                                                    "allOf": [
                                                      {
                                                        "description": "每 60 秒的积分单价",
                                                        "example": 0.2,
                                                        "type": "number",
                                                        "minimum": 0
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "type"
                                                ],
                                                "additionalProperties": false,
                                                "description": ""
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "allOf": [
                                                      {
                                                        "type": "string",
                                                        "const": "tokens"
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "first"
                                                    }
                                                  },
                                                  "inputPrice": {
                                                    "allOf": [
                                                      {
                                                        "description": "每百万输入 Tokens 的积分单价",
                                                        "example": 2,
                                                        "type": "number",
                                                        "minimum": 0
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "middle"
                                                    }
                                                  },
                                                  "outputPrice": {
                                                    "allOf": [
                                                      {
                                                        "description": "每百万输出 Tokens 的积分单价",
                                                        "example": 4,
                                                        "type": "number",
                                                        "minimum": 0
                                                      }
                                                    ],
                                                    "x-fastgpt-union-parameter": {
                                                      "label": "",
                                                      "position": "last"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "type"
                                                ],
                                                "additionalProperties": false,
                                                "description": ""
                                              }
                                            ]
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "first"
                                        }
                                      },
                                      "type": {
                                        "allOf": [
                                          {
                                            "type": "string",
                                            "const": "stt"
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "middle"
                                        }
                                      },
                                      "config": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "properties": {},
                                            "additionalProperties": false
                                          }
                                        ],
                                        "x-fastgpt-union-parameter": {
                                          "label": "",
                                          "position": "last"
                                        }
                                      },
                                      "modelId": {
                                        "description": "模型稳定 ID",
                                        "type": "string"
                                      },
                                      "model": {
                                        "description": "Provider 请求使用的模型标识",
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "模型展示名称",
                                        "type": "string"
                                      },
                                      "provider": {
                                        "description": "模型提供商标识",
                                        "type": "string"
                                      },
                                      "scope": {
                                        "description": "模型实例作用域",
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "team"
                                        ]
                                      },
                                      "sortOrder": {
                                        "description": "同一作用域内的模型展示 rank，数值越小越靠前",
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "tmbId": {
                                        "description": "模型归属成员 ID",
                                        "type": "string"
                                      },
                                      "sourceMember": {
                                        "description": "创建人资料，仅成员展示请求返回",
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "example": "张三",
                                            "description": "成员名称",
                                            "type": "string"
                                          },
                                          "avatar": {
                                            "description": "成员头像",
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "example": "active",
                                            "description": "成员状态",
                                            "type": "string",
                                            "enum": [
                                              "active",
                                              "leave",
                                              "forbidden"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "status"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "avatar": {
                                        "description": "模型图标",
                                        "type": "string"
                                      },
                                      "isActive": {
                                        "description": "模型是否启用",
                                        "type": "boolean"
                                      },
                                      "isUpcomingDeprecation": {
                                        "description": "模型是否即将下架",
                                        "example": true,
                                        "type": "boolean"
                                      },
                                      "testMode": {
                                        "description": "是否为测试模式",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId",
                                      "model",
                                      "name",
                                      "provider",
                                      "scope",
                                      "type",
                                      "config"
                                    ],
                                    "additionalProperties": false,
                                    "description": ""
                                  }
                                ],
                                "type": "object"
                              }
                            },
                            "providers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "description": "模型提供商标识",
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "object",
                                    "properties": {
                                      "en": {
                                        "type": "string"
                                      },
                                      "zh-CN": {
                                        "type": "string"
                                      },
                                      "zh-Hant": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "en",
                                      "zh-CN",
                                      "zh-Hant"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "avatar": {
                                    "description": "模型提供商图标",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "value",
                                  "avatar"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "defaultModelIds": {
                              "type": "object",
                              "properties": {
                                "llm": {
                                  "type": "string"
                                },
                                "embedding": {
                                  "type": "string"
                                },
                                "tts": {
                                  "type": "string"
                                },
                                "stt": {
                                  "type": "string"
                                },
                                "rerank": {
                                  "type": "string"
                                },
                                "datasetTextLLM": {
                                  "type": "string"
                                },
                                "datasetImageLLM": {
                                  "type": "string"
                                },
                                "chatTitleLLM": {
                                  "type": "string"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "models",
                            "providers",
                            "defaultModelIds"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "version"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "statusText",
                    "message",
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "在 Authorization 请求头中传入 Bearer <apiKey>。应用 API Key 自动使用绑定的应用，对话及配套管理接口无需传 appId；显式 appId 或 SDK 后缀不能覆盖 Key 绑定。个人密钥调用应用会话接口需提供 appId；chat/completions 推荐传 body.appId，为兼容 OpenAI SDK 也支持 Bearer <apiKey>-<appId>。SDK 后缀仅作为传输兼容，不会写入数据库。"
      }
    }
  }
}
