{ "swagger": "2.0", "info": { "title": "AI Agent Productivity Platform - Open API", "contact": {}, "version": "v0.0.1" }, "basePath": "/openapi/v1", "paths": { "/.well-known/openid-configuration": { "get": { "description": "自动获取 OP 的配置信息", "produces": [ "application/json" ], "tags": [ "openapi.OIDC" ], "summary": "动态客户端发现配置", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.OAuthConfig" } } } } }, "/agent": { "put": { "description": "修改智能体的名称、描述、图标等基本信息(不涉及开场白、大模型等高级配置,后者请使用 /agent/config)。通过 assistantUuid 定位智能体。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "更新智能体基本信息OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIUpdateAgentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } }, "post": { "description": "创建智能体OpenAPI", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "创建智能体OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPICreateAgentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OpenAPICreateAgentResponse" } } } ] } } } }, "delete": { "description": "删除指定智能体,同时删除其已发布版本。删除后不可恢复,请谨慎操作。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除智能体OpenAPI", "parameters": [ { "type": "string", "description": "智能体UUID", "name": "uuid", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/agent/chat": { "post": { "description": "智能体对话OpenAPI", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "智能体对话OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIAgentChatRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.OpenAPIAgentChatResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/agent/chat/draft": { "post": { "description": "智能体草稿态对话OpenAPI,基于草稿配置进行问答,不要求智能体已发布,计入统计", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "智能体草稿态对话OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIAgentDraftChatRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.OpenAPIAgentChatResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/agent/config": { "put": { "description": "更新开场白、提示词、模型、知识库等配置。除 assistantUuid 外均为可选,只传要改的字段,未传的沿用当前草稿配置;模型 id 传模型UUID。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "更新智能体配置OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIAgentConfigUpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/agent/conversation": { "post": { "description": "智能体创建对话OpenAPI", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "智能体创建对话OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIAgentCreateConversationRequest" } } ], "responses": { "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OpenAPIAgentCreateConversationResponse" } } } ] } } } }, "delete": { "description": "删除整个对话(含 conversation 主体及所有历史消息)。如需按条删除消息或仅清空消息保留对话 ID,请使用 /agent/conversation/clear。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除智能体对话OpenAPI", "parameters": [ { "type": "string", "description": "对话ID", "name": "conversation_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/agent/conversation/clear": { "delete": { "description": "对指定对话的消息(ES 数据)进行清理:传入 detail_id 则仅删除该条消息;不传则清空整个对话的全部消息。两种情况下 conversation_id 均保留,可继续发起新的问答。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "清空/按条删除智能体对话消息OpenAPI", "parameters": [ { "type": "string", "description": "对话ID", "name": "conversation_id", "in": "query", "required": true }, { "type": "string", "description": "消息ID(不传则清空整个对话的全部消息)", "name": "detail_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/agent/conversation/detail": { "get": { "description": "获取指定对话的历史消息列表(问答明细),分页返回。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "智能体对话历史消息OpenAPI", "parameters": [ { "type": "string", "description": "对话ID(由创建对话接口返回)", "name": "conversation_id", "in": "query", "required": true }, { "type": "integer", "description": "页码,从 1 开始", "name": "pageNo", "in": "query", "required": true }, { "type": "integer", "description": "每页条数,从 1 开始", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/response.PageResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.ConversationDetailInfo" } } } } ] } } } ] } } } } }, "/agent/conversation/draft": { "delete": { "description": "删除草稿智能体对话历史。传入 detail_id 则只删除该条消息,不传则清空全部历史(会话 ID 保留)。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除草稿态智能体对话历史OpenAPI", "parameters": [ { "type": "string", "description": "智能体UUID", "name": "uuid", "in": "query", "required": true }, { "type": "string", "description": "消息ID(不传则清空全部)", "name": "detail_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/agent/conversation/draft/detail": { "get": { "description": "获取指定草稿智能体的对话历史消息。草稿态每个智能体只维护一条会话,通过 uuid 定位后分页返回消息列表。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "草稿态智能体对话历史消息OpenAPI", "parameters": [ { "type": "string", "description": "智能体UUID", "name": "uuid", "in": "query", "required": true }, { "type": "integer", "description": "页码,从 1 开始", "name": "pageNo", "in": "query", "required": true }, { "type": "integer", "description": "每页条数,从 1 开始", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/response.PageResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.ConversationDetailInfo" } } } } ] } } } ] } } } } }, "/agent/conversation/list": { "get": { "description": "获取指定智能体的已发布对话列表,按创建时间降序排列。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "智能体对话列表OpenAPI", "parameters": [ { "type": "string", "description": "智能体UUID", "name": "uuid", "in": "query", "required": true }, { "type": "integer", "description": "页码,从 1 开始", "name": "pageNo", "in": "query", "required": true }, { "type": "integer", "description": "每页条数,从 1 开始", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/response.PageResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.ConversationInfo" } } } } ] } } } ] } } } } }, "/agent/info": { "get": { "description": "获取智能体详情,通过 published 参数控制返回草稿态或已发布态配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取智能体详情OpenAPI", "parameters": [ { "type": "string", "description": "智能体UUID", "name": "uuid", "in": "query", "required": true }, { "type": "boolean", "description": "true=已发布态,false=草稿态(默认)", "name": "published", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.Assistant" } } } ] } } } } }, "/agent/list": { "get": { "description": "获取当前 API Key 所属用户下的全部智能体(含草稿与已发布),可按名称模糊筛选。返回的 uuid 字段可用于其他智能体接口。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "智能体列表OpenAPI", "parameters": [ { "type": "string", "description": "按名称模糊筛选(可选)", "name": "name", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OpenAPIAgentListResponse" } } } ] } } } } }, "/agent/publish": { "post": { "description": "发布智能体,发布后可通过智能体对话接口进行正式问答", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "智能体发布OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIAgentPublishRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/chatflow/chat": { "post": { "description": "对话流OpenAPI", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "对话流OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIChatflowChatRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/chatflow/conversation": { "post": { "description": "对话流创建对话OpenAPI", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "对话流创建对话OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIChatflowCreateConversationRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OpenAPIChatflowCreateConversationResponse" } } } ] } } } }, "delete": { "description": "对话流删除会话OpenAPI", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "对话流删除会话OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIChatflowDeleteConversationRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/chatflow/conversation/list": { "post": { "description": "对话流获取会话列表OpenAPI", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "对话流获取会话列表OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIChatflowGetConversationListRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OpenAPIChatflowConversationListResponse" } } } ] } } } } }, "/chatflow/conversation/message/list": { "post": { "description": "对话流根据conversationId获取历史对话", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "对话流根据conversationId获取历史对话", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "schema": { "$ref": "#/definitions/request.OpenAPIChatflowGetConversationMessageListRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OpenAPIChatflowGetConversationMessageListResponse" } } } ] } } } } }, "/chatflow/file/upload": { "post": { "description": "对话流OpenAPI文件上传", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "对话流OpenAPI文件上传", "parameters": [ { "type": "file", "description": "文件", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/file/upload/direct": { "post": { "security": [ { "JWT": [] } ], "description": "文件上传", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "文件上传", "parameters": [ { "type": "string", "description": "原始文件名", "name": "fileName", "in": "formData", "required": true }, { "type": "file", "description": "文件", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.UploadFileResp" } } } ] } } } } }, "/knowledge": { "put": { "description": "修改知识库openapi", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "修改知识库openapi", "parameters": [ { "description": "修改知识库请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.UpdateKnowledgeReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } }, "post": { "description": "新建知识库OpenAPI", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "新建知识库OpenAPI", "parameters": [ { "description": "创建知识库请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.CreateKnowledgeReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.CreateKnowledgeResp" } } } ] } } } }, "delete": { "description": "删除知识库openapi", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除知识库openapi", "parameters": [ { "description": "删除知识库请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.DeleteKnowledge" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc": { "delete": { "security": [ { "JWT": [] } ], "description": "删除文档", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除文档", "parameters": [ { "description": "删除文档请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.DeleteDocReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/config": { "get": { "security": [ { "JWT": [] } ], "description": "获取文档配置信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取文档配置信息", "parameters": [ { "type": "string", "name": "docId", "in": "query", "required": true }, { "type": "string", "name": "knowledgeId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.DocConfigResult" } } } ] } } } } }, "/knowledge/doc/export": { "post": { "security": [ { "JWT": [] } ], "description": "知识库文档导出", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "知识库文档导出", "parameters": [ { "description": "知识库文档导出请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.KnowledgeDocExportReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/import": { "post": { "security": [ { "JWT": [] } ], "description": "上传文档", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "上传文档", "parameters": [ { "description": "文档上传请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.DocImportReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/import/tip": { "get": { "security": [ { "JWT": [] } ], "description": "获取知识库异步上传任务提示:有正在执行的异步上传任务/最近一次上传任务的失败信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取知识库异步上传任务提示", "parameters": [ { "type": "string", "name": "knowledgeId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/list": { "post": { "security": [ { "JWT": [] } ], "description": "获取知识库文档列表,不展示状态为无效(-1)的文档数据", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取文档列表", "parameters": [ { "description": "文档列表查询请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.DocListReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.PageResult" }, { "type": "object", "properties": { "list": { "$ref": "#/definitions/response.ListDocResp" } } } ] } } } } }, "/knowledge/doc/meta/list": { "post": { "security": [ { "JWT": [] } ], "description": "按文档id列表查询各文档的元数据值", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取文档元数据值列表", "parameters": [ { "description": "获取文档元数据值列表请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.KnowledgeMetaValueListReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.KnowledgeMetaValueListResp" } } } ] } } } } }, "/knowledge/doc/meta/update": { "post": { "security": [ { "JWT": [] } ], "description": "批量更新文档的元数据值;key需已在知识库元数据中定义,option为add时不存在则新增、已存在则覆盖,update仅在已存在时更新", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "更新文档元数据值", "parameters": [ { "description": "更新文档元数据值请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.KnowledgeDocMetaValueOpenapiReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/segment/batch/create": { "post": { "security": [ { "JWT": [] } ], "description": "通过csv文件批量新增文档切片", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "批量新增文档切片", "parameters": [ { "description": "批量新增文档切片请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.BatchCreateDocSegmentReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/segment/child/create": { "post": { "security": [ { "JWT": [] } ], "description": "新增文档子分段;多模态知识库的分段内容可包含图片markdown,普通知识库不允许", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "新增子分段", "parameters": [ { "description": "新增子分段请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.CreateDocChildSegmentReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/segment/child/delete": { "delete": { "security": [ { "JWT": [] } ], "description": "删除文档子分段", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除子分段", "parameters": [ { "description": "删除子分段请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.DeleteDocChildSegmentReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/segment/child/list": { "get": { "security": [ { "JWT": [] } ], "description": "获取子分段列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取子分段列表", "parameters": [ { "type": "string", "name": "contentId", "in": "query", "required": true }, { "type": "string", "name": "docId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.DocChildSegmentResp" } } } ] } } } } }, "/knowledge/doc/segment/child/update": { "post": { "security": [ { "JWT": [] } ], "description": "更新文档子分段;多模态知识库的分段内容可包含图片markdown,普通知识库不允许", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "更新子分段", "parameters": [ { "description": "更新子分段请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.UpdateDocChildSegmentReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/segment/create": { "post": { "security": [ { "JWT": [] } ], "description": "新增单条文档切片;多模态知识库的切片内容可包含图片markdown,普通知识库不允许", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "新增文档切片", "parameters": [ { "description": "新增文档切片请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.CreateDocSegmentReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/segment/delete": { "delete": { "security": [ { "JWT": [] } ], "description": "删除文档切片", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除文档切片", "parameters": [ { "description": "删除文档切片请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.DeleteDocSegmentReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/segment/image/upload": { "post": { "security": [ { "JWT": [] } ], "description": "上传分段图片并返回markdown格式url,仅多模态知识库可用;返回的url可拼接进切片content中", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "分段图片上传", "parameters": [ { "type": "string", "description": "知识库id", "name": "knowledgeId", "in": "formData", "required": true }, { "type": "file", "description": "图片文件(png/jpg/jpeg)", "name": "files", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.RagUploadResponse" } } } ] } } } } }, "/knowledge/doc/segment/labels": { "post": { "security": [ { "JWT": [] } ], "description": "更新文档切片标签", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "更新文档切片标签", "parameters": [ { "description": "更新文档切片标签请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.DocSegmentLabelsReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/segment/list": { "get": { "security": [ { "JWT": [] } ], "description": "获取文档切分结果", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取文档切分结果", "parameters": [ { "type": "string", "name": "docId", "in": "query", "required": true }, { "type": "string", "name": "keyword", "in": "query" }, { "type": "integer", "name": "pageNo", "in": "query" }, { "type": "integer", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.DocSegmentResp" } } } ] } } } } }, "/knowledge/doc/segment/status/update": { "post": { "security": [ { "JWT": [] } ], "description": "更新文档切片启用状态", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "更新文档切片启用状态", "parameters": [ { "description": "更新文档切片启用状态请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.UpdateDocSegmentStatusReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/doc/segment/update": { "post": { "security": [ { "JWT": [] } ], "description": "更新文档切片;多模态知识库的切片内容可包含图片markdown,普通知识库不允许", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "更新文档切片", "parameters": [ { "description": "更新文档切片请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.UpdateDocSegmentReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.UpdateDocSegmentResp" } } } ] } } } } }, "/knowledge/doc/update/config": { "post": { "security": [ { "JWT": [] } ], "description": "更新文档配置", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "更新文档配置", "parameters": [ { "description": "更新文档配置请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.DocConfigUpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/export/record": { "delete": { "security": [ { "JWT": [] } ], "description": "删除知识库导出记录", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除知识库导出记录", "parameters": [ { "description": "删除知识库导出记录请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.DeleteKnowledgeExportRecordReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/export/record/list": { "get": { "security": [ { "JWT": [] } ], "description": "获取知识库导出记录列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取知识库导出记录列表", "parameters": [ { "type": "string", "description": "知识库id", "name": "knowledgeId", "in": "query", "required": true }, { "type": "integer", "name": "pageNo", "in": "query" }, { "type": "integer", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.KnowledgeExportRecordPageResult" } } } ] } } } } }, "/knowledge/hit": { "post": { "security": [ { "JWT": [] } ], "description": "知识库命中测试", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "知识库命中测试", "parameters": [ { "description": "知识库命中测试请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.KnowledgeHitReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.KnowledgeHitResp" } } } ] } } } } }, "/knowledge/meta/list": { "get": { "security": [ { "JWT": [] } ], "description": "获取知识库已定义的元数据key列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取知识库元数据key列表", "parameters": [ { "type": "string", "name": "knowledgeId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.GetKnowledgeMetaSelectResp" } } } ] } } } } }, "/knowledge/meta/update": { "post": { "security": [ { "JWT": [] } ], "description": "新增/修改/删除知识库的元数据key定义;文档元数据值的读写见 /knowledge/doc/meta/list 与 /knowledge/doc/meta/update", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "定义知识库元数据key", "parameters": [ { "description": "定义知识库元数据key请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.KnowledgeMetaKeyOpenapiReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/knowledge/parseTemplate": { "get": { "description": "查询解析模板列表openapi", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "查询解析模板列表openapi", "parameters": [ { "type": "string", "description": "文档类型,为空则返回全部", "name": "docType", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.ParseTemplateListResp" } } } ] } } } } }, "/knowledge/select": { "post": { "description": "查询知识库列表openapi", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "查询知识库列表openapi", "parameters": [ { "description": "查询知识库列表", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.KnowledgeSelectReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.KnowledgeListResp" } } } ] } } } } }, "/mcp/server/message": { "post": { "description": "获取MCPServer Message", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取MCPServer Message", "parameters": [ { "type": "string", "description": "mcpServerId", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/mcp/server/sse": { "get": { "description": "获取MCPServer SSE", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取MCPServer SSE", "parameters": [ { "type": "string", "description": "key", "name": "key", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/mcp/server/streamable": { "post": { "description": "获取MCPServer streamable 类型消息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取MCPServer streamable 类型消息", "parameters": [ { "type": "string", "description": "key", "name": "key", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/model/list": { "get": { "security": [ { "JWT": [] } ], "description": "根据查询条件返回当前 API Key 所属用户/组织可见的模型列表。未传 isActive 时默认仅返回已启用模型。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "模型列表查询OpenAPI", "parameters": [ { "enum": [ "llm", "embedding", "rerank" ], "type": "string", "description": "模型类型", "name": "modelType", "in": "query" }, { "type": "string", "description": "模型供应商", "name": "provider", "in": "query" }, { "type": "string", "description": "模型显示名称", "name": "displayName", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/response.ListResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.OpenAPIModelListItem" } } } } ] } } } ] } } } } }, "/oauth/code/authorize": { "get": { "description": "授权码方式-获取授权码", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi.OIDC" ], "summary": "授权码方式", "parameters": [ { "type": "string", "description": "备案ID", "name": "client_id", "in": "query", "required": true }, { "type": "string", "description": "重定向URI", "name": "redirect_uri", "in": "query", "required": true }, { "type": "string", "description": "响应类型", "name": "response_type", "in": "query", "required": true }, { "type": "string", "description": "权限范围", "name": "scope", "in": "query" }, { "type": "string", "description": "状态参数", "name": "state", "in": "query", "required": true }, { "type": "string", "description": "token", "name": "jwt_token", "in": "query", "required": true } ], "responses": { "302": { "description": "重定向到指定URI", "schema": { "type": "string" } } } } }, "/oauth/code/token": { "post": { "description": "授权码方式-获取Token", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "openapi.OIDC" ], "summary": "授权码方式", "parameters": [ { "type": "string", "description": "授权类型", "name": "grant_type", "in": "formData", "required": true }, { "type": "string", "description": "授权码", "name": "code", "in": "formData", "required": true }, { "type": "string", "description": "Client ID", "name": "client_id", "in": "formData", "required": true }, { "type": "string", "description": "回调地址", "name": "redirect_uri", "in": "formData", "required": true }, { "type": "string", "description": "备案密钥", "name": "client_secret", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.OAuthTokenResponse" } } } } }, "/oauth/code/token/refresh": { "post": { "description": "刷新令牌", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi.OIDC" ], "summary": "刷新令牌", "parameters": [ { "description": "RefreshToken", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OAuthRefreshRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.OAuthRefreshTokenResponse" } } } } }, "/oauth/jwks": { "get": { "description": "自动获取OAuthJWKS", "produces": [ "application/json" ], "tags": [ "openapi.OIDC" ], "summary": "公钥获取链接", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.OAuthJWKS" } } } } }, "/oauth/login": { "get": { "description": "返回OAuth登录页面", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi.OIDC" ], "summary": "OAuth登录授权", "parameters": [ { "type": "string", "description": "备案ID", "name": "client_id", "in": "query", "required": true }, { "type": "string", "description": "重定向URI", "name": "redirect_uri", "in": "query", "required": true }, { "type": "string", "description": "响应类型", "name": "response_type", "in": "query", "required": true }, { "type": "string", "description": "权限范围", "name": "scope", "in": "query" }, { "type": "string", "description": "状态参数", "name": "state", "in": "query", "required": true } ], "responses": { "302": { "description": "重定向到指定URI", "schema": { "type": "string" } } } } }, "/oauth/userinfo": { "get": { "description": "通过access token获取用户信息", "produces": [ "application/json" ], "tags": [ "openapi.OIDC" ], "summary": "OAuth获取用户信息", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.OAuthGetUserInfo" } } } } }, "/rag": { "put": { "description": "修改名称、描述、图标等基本信息(模型、知识库等高级配置请使用 /rag/config)。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "更新知识问答基本信息OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIUpdateRagRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } }, "post": { "description": "创建一个知识问答应用(草稿态)。返回的 uuid 用于后续配置、发布与问答接口。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "创建知识问答OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPICreateRagRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OpenAPICreateRagResponse" } } } ] } } } }, "delete": { "description": "删除指定知识问答,同时删除其已发布版本。删除后不可恢复,请谨慎操作。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除知识问答OpenAPI", "parameters": [ { "type": "string", "description": "知识问答UUID", "name": "uuid", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/rag/chat": { "post": { "description": "文本问答OpenAPI", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "文本问答OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIRagChatRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.OpenAPIRagChatResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/rag/chat/draft": { "post": { "description": "基于草稿配置问答,不要求已发布,计入统计。响应格式与 /rag/chat 一致(stream=true 为 SSE,否则为一次性 JSON)。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "知识问答草稿态问答OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIRagDraftChatRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.OpenAPIRagChatResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/rag/config": { "put": { "description": "更新模型、知识库、问答库、安全护栏等配置。除 uuid 外均为可选,只传要改的字段,未传的沿用当前草稿配置;模型 id 传模型UUID。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "更新知识问答配置OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIRagConfigUpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/rag/conversation": { "post": { "description": "创建一条会话,返回的 conversation_id 用于 /rag/chat 携带上下文。不传 conversation_id 的问答不落历史。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "知识问答创建会话OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIRagCreateConversationRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OpenAPIRagCreateConversationResponse" } } } ] } } } }, "delete": { "description": "删除整条会话(含全部历史消息)。只想清空消息、保留会话ID请用 /rag/conversation/clear。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除知识问答会话OpenAPI", "parameters": [ { "type": "string", "description": "知识问答UUID", "name": "uuid", "in": "query", "required": true }, { "type": "string", "description": "会话ID", "name": "conversation_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/rag/conversation/clear": { "delete": { "description": "传 detail_id 只删该条问答,不传则清空整条会话的全部消息。两种情况会话ID都保留,可继续提问。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "清空/按条删除知识问答会话消息OpenAPI", "parameters": [ { "type": "string", "description": "知识问答UUID", "name": "uuid", "in": "query", "required": true }, { "type": "string", "description": "会话ID", "name": "conversation_id", "in": "query", "required": true }, { "type": "string", "description": "问答明细ID(不传则清空全部)", "name": "detail_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/rag/conversation/detail": { "get": { "description": "获取指定会话的历史问答明细,分页返回,含检索命中列表与耗时。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "知识问答会话历史消息OpenAPI", "parameters": [ { "type": "string", "description": "知识问答UUID", "name": "uuid", "in": "query", "required": true }, { "type": "string", "description": "会话ID(由创建会话接口返回)", "name": "conversation_id", "in": "query", "required": true }, { "type": "integer", "description": "页码,从 1 开始", "name": "pageNo", "in": "query", "required": true }, { "type": "integer", "description": "每页条数,从 1 开始", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/response.PageResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.RagConversationDetailInfo" } } } } ] } } } ] } } } } }, "/rag/conversation/draft": { "delete": { "description": "传 detail_id 只删该条问答,不传则删除整条草稿会话。草稿会话尚未创建时直接返回成功。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除草稿知识问答会话消息OpenAPI", "parameters": [ { "type": "string", "description": "知识问答UUID", "name": "uuid", "in": "query", "required": true }, { "type": "string", "description": "问答明细ID(不传则删除整条草稿会话)", "name": "detail_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/rag/conversation/draft/detail": { "get": { "description": "草稿态每个知识问答只维护一条会话,按 uuid 定位后分页返回问答明细。尚未发起过对话时返回空列表。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "草稿知识问答会话历史消息OpenAPI", "parameters": [ { "type": "string", "description": "知识问答UUID", "name": "uuid", "in": "query", "required": true }, { "type": "integer", "description": "页码,从 1 开始", "name": "pageNo", "in": "query", "required": true }, { "type": "integer", "description": "每页条数,从 1 开始", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/response.PageResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.RagConversationDetailInfo" } } } } ] } } } ] } } } } }, "/rag/conversation/list": { "get": { "description": "获取指定知识问答下的会话列表,按创建时间降序排列。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "知识问答会话列表OpenAPI", "parameters": [ { "type": "string", "description": "知识问答UUID", "name": "uuid", "in": "query", "required": true }, { "type": "integer", "description": "页码,从 1 开始", "name": "pageNo", "in": "query", "required": true }, { "type": "integer", "description": "每页条数,从 1 开始", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/response.PageResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.RagConversationInfo" } } } } ] } } } ] } } } } }, "/rag/info": { "get": { "description": "获取知识问答详情,通过 published 参数控制返回草稿态或已发布态配置。返回中的模型 id 均为模型UUID。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "获取知识问答详情OpenAPI", "parameters": [ { "type": "string", "description": "知识问答UUID", "name": "uuid", "in": "query", "required": true }, { "type": "boolean", "description": "true=已发布态,false=草稿态(默认)", "name": "published", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.RagInfo" } } } ] } } } } }, "/rag/list": { "get": { "description": "获取当前 API Key 所属用户下的全部知识问答(含草稿与已发布),可按名称模糊筛选。返回的 uuid 可用于其他知识问答接口。", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "知识问答列表OpenAPI", "parameters": [ { "type": "string", "description": "按名称模糊筛选(可选)", "name": "name", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OpenAPIRagListResponse" } } } ] } } } } }, "/rag/publish": { "post": { "description": "发布知识问答,发布后可通过 /rag/chat 进行正式问答。发布前需先配置对话模型。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "发布知识问答OpenAPI", "parameters": [ { "description": "请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIRagPublishRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/wga/conversation": { "post": { "security": [ { "OpenAPIKey": [] } ], "description": "创建通用智能体对话(通过 modelUuid 指定模型)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "创建WGA对话", "parameters": [ { "description": "创建对话请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIWgaCreateConversationReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.CreateGeneralAgentConversationResp" } } } ] } } } }, "delete": { "security": [ { "OpenAPIKey": [] } ], "description": "删除通用智能体对话", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "删除WGA对话", "parameters": [ { "description": "删除对话请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.DeleteGeneralAgentConversationReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/wga/conversation/chat": { "post": { "security": [ { "OpenAPIKey": [] } ], "description": "发送消息并接收AG-UI SSE事件流(modelUuid 必填)", "consumes": [ "application/json" ], "produces": [ "text/event-stream" ], "tags": [ "openapi" ], "summary": "WGA对话流", "parameters": [ { "description": "对话流请求参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIWgaConversationChatReq" } } ], "responses": { "200": { "description": "SSE流式返回", "schema": { "type": "string" } } } } }, "/wga/conversation/detail": { "get": { "security": [ { "OpenAPIKey": [] } ], "description": "获取指定会话的对话详情,包含AG-UI事件流历史", "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "WGA对话详情", "parameters": [ { "type": "string", "description": "对话ID", "name": "threadId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/response.ListResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.GeneralAgentConversationDetailInfo" } } } } ] } } } ] } } } } }, "/wga/conversation/list": { "get": { "security": [ { "OpenAPIKey": [] } ], "description": "获取通用智能体对话历史列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "WGA对话列表", "parameters": [ { "type": "integer", "description": "页码,从1开始", "name": "pageNo", "in": "query", "required": true }, { "type": "integer", "description": "每页条数", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/response.ListResult" }, { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.GeneralAgentConversationInfo" } } } } ] } } } ] } } } } }, "/wga/conversation/workspace": { "get": { "security": [ { "OpenAPIKey": [] } ], "description": "获取工作区目录结构和文件列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "WGA工作区目录树", "parameters": [ { "type": "string", "description": "对话ID", "name": "threadId", "in": "query", "required": true }, { "type": "string", "description": "运行ID", "name": "runId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.GeneralAgentWorkspaceResp" } } } ] } } } } }, "/wga/conversation/workspace/download": { "get": { "security": [ { "OpenAPIKey": [] } ], "description": "下载工作区中的文件", "consumes": [ "application/json" ], "produces": [ "application/octet-stream" ], "tags": [ "openapi" ], "summary": "WGA工作区文件下载", "parameters": [ { "type": "string", "description": "对话ID", "name": "threadId", "in": "query", "required": true }, { "type": "string", "description": "运行ID", "name": "runId", "in": "query" }, { "type": "string", "description": "文件路径", "name": "path", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "file" } } } } }, "/workflow/file/upload": { "post": { "description": "工作流OpenAPI文件上传", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "工作流OpenAPI文件上传", "parameters": [ { "type": "file", "description": "文件", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/workflow/run": { "post": { "description": "工作流OpenAPI", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "openapi" ], "summary": "工作流OpenAPI", "parameters": [ { "description": "工作流运行参数", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.OpenAPIWorkflowRunReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } } }, "definitions": { "mp.AppModelParams": { "type": "object", "properties": { "providerDeepSeek": { "$ref": "#/definitions/mp.AppModelParamsDeepSeek" }, "providerHuoshan": { "$ref": "#/definitions/mp.AppModelParamsHuoShan" }, "providerInfini": { "$ref": "#/definitions/mp.AppModelParamsInfini" }, "providerOllama": { "$ref": "#/definitions/mp.AppModelParamsOllama" }, "providerOpenAICompatible": { "description": "OpenAI-API-compatible模型配置", "allOf": [ { "$ref": "#/definitions/mp.AppModelParamsOpenAICompatible" } ] }, "providerQianFan": { "$ref": "#/definitions/mp.AppModelParamsQianFan" }, "providerQwen": { "$ref": "#/definitions/mp.AppModelParamsQwen" }, "providerTencent": { "$ref": "#/definitions/mp.AppModelParamsTencent" }, "providerYuanjing": { "description": "YuanJing模型配置", "allOf": [ { "$ref": "#/definitions/mp.AppModelParamsYuanjing" } ] } } }, "mp.AppModelParamsDeepSeek": { "type": "object", "properties": { "llm": { "description": "大语言模型配置", "allOf": [ { "$ref": "#/definitions/mp_common.LLMParams" } ] } } }, "mp.AppModelParamsHuoShan": { "type": "object", "properties": { "llm": { "description": "大语言模型配置", "allOf": [ { "$ref": "#/definitions/mp_common.LLMParams" } ] } } }, "mp.AppModelParamsInfini": { "type": "object", "properties": { "llm": { "description": "大语言模型配置", "allOf": [ { "$ref": "#/definitions/mp_common.LLMParams" } ] } } }, "mp.AppModelParamsOllama": { "type": "object", "properties": { "llm": { "description": "大语言模型配置", "allOf": [ { "$ref": "#/definitions/mp_common.LLMParams" } ] } } }, "mp.AppModelParamsOpenAICompatible": { "type": "object", "properties": { "llm": { "description": "大语言模型配置", "allOf": [ { "$ref": "#/definitions/mp_common.LLMParams" } ] } } }, "mp.AppModelParamsQianFan": { "type": "object", "properties": { "llm": { "description": "大语言模型配置", "allOf": [ { "$ref": "#/definitions/mp_common.LLMParams" } ] } } }, "mp.AppModelParamsQwen": { "type": "object", "properties": { "llm": { "description": "大语言模型配置", "allOf": [ { "$ref": "#/definitions/mp_common.LLMParams" } ] } } }, "mp.AppModelParamsTencent": { "type": "object", "properties": { "llm": { "description": "大语言模型配置", "allOf": [ { "$ref": "#/definitions/mp_common.LLMParams" } ] } } }, "mp.AppModelParamsYuanjing": { "type": "object", "properties": { "llm": { "description": "大语言模型配置", "allOf": [ { "$ref": "#/definitions/mp_common.LLMParams" } ] } } }, "mp_common.LLMParams": { "type": "object", "properties": { "frequencyPenalty": { "description": "频率惩罚", "type": "number" }, "frequencyPenaltyEnable": { "description": "频率惩罚(开关)", "type": "boolean" }, "maxTokens": { "description": "最大标记", "type": "integer" }, "maxTokensEnable": { "description": "最大标记(开关)", "type": "boolean" }, "presencePenalty": { "description": "存在惩罚", "type": "number" }, "presencePenaltyEnable": { "description": "存在惩罚(开关)", "type": "boolean" }, "temperature": { "description": "温度", "type": "number" }, "temperatureEnable": { "description": "温度(开关)", "type": "boolean" }, "thinkingEnable": { "description": "思考过程(开关)", "type": "boolean" }, "topP": { "description": "Top P", "type": "number" }, "topPEnable": { "description": "Top P(开关)", "type": "boolean" } } }, "mp_common.Tag": { "type": "object", "properties": { "text": { "type": "string" } } }, "oauth2_util.JWK": { "type": "object", "properties": { "alg": { "type": "string" }, "e": { "type": "string" }, "kid": { "type": "string" }, "kty": { "type": "string" }, "n": { "type": "string" }, "use": { "type": "string" } } }, "request.AppKnowledgeBase": { "type": "object", "required": [ "id" ], "properties": { "avatar": { "description": "头像", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "category": { "description": "知识库类别 0-知识库,1-问答库,2-多模态知识库", "type": "integer" }, "description": { "description": "知识库描述", "type": "string" }, "external": { "description": "外部数据库标识", "type": "integer" }, "graphSwitch": { "description": "知识图谱开关", "type": "integer" }, "id": { "description": "知识库id", "type": "string" }, "metaDataFilterParams": { "$ref": "#/definitions/request.MetaDataFilterParams" }, "name": { "type": "string" }, "orgName": { "description": "知识库所属名称", "type": "string" }, "share": { "description": "是分享,还是私有", "type": "boolean" } } }, "request.AppKnowledgebaseConfig": { "type": "object", "properties": { "config": { "description": "知识库参数", "allOf": [ { "$ref": "#/definitions/request.AppKnowledgebaseParams" } ] }, "knowledgebases": { "description": "知识库id、名字", "type": "array", "items": { "$ref": "#/definitions/request.AppKnowledgeBase" } } } }, "request.AppKnowledgebaseParams": { "type": "object", "properties": { "keywordPriority": { "description": "关键词权重", "type": "number" }, "matchType": { "description": "matchType:vector(向量检索)、text(文本检索)、mix(混合检索:向量+文本)", "type": "string" }, "maxHistory": { "description": "最长上下文", "type": "integer" }, "priorityMatch": { "description": "权重匹配,只有在混合检索模式下,选择权重设置后,这个才设置为1", "type": "integer" }, "semanticsPriority": { "description": "语义权重", "type": "number" }, "termWeight": { "description": "关键词系数,默认为1", "type": "number" }, "termWeightEnable": { "description": "关键词系数开关", "type": "boolean" }, "threshold": { "description": "过滤阈值", "type": "number" }, "topK": { "description": "知识条数", "type": "integer" }, "useGraph": { "description": "知识图谱开关", "type": "boolean" } } }, "request.AppModelConfig": { "type": "object", "properties": { "config": { "description": "模型配置" }, "displayName": { "description": "模型展示名称(请求非必填)", "type": "string" }, "examples": { "description": "仅用于swagger展示;模型对应供应商中的对应llm、embedding或rerank结构是config实际的参数", "allOf": [ { "$ref": "#/definitions/mp.AppModelParams" } ] }, "model": { "description": "模型名称", "type": "string" }, "modelId": { "description": "模型ID", "type": "string" }, "modelType": { "description": "模型类型(llm/embedding/rerank)", "type": "string" }, "provider": { "description": "模型供应商", "type": "string" } } }, "request.AppPublishConfig": { "type": "object", "properties": { "publishType": { "type": "string" } } }, "request.AppQAKnowledgeBase": { "type": "object", "required": [ "id" ], "properties": { "avatar": { "description": "头像", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "category": { "description": "知识库类别 0-知识库,1-问答库,2-多模态知识库", "type": "integer" }, "description": { "description": "描述", "type": "string" }, "id": { "description": "知识库id", "type": "string" }, "metaDataFilterParams": { "$ref": "#/definitions/request.MetaDataFilterParams" }, "name": { "type": "string" }, "orgName": { "description": "知识库所属名称", "type": "string" }, "share": { "description": "是分享,还是私有", "type": "boolean" } } }, "request.AppQAKnowledgebaseConfig": { "type": "object", "properties": { "config": { "description": "问答库参数", "allOf": [ { "$ref": "#/definitions/request.AppQAKnowledgebaseParams" } ] }, "knowledgebases": { "description": "问答库id、名字", "type": "array", "items": { "$ref": "#/definitions/request.AppQAKnowledgeBase" } } } }, "request.AppQAKnowledgebaseParams": { "type": "object", "properties": { "keywordPriority": { "description": "关键词权重", "type": "number" }, "matchType": { "description": "matchType:vector(向量检索)、text(文本检索)、mix(混合检索:向量+文本)", "type": "string" }, "maxHistory": { "description": "最长上下文", "type": "integer" }, "priorityMatch": { "description": "权重匹配,只有在混合检索模式下,选择权重设置后,这个才设置为1", "type": "integer" }, "semanticsPriority": { "description": "语义权重", "type": "number" }, "threshold": { "description": "过滤阈值", "type": "number" }, "topK": { "description": "知识条数", "type": "integer" } } }, "request.AppSafetyConfig": { "type": "object", "properties": { "enable": { "description": "安全护栏(开关)", "type": "boolean" }, "tables": { "type": "array", "items": { "$ref": "#/definitions/request.SensitiveTable" } } } }, "request.AssistantToolConfig": { "type": "object", "properties": { "rerankId": { "type": "string" } } }, "request.Avatar": { "type": "object", "properties": { "key": { "description": "前端透传给后端用于保存avatar,例如:custom-upload/avatar/abc/def.png", "type": "string" }, "path": { "description": "前端请求地址,例如:/v1/static/avatar/abc/def.png (请求非必填)", "type": "string" } } }, "request.BatchCreateDocSegmentReq": { "type": "object", "required": [ "docId", "fileUploadId" ], "properties": { "docId": { "description": "文档id", "type": "string" }, "fileUploadId": { "description": "fileUploadId", "type": "string" } } }, "request.ChildChunk": { "type": "object", "properties": { "chunkNo": { "description": "子分段序列号", "type": "integer" }, "content": { "description": "子分段内容", "type": "string" } } }, "request.ConversionStreamFile": { "type": "object", "properties": { "fileName": { "type": "string" }, "fileSize": { "type": "integer" }, "fileUrl": { "type": "string" } } }, "request.CreateDocChildSegmentReq": { "type": "object", "required": [ "content", "docId", "parentId" ], "properties": { "content": { "description": "分段内容", "type": "array", "items": { "type": "string" } }, "docId": { "description": "文档id", "type": "string" }, "parentId": { "description": "父分段id", "type": "string" } } }, "request.CreateDocSegmentReq": { "type": "object", "required": [ "content", "docId", "labels" ], "properties": { "content": { "description": "分段内容", "type": "string" }, "docId": { "description": "文档id", "type": "string" }, "labels": { "description": "关键词列表", "type": "array", "items": { "type": "string" } } } }, "request.CreateKnowledgeReq": { "type": "object", "required": [ "embeddingModelInfo", "name" ], "properties": { "avatar": { "description": "图标", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "category": { "description": "0:知识库,1:问答库,2:多模态知识库", "type": "integer" }, "description": { "type": "string" }, "embeddingModelInfo": { "$ref": "#/definitions/request.EmbeddingModel" }, "knowledgeGraph": { "$ref": "#/definitions/request.KnowledgeGraph" }, "name": { "type": "string" }, "parseTemplate": { "description": "各文档类型选定的解析模板,若有自定义模板则传参,默认传空数组", "type": "array", "items": { "$ref": "#/definitions/request.ParseTemplateBind" } } } }, "request.DeleteDocChildSegmentReq": { "type": "object", "required": [ "childChunkNoList", "docId", "parentId" ], "properties": { "childChunkNoList": { "description": "子分段序列号列表", "type": "array", "items": { "type": "integer" } }, "docId": { "description": "文档id", "type": "string" }, "parentChunkNo": { "description": "父分段序列号", "type": "integer" }, "parentId": { "description": "父分段id", "type": "string" } } }, "request.DeleteDocReq": { "type": "object", "required": [ "docIdList", "knowledgeId" ], "properties": { "docIdList": { "type": "array", "items": { "type": "string" } }, "knowledgeId": { "type": "string" } } }, "request.DeleteDocSegmentReq": { "type": "object", "required": [ "contentId", "docId" ], "properties": { "contentId": { "type": "string" }, "docId": { "description": "文档id", "type": "string" } } }, "request.DeleteGeneralAgentConversationReq": { "type": "object", "required": [ "threadId" ], "properties": { "threadId": { "description": "对话ID", "type": "string" } } }, "request.DeleteKnowledge": { "type": "object", "required": [ "knowledgeId" ], "properties": { "knowledgeId": { "type": "string" } } }, "request.DeleteKnowledgeExportRecordReq": { "type": "object", "required": [ "exportRecordId", "knowledgeId" ], "properties": { "exportRecordId": { "description": "问答库导出记录id", "type": "string" }, "knowledgeId": { "description": "问答库id", "type": "string" } } }, "request.DocConfigUpdateReq": { "type": "object", "required": [ "docIdList", "knowledgeId" ], "properties": { "asrModelId": { "description": "asr模型id", "type": "string" }, "docAnalyzer": { "description": "文档解析类型 text / ocr / model / asr / multimodal", "type": "array", "items": { "type": "string" } }, "docIdList": { "description": "文档id列表,当更新配置时需要传", "type": "array", "items": { "type": "string" } }, "docImportType": { "description": "文档导入类型,0:文件上传,1:单条url上传,2.文件url上传", "type": "integer" }, "docMetaData": { "description": "元数据", "type": "array", "items": { "$ref": "#/definitions/request.DocMetaData" } }, "docPreprocess": { "description": "文本预处理规则 replaceSymbols / deleteLinks", "type": "array", "items": { "type": "string" } }, "docSegment": { "description": "文档分段配置,useTemplate 为 true 时不填", "allOf": [ { "$ref": "#/definitions/request.DocSegment" } ] }, "knowledgeId": { "description": "知识库id", "type": "string" }, "multimodalModelId": { "description": "多模态模型id", "type": "string" }, "overrideTemplate": { "description": "是否把本次选择的模板写回知识库", "type": "boolean" }, "parseTemplate": { "description": "各文档类型选定的解析模板,useTemplate 为 true 时使用", "type": "array", "items": { "$ref": "#/definitions/request.ParseTemplateBind" } }, "parserModelId": { "description": "模型解析或ocr模型id", "type": "string" }, "useTemplate": { "description": "是否套用知识库解析模板,false 按手动配置处理", "type": "boolean" } } }, "request.DocImportReq": { "type": "object", "required": [ "docInfoList", "knowledgeId" ], "properties": { "asrModelId": { "description": "asr模型id", "type": "string" }, "docAnalyzer": { "description": "文档解析类型 text / ocr / model / asr / multimodal", "type": "array", "items": { "type": "string" } }, "docImportType": { "description": "文档导入类型,0:文件上传,1:单条url上传,2.文件url上传", "type": "integer" }, "docInfoList": { "description": "上传文档列表", "type": "array", "items": { "$ref": "#/definitions/request.DocInfo" } }, "docMetaData": { "description": "元数据", "type": "array", "items": { "$ref": "#/definitions/request.DocMetaData" } }, "docPreprocess": { "description": "文本预处理规则 replaceSymbols / deleteLinks", "type": "array", "items": { "type": "string" } }, "docSegment": { "description": "文档分段配置,useTemplate 为 true 时不填", "allOf": [ { "$ref": "#/definitions/request.DocSegment" } ] }, "knowledgeId": { "description": "知识库id", "type": "string" }, "multimodalModelId": { "description": "多模态模型id", "type": "string" }, "overrideTemplate": { "description": "是否把本次选择的模板写回知识库", "type": "boolean" }, "parseTemplate": { "description": "各文档类型选定的解析模板,useTemplate 为 true 时使用", "type": "array", "items": { "$ref": "#/definitions/request.ParseTemplateBind" } }, "parserModelId": { "description": "模型解析或ocr模型id", "type": "string" }, "useTemplate": { "description": "是否套用知识库解析模板,false 按手动配置处理", "type": "boolean" } } }, "request.DocInfo": { "type": "object", "properties": { "docId": { "description": "文档id", "type": "string" }, "docName": { "description": "文档名称", "type": "string" }, "docSize": { "description": "文档大小,单位字节(Byte)", "type": "integer" }, "docType": { "description": "文档后缀", "type": "string" }, "docUrl": { "description": "文档url(可选)", "type": "string" } } }, "request.DocListReq": { "type": "object", "required": [ "knowledgeId", "pageSize" ], "properties": { "docIdList": { "description": "文档id列表,只用于返回所选文档的集合,该值不为空时,其他筛选条件将被忽略", "type": "array", "items": { "type": "string" } }, "docName": { "type": "string" }, "graphStatus": { "description": "图谱状态:-1.全部 0.待处理 1.解析中 2.解析成功 3.解析失败", "type": "array", "items": { "type": "integer" } }, "knowledgeId": { "type": "string" }, "metaEndTime": { "description": "metaType=time 时的结束时间戳(毫秒,字符串)", "type": "string" }, "metaStartTime": { "description": "metaType=time 时的起始时间戳(毫秒,字符串)", "type": "string" }, "metaType": { "description": "元数据类型:string/number/time,为空时按旧逻辑(metaValue 模糊匹配,排除 time)", "type": "string" }, "metaValue": { "description": "元数据值,metaType 为 string/number 时使用", "type": "string" }, "pageNo": { "type": "integer" }, "pageSize": { "type": "integer" }, "status": { "description": "文档状态:-1-全部, 0-待处理, 1- 处理完成, 2-正在审核中,3-正在解析中,4-审核未通过,5-解析失败", "type": "array", "items": { "type": "integer" } } } }, "request.DocMetaData": { "type": "object", "properties": { "metaId": { "description": "元数据id", "type": "string" }, "metaKey": { "description": "key", "type": "string" }, "metaRule": { "description": "正则表达式", "type": "string" }, "metaValue": { "description": "确定值", "type": "string" }, "metaValueType": { "description": "string,number,time", "type": "string" }, "option": { "description": "option:add(新增)、update(更新)、delete(删除),update 和delete 的时候metaId 不能为空", "type": "string" } } }, "request.DocSegment": { "type": "object", "required": [ "segmentMethod" ], "properties": { "maxSplitter": { "description": "可分隔最大值(只有自定义分段必填)", "type": "integer" }, "overlap": { "description": "可重叠值(只有自定义分段必填)", "type": "number" }, "segmentMethod": { "description": "分段方法 0:通用分段;1:父子分段", "type": "string" }, "segmentType": { "description": "分段方式,只有通用分段必填 0:自动分段;1:自定义分段", "type": "string" }, "splitter": { "description": "分隔符(只有自定义分段必填)", "type": "array", "items": { "type": "string" } }, "subMaxSplitter": { "description": "可分隔最大值(只有父子分段必填)", "type": "integer" }, "subSplitter": { "description": "分隔符(只有父子分段必填)", "type": "array", "items": { "type": "string" } } } }, "request.DocSegmentLabelsReq": { "type": "object", "required": [ "contentId", "docId", "labels" ], "properties": { "contentId": { "type": "string" }, "docId": { "type": "string" }, "labels": { "type": "array", "items": { "type": "string" } } } }, "request.EmbeddingModel": { "type": "object", "required": [ "modelId" ], "properties": { "modelId": { "type": "string" } } }, "request.GeneralAgentConversationMessage": { "type": "object", "required": [ "content", "role" ], "properties": { "content": { "description": "内容 string 或者 [{\"type\":\"text\",\"text\":\"这张图片是什么?\"},{\"type\":\"binary\",\"mimeType\":\"image/png\",\"url\":\"https://...\"}]" }, "id": { "description": "消息id", "type": "string" }, "role": { "description": "角色 user", "type": "string" } } }, "request.KnowledgeDocExportReq": { "type": "object", "required": [ "knowledgeId" ], "properties": { "docIdList": { "description": "文档id", "type": "array", "items": { "type": "string" } }, "knowledgeId": { "description": "知识库id", "type": "string" } } }, "request.KnowledgeDocMetaValueOpenapiReq": { "type": "object", "required": [ "docIdList", "knowledgeId", "metaValueList" ], "properties": { "docIdList": { "description": "文档id列表", "type": "array", "items": { "type": "string" } }, "knowledgeId": { "description": "知识库id", "type": "string" }, "metaValueList": { "type": "array", "items": { "$ref": "#/definitions/request.KnowledgeMetaValueItem" } } } }, "request.KnowledgeGraph": { "type": "object", "properties": { "llmModelId": { "description": "大模型id,开关为true必填", "type": "string" }, "schemaUrl": { "description": "模型schema文件地址,可以为空", "type": "string" }, "switch": { "description": "知识图谱开关", "type": "boolean" } } }, "request.KnowledgeHitReq": { "type": "object", "required": [ "knowledgeMatchParams" ], "properties": { "docInfoList": { "description": "上传文档列表", "type": "array", "items": { "$ref": "#/definitions/request.DocInfo" } }, "knowledgeList": { "type": "array", "items": { "$ref": "#/definitions/request.AppKnowledgeBase" } }, "knowledgeMatchParams": { "$ref": "#/definitions/request.KnowledgeMatchParams" }, "question": { "type": "string" } } }, "request.KnowledgeMatchParams": { "type": "object", "required": [ "matchType" ], "properties": { "keywordPriority": { "description": "关键词权重", "type": "number" }, "matchType": { "description": "matchType:vector(向量检索)、text(文本检索)、mix(混合检索:向量+文本)", "type": "string" }, "priorityMatch": { "description": "权重匹配,只有在混合检索模式下,选择权重设置后,这个才设置为1", "type": "integer" }, "rerankModelId": { "description": "rerank模型id", "type": "string" }, "semanticsPriority": { "description": "语义权重", "type": "number" }, "termWeight": { "description": "关键词系数", "type": "number" }, "termWeightEnable": { "description": "关键词系数开关", "type": "boolean" }, "threshold": { "description": "threshold 过滤分数阈值", "type": "number" }, "topK": { "description": "topK 获取最高的几行", "type": "integer" }, "useGraph": { "description": "是否使用知识图谱", "type": "boolean" } } }, "request.KnowledgeMetaKeyItem": { "type": "object", "required": [ "option" ], "properties": { "metaId": { "description": "元数据id,option 为 update/delete 时必填", "type": "string" }, "metaKey": { "description": "key,只能包含小写字母、数字和下划线,且以小写字母开头,option 为 add/update 时必填", "type": "string" }, "metaValueType": { "description": "值类型:string/number/time,option 为 add/update 时必填", "type": "string" }, "option": { "description": "操作类型:add(新增)、update(修改)、delete(删除)", "type": "string" } } }, "request.KnowledgeMetaKeyOpenapiReq": { "type": "object", "required": [ "knowledgeId", "metaKeyList" ], "properties": { "knowledgeId": { "description": "知识库id", "type": "string" }, "metaKeyList": { "description": "元数据key操作列表", "type": "array", "items": { "$ref": "#/definitions/request.KnowledgeMetaKeyItem" } } } }, "request.KnowledgeMetaValueItem": { "type": "object", "required": [ "metaKey", "option" ], "properties": { "metaKey": { "description": "key,需已在知识库元数据中定义", "type": "string" }, "metaValue": { "description": "值,option 为 delete 时可不填", "type": "string" }, "metaValueType": { "description": "值类型:string/number/time,需与key的定义一致", "type": "string" }, "option": { "description": "操作类型:add(不存在则新增、已有则覆盖)、update(仅已存在时更新)、delete(删除)", "type": "string" } } }, "request.KnowledgeMetaValueListReq": { "type": "object", "required": [ "docIdList", "knowledgeId" ], "properties": { "docIdList": { "type": "array", "items": { "type": "string" } }, "knowledgeId": { "type": "string" } } }, "request.KnowledgeSelectReq": { "type": "object", "properties": { "category": { "description": "0:知识库,1:问答库", "type": "integer" }, "external": { "description": "-1:全部,0:内部知识库,1:外部知识库", "type": "integer" }, "name": { "type": "string" }, "tagId": { "type": "array", "items": { "type": "string" } } } }, "request.MemoryConfig": { "type": "object", "properties": { "maxHistoryLength": { "type": "integer" } } }, "request.MetaDataFilterParams": { "type": "object", "properties": { "filterEnable": { "description": "元数据过滤开关", "type": "boolean" }, "filterLogicType": { "description": "元数据逻辑条件:and/or", "type": "string" }, "metaFilterParams": { "description": "元数据过滤参数列表", "type": "array", "items": { "$ref": "#/definitions/request.MetaFilterParams" } } } }, "request.MetaFilterParams": { "type": "object", "properties": { "condition": { "description": "条件", "type": "string" }, "key": { "description": "Key", "type": "string" }, "type": { "description": "类型(Time, String, Number)", "type": "string" }, "value": { "description": "value", "type": "string" } } }, "request.OAuthRefreshRequest": { "type": "object", "required": [ "grant_type" ], "properties": { "client_id": { "type": "string" }, "client_secret": { "type": "string" }, "grant_type": { "type": "string" }, "refresh_token": { "type": "string" } } }, "request.OpenAPIAgentChatRequest": { "type": "object", "required": [ "query", "uuid" ], "properties": { "conversation_id": { "type": "string" }, "file_info": { "type": "array", "items": { "$ref": "#/definitions/request.ConversionStreamFile" } }, "query": { "type": "string" }, "stream": { "type": "boolean" }, "uuid": { "type": "string" } } }, "request.OpenAPIAgentConfigUpdateRequest": { "type": "object", "required": [ "assistantUuid" ], "properties": { "assistantUuid": { "type": "string" }, "instructions": { "type": "string" }, "knowledgeBaseConfig": { "$ref": "#/definitions/request.AppKnowledgebaseConfig" }, "memoryConfig": { "$ref": "#/definitions/request.MemoryConfig" }, "modelConfig": { "$ref": "#/definitions/request.AppModelConfig" }, "prologue": { "type": "string" }, "recommendConfig": { "$ref": "#/definitions/request.RecommendConfig" }, "recommendQuestion": { "type": "array", "items": { "type": "string" } }, "rerankConfig": { "$ref": "#/definitions/request.AppModelConfig" }, "safetyConfig": { "$ref": "#/definitions/request.AppSafetyConfig" }, "visionConfig": { "$ref": "#/definitions/request.VisionConfig" } } }, "request.OpenAPIAgentCreateConversationRequest": { "type": "object", "required": [ "title", "uuid" ], "properties": { "title": { "description": "作为会话标题落库,为空会导致会话列表显示空白", "type": "string" }, "uuid": { "type": "string" } } }, "request.OpenAPIAgentDraftChatRequest": { "type": "object", "required": [ "query", "uuid" ], "properties": { "conversation_id": { "type": "string" }, "file_info": { "type": "array", "items": { "$ref": "#/definitions/request.ConversionStreamFile" } }, "query": { "type": "string" }, "uuid": { "type": "string" } } }, "request.OpenAPIAgentPublishRequest": { "type": "object", "required": [ "assistantUuid", "desc", "publishType", "version" ], "properties": { "assistantUuid": { "type": "string" }, "desc": { "type": "string" }, "publishType": { "description": "public:系统公开发布 organization:组织公开发布 private:私密发布", "type": "string" }, "version": { "type": "string" } } }, "request.OpenAPIChatflowChatRequest": { "type": "object", "required": [ "conversation_id", "query", "uuid" ], "properties": { "conversation_id": { "type": "string" }, "parameters": { "type": "object", "additionalProperties": {} }, "query": { "type": "string" }, "uuid": { "type": "string" } } }, "request.OpenAPIChatflowCreateConversationRequest": { "type": "object", "required": [ "uuid" ], "properties": { "conversation_name": { "type": "string" }, "uuid": { "type": "string" } } }, "request.OpenAPIChatflowDeleteConversationRequest": { "type": "object", "required": [ "conversation_id", "uuid" ], "properties": { "conversation_id": { "type": "string" }, "uuid": { "type": "string" } } }, "request.OpenAPIChatflowGetConversationListRequest": { "type": "object", "required": [ "uuid" ], "properties": { "uuid": { "type": "string" } } }, "request.OpenAPIChatflowGetConversationMessageListRequest": { "type": "object", "required": [ "conversation_id", "uuid" ], "properties": { "conversation_id": { "type": "string" }, "limit": { "type": "string" }, "uuid": { "type": "string" } } }, "request.OpenAPICreateAgentRequest": { "type": "object", "required": [ "name" ], "properties": { "avatar": { "description": "图标", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "category": { "description": "1:单智能体 2:多智能体", "type": "integer" }, "desc": { "description": "描述", "type": "string" }, "name": { "description": "名称", "type": "string" } } }, "request.OpenAPICreateRagRequest": { "type": "object", "required": [ "name" ], "properties": { "avatar": { "description": "图标", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "desc": { "description": "描述", "type": "string" }, "name": { "description": "名称", "type": "string" } } }, "request.OpenAPIRagChatRequest": { "type": "object", "required": [ "conversation_id", "query", "uuid" ], "properties": { "conversation_id": { "description": "由创建会话接口获取,口径与页面侧一致:已发布问答必须先建会话", "type": "string" }, "file_info": { "description": "随问题携带的文件,当前仅支持 1 张图片(png/jpg/jpeg)", "type": "array", "items": { "$ref": "#/definitions/request.ConversionStreamFile" } }, "query": { "type": "string" }, "stream": { "type": "boolean" }, "uuid": { "type": "string" } } }, "request.OpenAPIRagConfigUpdateRequest": { "type": "object", "required": [ "uuid" ], "properties": { "knowledgeBaseConfig": { "description": "知识库", "allOf": [ { "$ref": "#/definitions/request.AppKnowledgebaseConfig" } ] }, "modelConfig": { "description": "对话模型,modelId 传模型UUID", "allOf": [ { "$ref": "#/definitions/request.AppModelConfig" } ] }, "qaKnowledgeBaseConfig": { "description": "问答库", "allOf": [ { "$ref": "#/definitions/request.AppQAKnowledgebaseConfig" } ] }, "qaRerankConfig": { "description": "问答库Rerank模型,modelId 传模型UUID", "allOf": [ { "$ref": "#/definitions/request.AppModelConfig" } ] }, "recommendQuestion": { "description": "推荐问题", "type": "array", "items": { "type": "string" } }, "rerankConfig": { "description": "知识库Rerank模型,modelId 传模型UUID", "allOf": [ { "$ref": "#/definitions/request.AppModelConfig" } ] }, "safetyConfig": { "description": "安全护栏", "allOf": [ { "$ref": "#/definitions/request.AppSafetyConfig" } ] }, "uuid": { "type": "string" }, "visionConfig": { "description": "视觉开关", "allOf": [ { "$ref": "#/definitions/request.VisionConfig" } ] } } }, "request.OpenAPIRagCreateConversationRequest": { "type": "object", "required": [ "title", "uuid" ], "properties": { "title": { "description": "会话标题,一般取首个问题", "type": "string" }, "uuid": { "type": "string" } } }, "request.OpenAPIRagDraftChatRequest": { "type": "object", "required": [ "query", "uuid" ], "properties": { "file_info": { "description": "随问题携带的文件,当前仅支持 1 张图片(png/jpg/jpeg)", "type": "array", "items": { "$ref": "#/definitions/request.ConversionStreamFile" } }, "query": { "type": "string" }, "stream": { "type": "boolean" }, "uuid": { "type": "string" } } }, "request.OpenAPIRagPublishRequest": { "type": "object", "required": [ "desc", "publishType", "uuid", "version" ], "properties": { "desc": { "type": "string" }, "publishType": { "description": "public:系统公开发布 organization:组织公开发布 private:私密发布", "type": "string" }, "uuid": { "type": "string" }, "version": { "type": "string" } } }, "request.OpenAPIUpdateAgentRequest": { "type": "object", "required": [ "assistantUuid", "name" ], "properties": { "assistantUuid": { "description": "智能体UUID", "type": "string" }, "avatar": { "description": "图标", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "desc": { "description": "描述", "type": "string" }, "name": { "description": "名称", "type": "string" } } }, "request.OpenAPIUpdateRagRequest": { "type": "object", "required": [ "name", "uuid" ], "properties": { "avatar": { "description": "图标", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "desc": { "description": "描述", "type": "string" }, "name": { "description": "名称", "type": "string" }, "uuid": { "description": "知识问答UUID", "type": "string" } } }, "request.OpenAPIWgaConversationChatReq": { "type": "object", "required": [ "messages", "threadId" ], "properties": { "agentId": { "description": "智能体ID,可选,为空时使用默认Supervisor", "type": "string" }, "messages": { "description": "消息列表", "type": "array", "items": { "$ref": "#/definitions/request.GeneralAgentConversationMessage" } }, "modelUuid": { "description": "模型UUID,可选", "type": "string" }, "threadId": { "description": "对话ID", "type": "string" } } }, "request.OpenAPIWgaCreateConversationReq": { "type": "object", "required": [ "modelUuid", "title" ], "properties": { "modelUuid": { "description": "模型UUID,必填", "type": "string" }, "title": { "description": "标题", "type": "string" } } }, "request.OpenAPIWorkflowRunReq": { "type": "object", "required": [ "uuid" ], "properties": { "parameters": { "type": "object", "additionalProperties": {} }, "uuid": { "type": "string" } } }, "request.ParseTemplateBind": { "type": "object", "required": [ "docType", "templateId" ], "properties": { "docType": { "type": "string" }, "templateId": { "type": "string" } } }, "request.RecommendConfig": { "type": "object", "properties": { "maxHistory": { "description": "最大历史会话轮次", "type": "integer" }, "modelConfig": { "description": "模型信息", "allOf": [ { "$ref": "#/definitions/request.AppModelConfig" } ] }, "prompt": { "description": "提示词", "type": "string" }, "promptEnable": { "description": "提示词开关", "type": "boolean" }, "recommendEnable": { "description": "追问配置开关", "type": "boolean" } } }, "request.SensitiveTable": { "type": "object", "required": [ "tableId" ], "properties": { "tableId": { "description": "敏感词表id", "type": "string" }, "tableName": { "description": "敏感词表名称(请求非必填)", "type": "string" } } }, "request.UpdateDocChildSegmentReq": { "type": "object", "required": [ "childChunk", "docId", "parentId" ], "properties": { "childChunk": { "description": "子分段序列号列表", "allOf": [ { "$ref": "#/definitions/request.ChildChunk" } ] }, "docId": { "description": "文档id", "type": "string" }, "parentChunkNo": { "description": "父分段序列号", "type": "integer" }, "parentId": { "description": "父分段id", "type": "string" } } }, "request.UpdateDocSegmentReq": { "type": "object", "required": [ "content", "contentId", "docId" ], "properties": { "content": { "type": "string" }, "contentId": { "type": "string" }, "docId": { "type": "string" } } }, "request.UpdateDocSegmentStatusReq": { "type": "object", "required": [ "contentStatus", "docId" ], "properties": { "all": { "description": "all 代表全部启用,此时将忽略contentId", "type": "boolean" }, "contentId": { "type": "string" }, "contentStatus": { "description": "\"true\"代表打开,\"false\"代表关闭", "type": "string" }, "docId": { "type": "string" } } }, "request.UpdateKnowledgeReq": { "type": "object", "required": [ "knowledgeId", "name" ], "properties": { "avatar": { "description": "图标", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "description": { "type": "string" }, "knowledgeId": { "type": "string" }, "name": { "type": "string" }, "parseTemplate": { "description": "各文档类型选定的解析模板", "type": "array", "items": { "$ref": "#/definitions/request.ParseTemplateBind" } } } }, "request.VisionConfig": { "type": "object", "properties": { "picNum": { "description": "视觉配置图片数量", "type": "integer" } } }, "response.AgentFileMeta": { "type": "object", "properties": { "createAt": { "type": "string" }, "desc": { "type": "string" }, "name": { "type": "string" } } }, "response.AgentResponseFile": { "type": "object", "properties": { "fileType": { "type": "string" }, "fileUrl": { "type": "string" }, "metadata": { "description": "扩展信息:", "allOf": [ { "$ref": "#/definitions/response.AgentFileMeta" } ] }, "name": { "type": "string" }, "size": { "type": "integer" } } }, "response.Assistant": { "type": "object", "required": [ "assistantId", "name" ], "properties": { "assistantId": { "type": "string" }, "avatar": { "description": "图标", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "category": { "description": "智能体分类 1.单智能体 2.多智能体", "type": "integer" }, "createdAt": { "description": "创建时间", "type": "string" }, "desc": { "description": "描述", "type": "string" }, "hideKnowledge": { "description": "是否隐藏知识库", "type": "integer" }, "instructions": { "description": "系统提示词", "type": "string" }, "knowledgeBaseConfig": { "description": "知识库", "allOf": [ { "$ref": "#/definitions/request.AppKnowledgebaseConfig" } ] }, "mcpInfos": { "description": "MCP信息", "type": "array", "items": { "$ref": "#/definitions/response.AssistantMCPInfo" } }, "memoryConfig": { "description": "记忆配置", "allOf": [ { "$ref": "#/definitions/request.MemoryConfig" } ] }, "modelConfig": { "description": "模型", "allOf": [ { "$ref": "#/definitions/request.AppModelConfig" } ] }, "multiAgentInfos": { "description": "多智能体配置", "type": "array", "items": { "$ref": "#/definitions/response.AssistantAgentInfo" } }, "name": { "description": "名称", "type": "string" }, "newAgent": { "description": "是否是新版本智能体", "type": "boolean" }, "ownerOrgId": { "description": "拥有者组织id", "type": "string" }, "ownerUserId": { "description": "拥有者用户id", "type": "string" }, "prologue": { "description": "开场白", "type": "string" }, "publishType": { "description": "发布类型", "type": "string" }, "recommendConfig": { "description": "追问配置", "allOf": [ { "$ref": "#/definitions/response.RecommendConfig" } ] }, "recommendQuestion": { "description": "推荐问题", "type": "array", "items": { "type": "string" } }, "rerankConfig": { "description": "Rerank模型", "allOf": [ { "$ref": "#/definitions/request.AppModelConfig" } ] }, "safetyConfig": { "description": "敏感词表配置", "allOf": [ { "$ref": "#/definitions/request.AppSafetyConfig" } ] }, "scope": { "description": "作用域", "type": "integer" }, "skillInfos": { "description": "技能配置", "type": "array", "items": { "$ref": "#/definitions/response.AssistantSkillInfo" } }, "toolInfos": { "description": "自定义工具、内置工具", "type": "array", "items": { "$ref": "#/definitions/response.AssistantToolInfo" } }, "updatedAt": { "description": "更新时间", "type": "string" }, "uuid": { "type": "string" }, "visionConfig": { "description": "视觉配置", "allOf": [ { "$ref": "#/definitions/response.VisionConfig" } ] }, "workFlowInfos": { "description": "工作流信息", "type": "array", "items": { "$ref": "#/definitions/response.AssistantWorkFlowInfo" } } } }, "response.AssistantAgentInfo": { "type": "object", "properties": { "agentId": { "type": "string" }, "avatar": { "$ref": "#/definitions/request.Avatar" }, "desc": { "type": "string" }, "enable": { "type": "boolean" }, "name": { "type": "string" } } }, "response.AssistantMCPInfo": { "type": "object", "required": [ "mcpType" ], "properties": { "actionName": { "type": "string" }, "avatar": { "$ref": "#/definitions/request.Avatar" }, "description": { "type": "string" }, "enable": { "type": "boolean" }, "mcpId": { "type": "string" }, "mcpName": { "type": "string" }, "mcpType": { "type": "string", "enum": [ "mcp", "mcpserver" ] }, "uniqueId": { "type": "string" }, "valid": { "type": "boolean" } } }, "response.AssistantRequestFile": { "type": "object", "properties": { "fileUrl": { "type": "string" }, "name": { "type": "string" }, "size": { "type": "integer" } } }, "response.AssistantSkillInfo": { "type": "object", "required": [ "skillType" ], "properties": { "author": { "type": "string" }, "avatar": { "$ref": "#/definitions/request.Avatar" }, "description": { "type": "string" }, "enable": { "type": "boolean" }, "skillId": { "type": "string" }, "skillName": { "type": "string" }, "skillType": { "type": "string", "enum": [ "builtin", "custom", "acquired" ] }, "valid": { "type": "boolean" } } }, "response.AssistantToolInfo": { "type": "object", "required": [ "toolType" ], "properties": { "actionName": { "type": "string" }, "avatar": { "$ref": "#/definitions/request.Avatar" }, "description": { "type": "string" }, "enable": { "type": "boolean" }, "toolConfig": { "$ref": "#/definitions/request.AssistantToolConfig" }, "toolId": { "type": "string" }, "toolName": { "type": "string" }, "toolType": { "type": "string", "enum": [ "builtin", "custom" ] }, "uniqueId": { "type": "string" }, "valid": { "type": "boolean" } } }, "response.AssistantWorkFlowInfo": { "type": "object", "properties": { "apiName": { "type": "string" }, "avatar": { "$ref": "#/definitions/request.Avatar" }, "enable": { "type": "boolean" }, "name": { "type": "string" }, "uniqueId": { "type": "string" }, "workFlowDesc": { "type": "string" }, "workFlowId": { "type": "string" } } }, "response.ChildContent": { "type": "object", "properties": { "childSnippet": { "type": "string" }, "score": { "type": "number" } } }, "response.ChildSegmentInfo": { "type": "object", "properties": { "childId": { "description": "子分段id", "type": "string" }, "childNum": { "description": "子分段序号", "type": "integer" }, "content": { "description": "内容", "type": "string" }, "parentId": { "description": "父分段id", "type": "string" } } }, "response.ChunkSearchList": { "type": "object", "properties": { "childContentList": { "type": "array", "items": { "$ref": "#/definitions/response.ChildContent" } }, "childScore": { "type": "array", "items": { "type": "number" } }, "contentType": { "description": "graph:知识图谱(文本), text:文档分段(文本), community_report:社区报告(markdown),qa:问答库(文本)", "type": "string" }, "knowledgeName": { "type": "string" }, "metaData": { "description": "MetaData 命中片段元信息,对象内容原样透传 rag 返回(rag 侧字段名为 meta_data),如 file_name/download_link/page_num/chunk_total_num 等" }, "rerankInfo": { "type": "array", "items": { "$ref": "#/definitions/response.RerankInfo" } }, "score": { "type": "number" }, "snippet": { "type": "string" }, "title": { "type": "string" } } }, "response.ConversationDetailInfo": { "type": "object", "properties": { "assistantId": { "type": "string" }, "conversationId": { "type": "string" }, "createdAt": { "type": "integer" }, "createdBy": { "type": "string" }, "feedback": { "description": "当前反馈状态: 0=无 1=点赞 2=点踩", "type": "integer" }, "feedbackContent": { "description": "反馈文本内容", "type": "string" }, "fileName": { "type": "string" }, "fileSize": { "type": "integer" }, "id": { "type": "string" }, "prompt": { "type": "string" }, "qa_type": { "type": "integer" }, "requestFiles": { "type": "array", "items": { "$ref": "#/definitions/response.AssistantRequestFile" } }, "response": { "type": "string" }, "responseFiles": { "type": "array", "items": { "$ref": "#/definitions/response.AgentResponseFile" } }, "responseList": { "type": "array", "items": { "$ref": "#/definitions/response.ConversationResponse" } }, "searchList": {}, "subConversationList": { "type": "array", "items": { "$ref": "#/definitions/response.SubConversation" } }, "sysPrompt": { "type": "string" }, "updatedAt": { "type": "integer" } } }, "response.ConversationInfo": { "type": "object", "properties": { "assistantId": { "type": "string" }, "conversationId": { "type": "string" }, "createdAt": { "type": "string" }, "title": { "type": "string" }, "updatedAt": { "type": "string" } } }, "response.ConversationResponse": { "type": "object", "properties": { "errMessage": { "type": "string" }, "errResponse": { "type": "string" }, "order": { "type": "integer" }, "response": { "type": "string" } } }, "response.CreateGeneralAgentConversationResp": { "type": "object", "properties": { "threadId": { "description": "对话ID", "type": "string" } } }, "response.CreateKnowledgeResp": { "type": "object", "properties": { "knowledgeId": { "type": "string" } } }, "response.DocAnalyzerTextInfo": { "type": "object", "properties": { "displayName": { "type": "string" }, "tags": { "type": "array", "items": { "$ref": "#/definitions/mp_common.Tag" } }, "text": { "type": "string" } } }, "response.DocChildSegmentResp": { "type": "object", "properties": { "contentList": { "description": "内容", "type": "array", "items": { "$ref": "#/definitions/response.ChildSegmentInfo" } } } }, "response.DocConfigResult": { "type": "object", "properties": { "asrModelId": { "description": "asr模型id", "type": "string" }, "docAnalyzer": { "description": "文档解析类型", "type": "array", "items": { "type": "string" } }, "docImportType": { "description": "文档导入类型,0:文件上传,1:url上传,2.批量url上传", "type": "integer" }, "docPreprocess": { "description": "文本预处理规则", "type": "array", "items": { "type": "string" } }, "docSegment": { "description": "分段信息配置", "allOf": [ { "$ref": "#/definitions/response.DocSegment" } ] }, "multimodalModelId": { "description": "多模态模型id", "type": "string" }, "parserModelId": { "description": "ocr模型id", "type": "string" } } }, "response.DocMetaData": { "type": "object", "properties": { "metaId": { "description": "元数据id", "type": "string" }, "metaKey": { "description": "key", "type": "string" }, "metaRule": { "description": "正则表达式", "type": "string" }, "metaValue": { "description": "确定值", "type": "string" }, "metaValueType": { "description": "number,time, string", "type": "string" } } }, "response.DocSegment": { "type": "object", "required": [ "segmentMethod" ], "properties": { "maxSplitter": { "description": "可分隔最大值(只有自定义分段必填)", "type": "integer" }, "overlap": { "description": "可重叠值(只有自定义分段必填)", "type": "number" }, "segmentMethod": { "description": "分段方法 0:通用分段;1:父子分段", "type": "string" }, "segmentType": { "description": "分段方式,只有通用分段必填 0:自动分段;1:自定义分段", "type": "string" }, "splitter": { "description": "分隔符(只有自定义分段必填)", "type": "array", "items": { "type": "string" } }, "subMaxSplitter": { "description": "可分隔最大值(只有父子分段必填)", "type": "integer" }, "subSplitter": { "description": "分隔符(只有父子分段必填)", "type": "array", "items": { "type": "string" } } } }, "response.DocSegmentParam": { "type": "object", "properties": { "maxSplitter": { "description": "可分隔最大值(只有自定义分段必填)", "type": "integer" }, "overlap": { "description": "可重叠值(只有自定义分段必填)", "type": "number" }, "segmentMethod": { "description": "分段方法 0:通用分段;1:父子分段", "type": "string" }, "segmentType": { "description": "分段方式 0:自动分段;1:自定义分段", "type": "string" }, "splitter": { "description": "分隔符(只有自定义分段必填)", "type": "array", "items": { "type": "string" } }, "subMaxSplitter": { "description": "可分隔最大值(只有父子分段必填)", "type": "integer" }, "subSplitter": { "description": "分隔符(只有父子分段必填)", "type": "array", "items": { "type": "string" } } } }, "response.DocSegmentResp": { "type": "object", "properties": { "canPreview": { "description": "是否可预览", "type": "boolean" }, "contentList": { "description": "内容", "type": "array", "items": { "$ref": "#/definitions/response.SegmentContent" } }, "docAnalyzerText": { "description": "文档解析类型 文字提取 / OCR解析 / 模型解析", "type": "array", "items": { "$ref": "#/definitions/response.DocAnalyzerTextInfo" } }, "downloadUrl": { "description": "文档对外下载地址", "type": "string" }, "fileName": { "description": "名称", "type": "string" }, "fileSize": { "description": "文件大小,单位字节(Byte)", "type": "integer" }, "fileSizeStr": { "description": "文件大小的人眼友好展示", "type": "string" }, "maxSegmentSize": { "description": "设置最大长度", "type": "integer" }, "metaDataList": { "description": "文档元数据", "type": "array", "items": { "$ref": "#/definitions/response.DocMetaData" } }, "pageTotal": { "description": "总页数", "type": "integer" }, "previewFailReason": { "description": "不可预览原因", "type": "string" }, "segmentImportStatus": { "description": "分段导入状态描述", "type": "string" }, "segmentMethod": { "description": "分段方式 父子分段/通用分段", "type": "string" }, "segmentTotalNum": { "description": "分段数量", "type": "integer" }, "segmentType": { "description": "分段方式 0自动分段 1自定义分段", "type": "string" }, "splitter": { "description": "分隔符(只有自定义分段必填)", "type": "string" }, "uploadTime": { "description": "上传时间", "type": "string" } } }, "response.EmbeddingModelInfo": { "type": "object", "properties": { "modelId": { "type": "string" } } }, "response.GeneralAgentConversationDetailInfo": { "type": "object", "properties": { "createdAt": { "type": "integer" }, "events": { "type": "array", "items": {} }, "runId": { "type": "string" }, "threadId": { "type": "string" } } }, "response.GeneralAgentConversationInfo": { "type": "object", "properties": { "createdAt": { "description": "创建时间", "type": "string" }, "isSkillConversation": { "description": "是否为skill对话", "type": "boolean" }, "previewId": { "description": "skill preview conversation ID", "type": "string" }, "skillId": { "description": "custom skill ID", "type": "string" }, "threadId": { "description": "对话ID", "type": "string" }, "title": { "description": "对话标题", "type": "string" }, "updatedAt": { "description": "更新时间", "type": "string" } } }, "response.GeneralAgentFileNode": { "type": "object", "properties": { "children": { "type": "array", "items": { "$ref": "#/definitions/response.GeneralAgentFileNode" } }, "mimeType": { "type": "string" }, "name": { "type": "string" }, "size": { "type": "integer" }, "type": { "description": "\"file\" or \"directory\"", "type": "string" } } }, "response.GeneralAgentWorkspaceResp": { "type": "object", "properties": { "fileCount": { "type": "integer" }, "files": { "type": "array", "items": { "$ref": "#/definitions/response.GeneralAgentFileNode" } }, "isDisplay": { "type": "boolean" }, "path": { "type": "string" }, "runId": { "type": "string" }, "threadId": { "type": "string" }, "totalSize": { "type": "integer" } } }, "response.GetKnowledgeMetaSelectResp": { "type": "object", "properties": { "knowledgeMetaList": { "type": "array", "items": { "$ref": "#/definitions/response.KnowledgeMetaItem" } } } }, "response.KnowledgeExportRecordPageResult": { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.ListKnowledgeExportRecordResp" } }, "pageNo": { "type": "integer" }, "pageSize": { "type": "integer" }, "total": { "type": "integer" } } }, "response.KnowledgeExternalInfo": { "type": "object", "properties": { "externalApiId": { "description": "外部知识库API id", "type": "string" }, "externalApiName": { "description": "外部知识库API名称", "type": "string" }, "externalKnowledgeId": { "description": "外部知识库id", "type": "string" }, "externalKnowledgeName": { "description": "外部知识库名称", "type": "string" }, "externalSource": { "description": "外部知识库来源", "type": "string" } } }, "response.KnowledgeHitResp": { "type": "object", "properties": { "prompt": { "description": "提示词列表", "type": "string" }, "score": { "description": "打分信息", "type": "array", "items": { "type": "number" } }, "searchList": { "description": "种种结果", "type": "array", "items": { "$ref": "#/definitions/response.ChunkSearchList" } }, "useGraph": { "description": "是否使用知识图谱", "type": "boolean" } } }, "response.KnowledgeInfo": { "type": "object", "properties": { "avatar": { "description": "头像", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "category": { "description": "0: 知识库; 1: 问答库", "type": "integer" }, "createAt": { "description": "创建时间", "type": "string" }, "createUserId": { "type": "string" }, "description": { "description": "知识库描述", "type": "string" }, "docCount": { "description": "文档数量", "type": "integer" }, "embeddingModelInfo": { "description": "embedding模型信息", "allOf": [ { "$ref": "#/definitions/response.EmbeddingModelInfo" } ] }, "external": { "description": "0: 内部知识库 1:外部知识库", "type": "integer" }, "externalKnowledgeInfo": { "description": "外部知识库信息", "allOf": [ { "$ref": "#/definitions/response.KnowledgeExternalInfo" } ] }, "graphSwitch": { "description": "图谱开关", "type": "integer" }, "knowledgeId": { "description": "知识库id", "type": "string" }, "knowledgeTagList": { "description": "知识库标签列表", "type": "array", "items": { "$ref": "#/definitions/response.KnowledgeTag" } }, "llmModelId": { "description": "知识图谱模型id", "type": "string" }, "name": { "description": "知识库名称", "type": "string" }, "orgName": { "description": "知识库所属名称", "type": "string" }, "parseTemplate": { "description": "各文档类型选定的解析模板", "type": "array", "items": { "$ref": "#/definitions/response.ParseTemplateBind" } }, "permissionType": { "description": "权限类型:0: 查看权限; 10: 编辑权限; 20: 授权权限,数值不连续的原因防止后续有中间权限,目前逻辑 授权权限\u003e编辑权限\u003e查看权限", "type": "integer" }, "ragName": { "description": "rag名称", "type": "string" }, "share": { "description": "是分享,还是私有", "type": "boolean" }, "updatedAt": { "description": "更新时间", "type": "string" } } }, "response.KnowledgeListResp": { "type": "object", "properties": { "knowledgeList": { "type": "array", "items": { "$ref": "#/definitions/response.KnowledgeInfo" } } } }, "response.KnowledgeMetaItem": { "type": "object", "properties": { "metaId": { "type": "string" }, "metaKey": { "type": "string" }, "metaValue": { "description": "确定值", "type": "string" }, "metaValueType": { "type": "string" } } }, "response.KnowledgeMetaValueListResp": { "type": "object", "properties": { "knowledgeMetaValues": { "type": "array", "items": { "$ref": "#/definitions/response.KnowledgeMetaValues" } } } }, "response.KnowledgeMetaValues": { "type": "object", "properties": { "metaId": { "type": "string" }, "metaKey": { "type": "string" }, "metaValue": { "description": "确定值", "type": "array", "items": { "type": "string" } }, "metaValueType": { "type": "string" } } }, "response.KnowledgeTag": { "type": "object", "properties": { "selected": { "description": "此表标签是否选中", "type": "boolean" }, "tagId": { "description": "知识库标签id", "type": "string" }, "tagName": { "description": "知识库标签名称", "type": "string" } } }, "response.ListDocResp": { "type": "object", "properties": { "author": { "description": "上传文档 作者", "type": "string" }, "docId": { "type": "string" }, "docName": { "description": "文档名称", "type": "string" }, "docProgress": { "description": "文档解析进度百分比 (0-100)", "type": "integer" }, "docType": { "description": "文档类型", "type": "string" }, "errorMsg": { "description": "解析错误信息,预留", "type": "string" }, "fileSize": { "description": "文件大小,单位字节(Byte)", "type": "integer" }, "fileSizeStr": { "description": "文件大小的人眼友好展示", "type": "string" }, "graphErrMsg": { "description": "图谱错误信息", "type": "string" }, "graphProgress": { "description": "图谱解析进度百分比 (0-100)", "type": "integer" }, "graphStatus": { "description": "图谱状态 0:待处理,1.解析中,2.解析成功,3.解析失败 -1. 当文档状态为解析失败时,显示 -", "type": "integer" }, "isMultimodal": { "description": "是否为多模态文件", "type": "boolean" }, "knowledgeId": { "description": "知识库id", "type": "string" }, "segmentMethod": { "description": "分段模式 0:通用分段,1:父子分段", "type": "string" }, "status": { "description": "处理状态", "type": "integer" }, "uploadTime": { "description": "上传时间", "type": "string" } } }, "response.ListKnowledgeExportRecordResp": { "type": "object", "properties": { "author": { "description": "导出人", "type": "string" }, "errorMsg": { "description": "导出状态错误信息", "type": "string" }, "exportRecordId": { "description": "知识库导出记录id", "type": "string" }, "exportTime": { "description": "导出时间", "type": "string" }, "filePath": { "description": "导出文件路径", "type": "string" }, "knowledgeName": { "type": "string" }, "status": { "description": "状态", "type": "integer" } } }, "response.ListResult": { "type": "object", "properties": { "list": {}, "total": { "type": "integer" } } }, "response.OAuthConfig": { "type": "object", "properties": { "authorization_endpoint": { "description": "获取授权码接口", "type": "string" }, "id_token_signing_alg_values_supported": { "description": "jwt签名算法", "type": "array", "items": { "type": "string" } }, "issuer": { "description": "auth的base url", "type": "string" }, "jwks_uri": { "description": "获取jwt公钥", "type": "string" }, "response_types_supported": { "description": "授权模式,默认code", "type": "array", "items": { "type": "string" } }, "subject_types_supported": { "description": "用户标识类型,即 ID Token中的sub是如何生成的。", "type": "array", "items": { "type": "string" } }, "token_endpoint": { "description": "获取token接口", "type": "string" }, "userinfo_endpoint": { "description": "获取用户信息接口", "type": "string" } } }, "response.OAuthGetUserInfo": { "type": "object", "properties": { "avatar": { "type": "string" }, "company": { "type": "string" }, "email": { "type": "string" }, "gender": { "type": "string" }, "nickname": { "type": "string" }, "phone": { "type": "string" }, "remark": { "type": "string" }, "userId": { "type": "string" }, "username": { "type": "string" } } }, "response.OAuthJWKS": { "type": "object", "properties": { "keys": { "type": "array", "items": { "$ref": "#/definitions/oauth2_util.JWK" } } } }, "response.OAuthRefreshTokenResponse": { "type": "object", "properties": { "access_token": { "description": "访问令牌", "type": "string" }, "expires_at": { "description": "token过期时间(毫秒时间戳)", "type": "string" }, "refresh_token": { "description": "刷新令牌(可选)", "type": "string" } } }, "response.OAuthTokenResponse": { "type": "object", "properties": { "access_token": { "description": "访问令牌", "type": "string" }, "expires_in": { "description": "token过期时间(毫秒时间戳)", "type": "integer" }, "id_token": { "description": "ID令牌", "type": "string" }, "refresh_token": { "description": "刷新令牌", "type": "string" }, "scope": { "description": "权限范围", "type": "array", "items": { "type": "string" } }, "token_type": { "description": "令牌类型(bearer)", "type": "string" } } }, "response.OpenAIChatHistory": { "type": "object", "properties": { "query": { "type": "string" }, "response": { "type": "string" } } }, "response.OpenAIChatSearch": { "type": "object", "properties": { "kb_name": { "type": "string" }, "meta_data": { "description": "MetaData 知识库命中片段的元信息,原样透传 rag 返回(与流式一致),如 file_name/download_link/page_num/chunk_total_num 等" }, "snippet": { "type": "string" }, "title": { "type": "string" } } }, "response.OpenAPIAgentBriefInfo": { "type": "object", "properties": { "avatar": { "description": "头像信息", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "category": { "description": "1:单智能体 2:多智能体", "type": "integer" }, "createdAt": { "description": "创建时间", "type": "string" }, "desc": { "description": "描述", "type": "string" }, "name": { "description": "名称", "type": "string" }, "publishType": { "description": "public/organization/private,空字符串表示未发布(草稿)", "type": "string" }, "updatedAt": { "description": "最后更新时间", "type": "string" }, "uuid": { "description": "智能体唯一标识,供后续接口使用", "type": "string" }, "version": { "description": "已发布版本号,未发布时为空", "type": "string" } } }, "response.OpenAPIAgentChatFile": { "type": "object", "properties": { "output_file_url": { "type": "string" } } }, "response.OpenAPIAgentChatResponse": { "type": "object", "properties": { "code": { "type": "integer" }, "finish": { "type": "integer" }, "gen_file_url_list": { "type": "array", "items": { "$ref": "#/definitions/response.OpenAPIAgentChatFile" } }, "history": { "type": "array", "items": { "$ref": "#/definitions/response.OpenAIChatHistory" } }, "message": { "type": "string" }, "recommend_questions": { "type": "array", "items": { "type": "string" } }, "response": { "type": "string" }, "search_list": { "type": "array", "items": { "$ref": "#/definitions/response.OpenAIChatSearch" } }, "usage": { "$ref": "#/definitions/response.OpenAPIAgentChatUsage" } } }, "response.OpenAPIAgentChatUsage": { "type": "object", "properties": { "completion_tokens": { "type": "integer" }, "prompt_tokens": { "type": "integer" }, "total_tokens": { "type": "integer" } } }, "response.OpenAPIAgentCreateConversationResponse": { "type": "object", "properties": { "conversation_id": { "type": "string" } } }, "response.OpenAPIAgentListResponse": { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.OpenAPIAgentBriefInfo" } } } }, "response.OpenAPIChatflowConversationItem": { "type": "object", "properties": { "conversation_id": { "type": "string" }, "conversation_name": { "type": "string" } } }, "response.OpenAPIChatflowConversationListResponse": { "type": "object", "properties": { "conversations": { "type": "array", "items": { "$ref": "#/definitions/response.OpenAPIChatflowConversationItem" } } } }, "response.OpenAPIChatflowCreateConversationResponse": { "type": "object", "properties": { "conversation_id": { "type": "string" } } }, "response.OpenAPIChatflowGetConversationMessageListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.OpenMessageApi" } }, "first_id": { "type": "integer" }, "has_more": { "type": "boolean" }, "last_id": { "type": "integer" } } }, "response.OpenAPICreateAgentResponse": { "type": "object", "properties": { "uuid": { "type": "string" } } }, "response.OpenAPICreateRagResponse": { "type": "object", "properties": { "uuid": { "type": "string" } } }, "response.OpenAPIModelListItem": { "type": "object", "properties": { "displayName": { "type": "string" }, "model": { "type": "string" }, "modelType": { "type": "string" }, "provider": { "type": "string" }, "scopeType": { "type": "string" }, "uuid": { "type": "string" } } }, "response.OpenAPIRagBriefInfo": { "type": "object", "properties": { "avatar": { "description": "头像信息", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "createdAt": { "description": "创建时间", "type": "string" }, "desc": { "description": "描述", "type": "string" }, "name": { "description": "名称", "type": "string" }, "publishType": { "description": "public/organization/private,空字符串表示未发布(草稿)", "type": "string" }, "updatedAt": { "description": "最后更新时间", "type": "string" }, "uuid": { "description": "知识问答唯一标识,供后续接口使用", "type": "string" }, "version": { "description": "已发布版本号,未发布时为空", "type": "string" } } }, "response.OpenAPIRagChatData": { "type": "object", "properties": { "output": { "type": "string" }, "searchList": { "type": "array", "items": { "$ref": "#/definitions/response.OpenAIChatSearch" } } } }, "response.OpenAPIRagChatResponse": { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "$ref": "#/definitions/response.OpenAPIRagChatData" }, "finish": { "type": "integer" }, "history": { "type": "array", "items": { "$ref": "#/definitions/response.OpenAIChatHistory" } }, "message": { "type": "string" }, "msg_id": { "type": "string" } } }, "response.OpenAPIRagCreateConversationResponse": { "type": "object", "properties": { "conversation_id": { "type": "string" } } }, "response.OpenAPIRagListResponse": { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.OpenAPIRagBriefInfo" } } } }, "response.OpenMessageApi": { "type": "object", "properties": { "bot_id": { "type": "string", "example": "0" }, "chat_id": { "type": "string", "example": "0" }, "content": { "type": "string" }, "content_type": { "type": "string" }, "conversation_id": { "type": "string", "example": "0" }, "created_at": { "type": "integer" }, "id": { "type": "string", "example": "0" }, "meta_data": { "type": "object", "additionalProperties": { "type": "string" } }, "reasoning_content": { "type": "string" }, "role": { "type": "string" }, "section_id": { "type": "string" }, "type": { "type": "string" }, "updated_at": { "type": "integer" } } }, "response.PageResult": { "type": "object", "properties": { "list": {}, "pageNo": { "type": "integer" }, "pageSize": { "type": "integer" }, "total": { "type": "integer" } } }, "response.ParseTemplateBind": { "type": "object", "properties": { "docType": { "type": "string" }, "templateId": { "type": "string" } } }, "response.ParseTemplateInfo": { "type": "object", "properties": { "asrModelId": { "type": "string" }, "builtIn": { "type": "boolean" }, "createdAt": { "type": "string" }, "docAnalyzer": { "type": "array", "items": { "type": "string" } }, "docPreprocess": { "type": "array", "items": { "type": "string" } }, "docSegment": { "$ref": "#/definitions/response.DocSegmentParam" }, "docType": { "type": "string" }, "multimodalModelId": { "type": "string" }, "name": { "type": "string" }, "parserModelId": { "type": "string" }, "templateId": { "type": "string" }, "updatedAt": { "type": "string" } } }, "response.ParseTemplateListResp": { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/response.ParseTemplateInfo" } } } }, "response.RagConversationDetailInfo": { "type": "object", "properties": { "conversationId": { "type": "string" }, "createdAt": { "type": "integer" }, "detailId": { "type": "string" }, "errMessage": { "type": "string" }, "feedback": { "description": "当前反馈状态: 0=无 1=点赞 2=点踩", "type": "integer" }, "feedbackContent": { "description": "反馈文本内容", "type": "string" }, "prompt": { "type": "string" }, "qaErrMessage": { "description": "问答库检索失败原因,非空表示这轮是问答库报错后转的知识库", "type": "string" }, "qaSearchList": { "description": "问答库命中结果,与 searchList 互斥;null=没走问答库检索,\"\"=检索未命中", "type": "string" }, "qaSearchListTimeCost": { "description": "问答库检索起止", "allOf": [ { "$ref": "#/definitions/response.RagTimeCost" } ] }, "ragId": { "type": "string" }, "reasoningContent": { "description": "深度思考过程;null=整轮没思考,\"\"=思考过但无内容", "type": "string" }, "reasoningTimeCost": { "description": "深度思考起止", "allOf": [ { "$ref": "#/definitions/response.RagTimeCost" } ] }, "requestFiles": { "type": "array", "items": { "$ref": "#/definitions/response.RagRequestFile" } }, "response": { "type": "string" }, "searchList": { "description": "知识库引用段落;null=没走知识库检索,\"\"=检索无召回", "type": "string" }, "searchListTimeCost": { "description": "知识库检索起止", "allOf": [ { "$ref": "#/definitions/response.RagTimeCost" } ] }, "traceId": { "description": "本轮问答的链路id,可据此关联应用/模型统计明细", "type": "string" } } }, "response.RagConversationInfo": { "type": "object", "properties": { "conversationId": { "type": "string" }, "createdAt": { "type": "string" }, "ragId": { "type": "string" }, "title": { "type": "string" }, "updatedAt": { "type": "string" } } }, "response.RagInfo": { "type": "object", "required": [ "knowledgeBaseConfig", "modelConfig", "name", "qaKnowledgeBaseConfig", "qaRerankConfig", "ragId", "rerankConfig" ], "properties": { "appPublishConfig": { "description": "发布配置", "allOf": [ { "$ref": "#/definitions/request.AppPublishConfig" } ] }, "avatar": { "description": "图标", "allOf": [ { "$ref": "#/definitions/request.Avatar" } ] }, "createdAt": { "description": "创建时间", "type": "string" }, "desc": { "description": "描述", "type": "string" }, "knowledgeBaseConfig": { "description": "知识库", "allOf": [ { "$ref": "#/definitions/request.AppKnowledgebaseConfig" } ] }, "modelConfig": { "description": "模型", "allOf": [ { "$ref": "#/definitions/request.AppModelConfig" } ] }, "name": { "description": "名称", "type": "string" }, "qaKnowledgeBaseConfig": { "description": "问答库", "allOf": [ { "$ref": "#/definitions/request.AppQAKnowledgebaseConfig" } ] }, "qaRerankConfig": { "description": "问答库Rerank模型", "allOf": [ { "$ref": "#/definitions/request.AppModelConfig" } ] }, "ragId": { "type": "string" }, "recommendQuestion": { "description": "推荐问题", "type": "array", "items": { "type": "string" } }, "rerankConfig": { "description": "Rerank模型", "allOf": [ { "$ref": "#/definitions/request.AppModelConfig" } ] }, "safetyConfig": { "description": "敏感词表配置", "allOf": [ { "$ref": "#/definitions/request.AppSafetyConfig" } ] }, "updatedAt": { "description": "更新时间", "type": "string" }, "visionConfig": { "description": "视觉开关", "allOf": [ { "$ref": "#/definitions/request.VisionConfig" } ] } } }, "response.RagRequestFile": { "type": "object", "properties": { "fileName": { "type": "string" }, "fileSize": { "type": "integer" }, "fileUrl": { "type": "string" } } }, "response.RagTimeCost": { "type": "object", "properties": { "end": { "type": "integer" }, "start": { "type": "integer" } } }, "response.RagUploadFile": { "type": "object", "properties": { "fileIndex": { "type": "integer" }, "fileUrl": { "type": "string" } } }, "response.RagUploadResponse": { "type": "object", "properties": { "fileList": { "type": "array", "items": { "$ref": "#/definitions/response.RagUploadFile" } } } }, "response.RecommendConfig": { "type": "object", "properties": { "maxHistory": { "description": "最大历史会话轮次", "type": "integer" }, "modelConfig": { "description": "模型信息", "allOf": [ { "$ref": "#/definitions/request.AppModelConfig" } ] }, "prompt": { "description": "提示词", "type": "string" }, "promptEnable": { "description": "提示词开关", "type": "boolean" }, "recommendEnable": { "description": "追问配置开关", "type": "boolean" } } }, "response.RerankInfo": { "type": "object", "properties": { "fileUrl": { "type": "string" }, "score": { "type": "number" }, "type": { "type": "string" } } }, "response.Response": { "type": "object", "properties": { "code": { "type": "integer" }, "data": {}, "msg": { "type": "string" } } }, "response.SegmentContent": { "type": "object", "properties": { "available": { "type": "boolean" }, "childNum": { "description": "子分段数量", "type": "integer" }, "content": { "type": "string" }, "contentId": { "type": "string" }, "contentNum": { "type": "integer" }, "isParent": { "description": "父子分段/通用分段 true是父分段,false是通用分段", "type": "boolean" }, "labels": { "type": "array", "items": { "type": "string" } } } }, "response.SubConversation": { "type": "object", "properties": { "conversationType": { "description": "subAgent:子智能体;agentTool:主智能体工具;subAgentTool:子智能体工具", "type": "string" }, "errMessage": { "description": "错误信息", "type": "string" }, "id": { "description": "事件id", "type": "string" }, "name": { "description": "事件名称", "type": "string" }, "order": { "type": "integer" }, "parentId": { "description": "事件挂载id", "type": "string" }, "profile": { "description": "事件头像", "type": "string" }, "response": { "type": "string" }, "searchList": {}, "status": { "description": "1:成功,2:失败", "type": "integer" }, "timeCost": { "description": "耗时", "type": "string" } } }, "response.UpdateDocSegmentResp": { "type": "object", "properties": { "contentId": { "description": "更新后的分段id,内容变化时与请求传入的contentId不同", "type": "string" } } }, "response.UploadFileResp": { "type": "object", "properties": { "status": { "description": "0:上传失败,1:上传成功", "type": "integer" } } }, "response.VisionConfig": { "type": "object", "properties": { "maxPicNum": { "description": "最大图片数量", "type": "integer" }, "picNum": { "description": "视觉配置图片数量", "type": "integer" } } } } }