diff --git a/CHANGELOG.md b/CHANGELOG.md
index 281aaced..65a6b967 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,31 @@
All notable changes to this project will be documented in this file.
+## [0.5.0] - 2026-04-27
+
+### 🚀 New Features
+- **NEW**: Wiki Mode — a brand-new agent-driven Wiki knowledge system that automatically distills raw documents into interlinked markdown pages. It ships with a dedicated WikiBrowser, an interactive knowledge graph visualizing references and relationships between pages, and specialized agent tools, empowering teams to grow a structured, continuously evolving knowledge base from their own materials.
+- **NEW**: Observability — integrated Langfuse for agent ReAct loop, LLM token tracking, tool calls, and asynq pipeline tracing, providing deep visibility into agent reasoning, tool execution, and system performance.
+- **NEW**: Customizable Indexing Strategy — users can now independently toggle Vector Search, Keyword Search, Wiki, and Knowledge Graph indexing on a per-knowledge-base level.
+- **NEW**: Vector Store UI & Per-KB Binding — full frontend management interface for Vector Stores, allowing users to configure connections, test connectivity, and assign specific vector stores to different knowledge bases.
+- **NEW**: Yuque Connector — Yuque data source integration with API client, full and incremental fetch, and resource mapping, enabling seamless synchronization of Yuque documents into the knowledge base.
+- **NEW**: Built-in Agent Skills — added a preloaded `OpenMAIC Classroom` agent skill.
+- **NEW**: Agent Tools — added `json_repair` tool for agents to automatically fix and parse malformed JSON outputs.
+- **NEW**: Frontend — added copy action for model cards in settings.
+- **NEW**: Agent — added support to load all sheets from Excel files for DuckDB data analysis.
+
+### ⚡ Improvements
+- **IMPROVED**: Agent — improved tenant context handling and error reporting.
+- **IMPROVED**: Agent — updated synthesis and issue flagging instructions in system prompt.
+- **IMPROVED**: Debugging — enhanced LLM request logging and debug output (`llm_debug`) across all model providers.
+
+### 🐛 Bug Fixes
+- **FIXED**: Agent — materialized knowledge files to temp path for DuckDB to fix access issues
+- **FIXED**: Agent — removed rerank model requirement for wiki-only agents
+- **FIXED**: Docreader — whitelisted offline protoc zip packages in dockerignore
+- **FIXED**: System — changed hardcoded version to `*` comparison for new Linux version compatibility
+- **FIXED**: Setup — added output if offline protoc install package already exists
+
## [0.4.0] - 2026-04-14
### 🚀 New Features
@@ -897,6 +922,8 @@ All notable changes to this project will be documented in this file.
- Docker Compose for quick startup and service orchestration.
- MCP server support for integrating with MCP-compatible clients.
+[0.5.0]: https://github.com/Tencent/WeKnora/tree/v0.5.0
+[0.4.0]: https://github.com/Tencent/WeKnora/tree/v0.4.0
[0.3.6]: https://github.com/Tencent/WeKnora/tree/v0.3.6
[0.3.5]: https://github.com/Tencent/WeKnora/tree/v0.3.5
[0.3.4]: https://github.com/Tencent/WeKnora/tree/v0.3.4
diff --git a/README.md b/README.md
index 134cc424..4024dc8b 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@
-
+















Agent 모드 도구 호출 과정![]() |
|
Wiki 브라우저![]() |
+ Wiki 지식 그래프![]() |
+
지식베이스 관리![]() |
대화 설정![]() |
diff --git a/VERSION b/VERSION
index 1d0ba9ea..8f0916f7 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.4.0
+0.5.0
diff --git a/docs/QA.md b/docs/QA.md
index 96279f93..7fb417aa 100644
--- a/docs/QA.md
+++ b/docs/QA.md
@@ -179,5 +179,29 @@ docker compose restart app
```
+## 9. 如何开启和查看 Langfuse 可观测性追踪?
+
+WeKnora 支持通过 Langfuse 对 Agent 的 ReAct 循环、大模型 Token 消耗、工具调用以及异步任务流水线进行全链路追踪。
+
+**开启步骤**:
+1. 准备一个可用的 Langfuse 实例(支持云端版或私有部署版)。
+2. 在 `.env` 文件中配置以下环境变量:
+```bash
+LANGFUSE_PUBLIC_KEY=pk-lf-...
+LANGFUSE_SECRET_KEY=sk-lf-...
+LANGFUSE_HOST=https://cloud.langfuse.com # 或你的私有部署地址
+```
+3. 重启服务后,系统会自动对所有支持的模型调用和 Agent 运行轨迹进行追踪,你可以在 Langfuse 的 Traces 面板中直观地看到每次对话和后台任务的详细执行瀑布图与 Token 统计。
+
+## 10. 什么是 Wiki 模式?如何使用?
+
+Wiki 模式允许 Agent 根据原始文档自动生成并维护一套结构化、相互链接的 Markdown Wiki 知识库,从而实现复杂知识的体系化沉淀和图谱化。
+
+**使用方法**:
+1. 进入指定**知识库的设置** -> **索引策略 (Indexing Strategy)**。
+2. 开启 **Wiki** 索引功能(可同时结合开启**知识图谱**)。
+3. 当你向该知识库上传文档时,系统会自动触发异步任务,通过大模型提取文档中的实体与核心概念,并自动生成结构化的 Wiki 页面及页面间的知识图谱链接。
+4. 你可以在该知识库的“Wiki”标签页中,使用专用的 Wiki 浏览器查阅、管理页面,并通过可视化的知识图谱查看不同内容之间的关联关系。
+
## P.S.
如果以上方式未解决问题,请在issue中描述您的问题,并提供必要的日志信息辅助我们进行问题排查
diff --git a/docs/docs.go b/docs/docs.go
index 8e7bae98..a050168f 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -51,7 +51,7 @@ const docTemplate = `{
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -83,7 +83,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.CreateAgentRequest"
+ "$ref": "#/definitions/internal_handler.CreateAgentRequest"
}
}
],
@@ -98,7 +98,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -136,6 +136,38 @@ const docTemplate = `{
}
}
},
+ "/agents/type-presets": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ },
+ {
+ "ApiKeyAuth": []
+ }
+ ],
+ "description": "返回所有 smart-reasoning 下可用的智能体类型预设(RAG/Wiki/Hybrid/Custom),用于编辑器自动填充系统提示词、工具和 KB 兼容性",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "智能体"
+ ],
+ "summary": "获取智能体类型预设列表",
+ "responses": {
+ "200": {
+ "description": "预设列表",
+ "schema": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ }
+ }
+ }
+ },
"/agents/{id}": {
"get": {
"security": [
@@ -177,13 +209,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "智能体不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -222,7 +254,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.UpdateAgentRequest"
+ "$ref": "#/definitions/internal_handler.UpdateAgentRequest"
}
}
],
@@ -237,13 +269,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "无法修改内置智能体",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -288,19 +320,19 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "无法删除内置智能体",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "智能体不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -347,13 +379,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "智能体不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -418,13 +450,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "智能体不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -455,7 +487,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
}
},
@@ -489,7 +521,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
}
],
@@ -497,7 +529,7 @@ const docTemplate = `{
"201": {
"description": "Created",
"schema": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
},
"400": {
@@ -535,7 +567,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.SyncLog"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog"
}
},
"404": {
@@ -566,7 +598,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/datasource.ConnectorMetadata"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_datasource.ConnectorMetadata"
}
}
}
@@ -642,7 +674,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
},
"404": {
@@ -682,7 +714,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
}
],
@@ -690,7 +722,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
},
"400": {
@@ -772,7 +804,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.SyncLog"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog"
}
}
},
@@ -851,7 +883,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.Resource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Resource"
}
}
},
@@ -925,7 +957,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.SyncLog"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog"
}
},
"400": {
@@ -978,6 +1010,681 @@ const docTemplate = `{
}
}
},
+ "/api/v1/knowledgebase/{kb_id}/wiki/auto-fix": {
+ "post": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Automatically fix fixable wiki issues (broken links, etc.)",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Auto-fix wiki issues",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/graph": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Returns the wiki link graph data for visualization",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Get wiki link graph",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiGraphData"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/index": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Returns the wiki index page (creates default if not exists)",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Get wiki index page",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/issues": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "List issues flagged on wiki pages with optional filtering",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "List wiki page issues",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Filter by page slug",
+ "name": "slug",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Filter by status (pending, ignored, resolved)",
+ "name": "status",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPageIssue"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/issues/{issue_id}/status": {
+ "put": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Update the status of a flagged wiki page issue",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Update wiki page issue status",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Issue ID",
+ "name": "issue_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "New status {'status': 'ignored'}",
+ "name": "status",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "object"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/lint": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Perform a comprehensive health check on the wiki",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Run wiki lint",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintReport"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/log": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Returns the wiki operation log page (creates default if not exists)",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Get wiki operation log",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/pages": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "List wiki pages with optional filtering and pagination",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "List wiki pages",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Filter by page type",
+ "name": "page_type",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Filter by status",
+ "name": "status",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Full-text search",
+ "name": "query",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "Page number",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "Page size",
+ "name": "page_size",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Sort field",
+ "name": "sort_by",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Sort order (asc/desc)",
+ "name": "sort_order",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPageListResponse"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ },
+ "post": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Create a new wiki page in the knowledge base",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Create a wiki page",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "Wiki page data",
+ "name": "page",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "Created",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/pages/{slug}": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Retrieve a wiki page by its slug",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Get a wiki page by slug",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Page slug",
+ "name": "slug",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ },
+ "404": {
+ "description": "Not Found",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ },
+ "put": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Update an existing wiki page by slug",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Update a wiki page",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Page slug",
+ "name": "slug",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "Updated wiki page data",
+ "name": "page",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ },
+ "404": {
+ "description": "Not Found",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ },
+ "delete": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Soft-delete a wiki page by slug",
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Delete a wiki page",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Page slug",
+ "name": "slug",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "404": {
+ "description": "Not Found",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/rebuild-links": {
+ "post": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Re-parse all pages and rebuild bidirectional link references",
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Rebuild wiki links",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/search": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Full-text search over wiki pages",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Search wiki pages",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Search query",
+ "name": "q",
+ "in": "query",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "Max results (default 10)",
+ "name": "limit",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/stats": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Returns aggregate statistics about the wiki",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Get wiki statistics",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiStats"
+ }
+ }
+ }
+ }
+ },
"/auth/auto-setup": {
"post": {
"description": "Lite 版专用:首次启动时自动创建默认用户和租户并返回令牌,后续启动直接签发令牌,免除手动注册/登录流程",
@@ -995,13 +1702,13 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.LoginResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.LoginResponse"
}
},
"403": {
"description": "非 Lite 版本",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1055,7 +1762,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1081,7 +1788,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.LoginRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.LoginRequest"
}
}
],
@@ -1089,13 +1796,13 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.LoginResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.LoginResponse"
}
},
"401": {
"description": "认证失败",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1130,7 +1837,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1165,7 +1872,7 @@ const docTemplate = `{
"401": {
"description": "未授权",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1228,7 +1935,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.OIDCConfigResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OIDCConfigResponse"
}
}
}
@@ -1260,19 +1967,19 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.OIDCAuthURLResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OIDCAuthURLResponse"
}
},
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "OIDC未启用",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1318,7 +2025,7 @@ const docTemplate = `{
"401": {
"description": "令牌无效",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1344,7 +2051,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.RegisterRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RegisterRequest"
}
}
],
@@ -1352,19 +2059,19 @@ const docTemplate = `{
"201": {
"description": "Created",
"schema": {
- "$ref": "#/definitions/types.RegisterResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RegisterResponse"
}
},
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "注册功能已禁用",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1399,7 +2106,7 @@ const docTemplate = `{
"401": {
"description": "令牌无效",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1446,13 +2153,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "分块不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1513,13 +2220,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "分块不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1580,7 +2287,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1625,7 +2332,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1673,7 +2380,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.UpdateChunkRequest"
+ "$ref": "#/definitions/internal_handler.UpdateChunkRequest"
}
}
],
@@ -1688,13 +2395,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "分块不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1746,13 +2453,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "分块不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1799,7 +2506,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1831,7 +2538,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.EvaluationRequest"
+ "$ref": "#/definitions/internal_handler.EvaluationRequest"
}
}
],
@@ -1846,7 +2553,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1893,7 +2600,7 @@ const docTemplate = `{
"404": {
"description": "任务不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1927,7 +2634,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.TextRelationExtractionRequest"
+ "$ref": "#/definitions/internal_handler.TextRelationExtractionRequest"
}
}
],
@@ -1942,7 +2649,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2000,7 +2707,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.FabriTextRequest"
+ "$ref": "#/definitions/internal_handler.FabriTextRequest"
}
}
],
@@ -2015,7 +2722,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2071,7 +2778,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2118,7 +2825,7 @@ const docTemplate = `{
"404": {
"description": "知识库不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2157,7 +2864,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.KBModelConfigRequest"
+ "$ref": "#/definitions/internal_handler.KBModelConfigRequest"
}
}
],
@@ -2172,13 +2879,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "知识库不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2227,7 +2934,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2276,7 +2983,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2310,7 +3017,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.RemoteModelCheckRequest"
+ "$ref": "#/definitions/internal_handler.RemoteModelCheckRequest"
}
}
],
@@ -2325,7 +3032,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2374,7 +3081,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2454,7 +3161,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2533,7 +3240,7 @@ const docTemplate = `{
"404": {
"description": "任务不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2571,7 +3278,7 @@ const docTemplate = `{
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2628,7 +3335,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2682,7 +3389,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2752,7 +3459,7 @@ const docTemplate = `{
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2784,7 +3491,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.KnowledgeBase"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBase"
}
}
],
@@ -2799,7 +3506,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2833,7 +3540,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.CopyKnowledgeBaseRequest"
+ "$ref": "#/definitions/internal_handler.CopyKnowledgeBaseRequest"
}
}
],
@@ -2848,7 +3555,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2895,7 +3602,7 @@ const docTemplate = `{
"404": {
"description": "任务不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2948,13 +3655,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "知识库不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2993,7 +3700,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.UpdateKnowledgeBaseRequest"
+ "$ref": "#/definitions/internal_handler.UpdateKnowledgeBaseRequest"
}
}
],
@@ -3008,7 +3715,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3053,7 +3760,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3136,7 +3843,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3175,7 +3882,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.FAQBatchUpsertPayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQBatchUpsertPayload"
}
}
],
@@ -3190,7 +3897,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3252,7 +3959,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3298,7 +4005,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3339,7 +4046,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.FAQEntryFieldsBatchUpdate"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsBatchUpdate"
}
}
],
@@ -3354,7 +4061,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3410,7 +4117,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3464,13 +4171,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "条目不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3516,7 +4223,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.FAQEntryPayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload"
}
}
],
@@ -3531,7 +4238,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3579,7 +4286,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.addSimilarQuestionsRequest"
+ "$ref": "#/definitions/internal_handler.addSimilarQuestionsRequest"
}
}
],
@@ -3594,13 +4301,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "条目不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3641,7 +4348,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.FAQEntryPayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload"
}
}
],
@@ -3656,7 +4363,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3697,7 +4404,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.updateLastFAQImportResultDisplayStatusRequest"
+ "$ref": "#/definitions/internal_handler.updateLastFAQImportResultDisplayStatusRequest"
}
}
],
@@ -3712,13 +4419,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "知识库不存在或无导入记录",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3759,7 +4466,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.FAQSearchRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQSearchRequest"
}
}
],
@@ -3774,7 +4481,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3815,7 +4522,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.SearchParams"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SearchParams"
}
}
],
@@ -3830,7 +4537,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3907,7 +4614,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3952,13 +4659,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "权限不足",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4030,7 +4737,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"409": {
@@ -4078,7 +4785,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.ManualKnowledgePayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload"
}
}
],
@@ -4093,7 +4800,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4169,7 +4876,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"409": {
@@ -4223,7 +4930,7 @@ const docTemplate = `{
"404": {
"description": "知识库不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4257,7 +4964,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.ListSharesResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse"
}
}
}
@@ -4293,7 +5000,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.ShareKnowledgeBaseRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ShareKnowledgeBaseRequest"
}
}
],
@@ -4353,7 +5060,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.UpdateSharePermissionRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateSharePermissionRequest"
}
}
],
@@ -4476,7 +5183,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4541,7 +5248,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4604,7 +5311,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4661,7 +5368,7 @@ const docTemplate = `{
"name": "body",
"in": "body",
"schema": {
- "$ref": "#/definitions/handler.DeleteTagRequest"
+ "$ref": "#/definitions/internal_handler.DeleteTagRequest"
}
}
],
@@ -4676,7 +5383,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4739,7 +5446,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4807,7 +5514,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4848,7 +5555,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.ManualKnowledgePayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload"
}
}
],
@@ -4863,7 +5570,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4933,7 +5640,7 @@ const docTemplate = `{
"400": {
"description": "Invalid request",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4982,7 +5689,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5029,13 +5736,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "知识不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5074,7 +5781,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.Knowledge"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Knowledge"
}
}
],
@@ -5089,7 +5796,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5134,7 +5841,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5180,7 +5887,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5229,7 +5936,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5276,13 +5983,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "权限不足",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5320,7 +6027,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5352,7 +6059,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.MCPService"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPService"
}
}
],
@@ -5367,7 +6074,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5414,7 +6121,7 @@ const docTemplate = `{
"404": {
"description": "服务不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5468,7 +6175,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5513,7 +6220,7 @@ const docTemplate = `{
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5560,7 +6267,7 @@ const docTemplate = `{
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5607,7 +6314,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5654,7 +6361,7 @@ const docTemplate = `{
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5720,7 +6427,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.SearchMessagesRequest"
+ "$ref": "#/definitions/internal_handler.SearchMessagesRequest"
}
}
],
@@ -5735,7 +6442,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5795,7 +6502,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5849,7 +6556,7 @@ const docTemplate = `{
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5887,7 +6594,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5919,7 +6626,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.CreateModelRequest"
+ "$ref": "#/definitions/internal_handler.CreateModelRequest"
}
}
],
@@ -5934,7 +6641,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -6021,7 +6728,7 @@ const docTemplate = `{
"404": {
"description": "模型不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -6060,7 +6767,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.UpdateModelRequest"
+ "$ref": "#/definitions/internal_handler.UpdateModelRequest"
}
}
],
@@ -6075,7 +6782,7 @@ const docTemplate = `{
"404": {
"description": "模型不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -6120,7 +6827,7 @@ const docTemplate = `{
"404": {
"description": "模型不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -6145,7 +6852,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.ListOrganizationsResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse"
}
}
}
@@ -6174,7 +6881,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.CreateOrganizationRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest"
}
}
],
@@ -6220,7 +6927,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.JoinOrganizationRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest"
}
}
],
@@ -6266,7 +6973,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.JoinByOrganizationIDRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest"
}
}
],
@@ -6312,7 +7019,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.SubmitJoinRequestRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest"
}
}
],
@@ -6486,7 +7193,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.UpdateOrganizationRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest"
}
}
],
@@ -6575,7 +7282,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.InviteMemberRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.InviteMemberRequest"
}
}
],
@@ -6723,7 +7430,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.ReviewJoinRequestRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest"
}
}
],
@@ -6810,7 +7517,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.ListMembersResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListMembersResponse"
}
}
}
@@ -6855,7 +7562,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.UpdateMemberRoleRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest"
}
}
],
@@ -6951,7 +7658,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.RequestRoleUpgradeRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest"
}
}
],
@@ -7125,7 +7832,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.ListSharesResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse"
}
}
}
@@ -7177,7 +7884,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7209,7 +7916,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.CreateSessionRequest"
+ "$ref": "#/definitions/internal_handler_session.CreateSessionRequest"
}
}
],
@@ -7224,7 +7931,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7258,7 +7965,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.batchDeleteRequest"
+ "$ref": "#/definitions/internal_handler_session.batchDeleteRequest"
}
}
],
@@ -7273,7 +7980,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7307,7 +8014,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.SearchKnowledgeRequest"
+ "$ref": "#/definitions/internal_handler_session.SearchKnowledgeRequest"
}
}
],
@@ -7322,7 +8029,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7369,7 +8076,7 @@ const docTemplate = `{
"404": {
"description": "会话不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7408,7 +8115,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.Session"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Session"
}
}
],
@@ -7423,7 +8130,7 @@ const docTemplate = `{
"404": {
"description": "会话不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7468,7 +8175,7 @@ const docTemplate = `{
"404": {
"description": "会话不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7515,13 +8222,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "会话不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7562,7 +8269,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.CreateKnowledgeQARequest"
+ "$ref": "#/definitions/internal_handler_session.CreateKnowledgeQARequest"
}
}
],
@@ -7577,7 +8284,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7631,7 +8338,7 @@ const docTemplate = `{
"404": {
"description": "会话或消息不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7672,7 +8379,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.CreateKnowledgeQARequest"
+ "$ref": "#/definitions/internal_handler_session.CreateKnowledgeQARequest"
}
}
],
@@ -7687,7 +8394,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7728,7 +8435,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.StopSessionRequest"
+ "$ref": "#/definitions/internal_handler_session.StopSessionRequest"
}
}
],
@@ -7743,7 +8450,7 @@ const docTemplate = `{
"404": {
"description": "会话或消息不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7784,7 +8491,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.GenerateTitleRequest"
+ "$ref": "#/definitions/internal_handler_session.GenerateTitleRequest"
}
}
],
@@ -7799,7 +8506,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7863,7 +8570,7 @@ const docTemplate = `{
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7916,7 +8623,7 @@ const docTemplate = `{
"200": {
"description": "系统信息",
"schema": {
- "$ref": "#/definitions/handler.GetSystemInfoResponse"
+ "$ref": "#/definitions/internal_handler.GetSystemInfoResponse"
}
}
}
@@ -7992,7 +8699,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.StorageCheckRequest"
+ "$ref": "#/definitions/internal_handler.StorageCheckRequest"
}
}
],
@@ -8000,7 +8707,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/handler.StorageCheckResponse"
+ "$ref": "#/definitions/internal_handler.StorageCheckResponse"
}
}
}
@@ -8020,7 +8727,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/handler.GetStorageEngineStatusResponse"
+ "$ref": "#/definitions/internal_handler.GetStorageEngineStatusResponse"
}
}
}
@@ -8055,7 +8762,7 @@ const docTemplate = `{
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8084,7 +8791,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.Tenant"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
}
}
],
@@ -8099,7 +8806,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8134,7 +8841,7 @@ const docTemplate = `{
"403": {
"description": "权限不足",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8172,7 +8879,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8210,7 +8917,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8248,7 +8955,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8286,7 +8993,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8333,7 +9040,7 @@ const docTemplate = `{
"400": {
"description": "不支持的键",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8387,7 +9094,7 @@ const docTemplate = `{
"400": {
"description": "不支持的键",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8453,7 +9160,7 @@ const docTemplate = `{
"403": {
"description": "权限不足",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8500,13 +9207,13 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "租户不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8542,7 +9249,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.Tenant"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
}
}
],
@@ -8557,7 +9264,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8599,7 +9306,7 @@ const docTemplate = `{
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8667,7 +9374,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.CreateStoreRequest"
+ "$ref": "#/definitions/internal_handler.CreateStoreRequest"
}
}
],
@@ -8682,7 +9389,7 @@ const docTemplate = `{
"400": {
"description": "Invalid request or validation error",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"401": {
@@ -8695,7 +9402,7 @@ const docTemplate = `{
"409": {
"description": "Duplicate endpoint and index",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8729,7 +9436,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.TestStoreRequest"
+ "$ref": "#/definitions/internal_handler.TestStoreRequest"
}
}
],
@@ -8744,7 +9451,7 @@ const docTemplate = `{
"400": {
"description": "Invalid request",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"401": {
@@ -8863,7 +9570,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.UpdateStoreRequest"
+ "$ref": "#/definitions/internal_handler.UpdateStoreRequest"
}
}
],
@@ -9010,7 +9717,87 @@ const docTemplate = `{
}
},
"definitions": {
- "datasource.ConnectorMetadata": {
+ "github_com_Tencent_WeKnora_internal_application_service.WikiLintIssue": {
+ "type": "object",
+ "properties": {
+ "auto_fixable": {
+ "type": "boolean"
+ },
+ "description": {
+ "type": "string"
+ },
+ "page_slug": {
+ "type": "string"
+ },
+ "severity": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueSeverity"
+ },
+ "target_slug": {
+ "description": "TargetSlug identifies the other page involved in the issue (e.g. the\nbroken link target, or the entity slug for a missing cross-ref). It is\nthe structured field used by AutoFix instead of parsing Description.",
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueType"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueSeverity": {
+ "type": "string",
+ "enum": [
+ "info",
+ "warning",
+ "error"
+ ],
+ "x-enum-varnames": [
+ "SeverityInfo",
+ "SeverityWarning",
+ "SeverityError"
+ ]
+ },
+ "github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueType": {
+ "type": "string",
+ "enum": [
+ "orphan_page",
+ "broken_link",
+ "stale_ref",
+ "missing_cross_ref",
+ "empty_content",
+ "duplicate_slug"
+ ],
+ "x-enum-varnames": [
+ "LintIssueOrphanPage",
+ "LintIssueBrokenLink",
+ "LintIssueStaleRef",
+ "LintIssueMissingCrossRef",
+ "LintIssueEmptyContent",
+ "LintIssueDuplicateSlug"
+ ]
+ },
+ "github_com_Tencent_WeKnora_internal_application_service.WikiLintReport": {
+ "type": "object",
+ "properties": {
+ "health_score": {
+ "description": "0-100",
+ "type": "integer"
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintIssue"
+ }
+ },
+ "knowledge_base_id": {
+ "type": "string"
+ },
+ "stats": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiStats"
+ },
+ "summary": {
+ "type": "string"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_datasource.ConnectorMetadata": {
"type": "object",
"properties": {
"auth_type": {
@@ -9042,11 +9829,11 @@ const docTemplate = `{
}
}
},
- "errors.AppError": {
+ "github_com_Tencent_WeKnora_internal_errors.AppError": {
"type": "object",
"properties": {
"code": {
- "$ref": "#/definitions/errors.ErrorCode"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.ErrorCode"
},
"details": {},
"message": {
@@ -9054,7 +9841,7 @@ const docTemplate = `{
}
}
},
- "errors.ErrorCode": {
+ "github_com_Tencent_WeKnora_internal_errors.ErrorCode": {
"type": "integer",
"enum": [
1000,
@@ -9101,799 +9888,7 @@ const docTemplate = `{
"ErrAgentInvalidTemperature"
]
},
- "github_com_Tencent_WeKnora_internal_errors.AppError": {
- "type": "object",
- "properties": {
- "code": {
- "$ref": "#/definitions/errors.ErrorCode"
- },
- "details": {},
- "message": {
- "type": "string"
- }
- }
- },
- "gorm.DeletedAt": {
- "type": "object",
- "properties": {
- "time": {
- "type": "string"
- },
- "valid": {
- "description": "Valid is true if Time is not NULL",
- "type": "boolean"
- }
- }
- },
- "handler.CopyKnowledgeBaseRequest": {
- "type": "object",
- "required": [
- "source_id"
- ],
- "properties": {
- "source_id": {
- "type": "string"
- },
- "target_id": {
- "type": "string"
- },
- "task_id": {
- "type": "string"
- }
- }
- },
- "handler.CreateAgentRequest": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "avatar": {
- "type": "string"
- },
- "config": {
- "$ref": "#/definitions/types.CustomAgentConfig"
- },
- "description": {
- "type": "string"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "handler.CreateModelRequest": {
- "type": "object",
- "required": [
- "name",
- "parameters",
- "source",
- "type"
- ],
- "properties": {
- "description": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "parameters": {
- "$ref": "#/definitions/types.ModelParameters"
- },
- "source": {
- "$ref": "#/definitions/types.ModelSource"
- },
- "type": {
- "$ref": "#/definitions/types.ModelType"
- }
- }
- },
- "handler.CreateStoreRequest": {
- "type": "object",
- "required": [
- "connection_config",
- "engine_type",
- "name"
- ],
- "properties": {
- "connection_config": {
- "$ref": "#/definitions/types.ConnectionConfig"
- },
- "engine_type": {
- "$ref": "#/definitions/types.RetrieverEngineType"
- },
- "index_config": {
- "$ref": "#/definitions/types.IndexConfig"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "handler.DeleteTagRequest": {
- "type": "object",
- "properties": {
- "exclude_ids": {
- "description": "Chunk seq_ids to exclude from deletion",
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- }
- },
- "handler.EvaluationRequest": {
- "type": "object",
- "properties": {
- "chat_id": {
- "description": "ID of chat model to use",
- "type": "string"
- },
- "dataset_id": {
- "description": "ID of dataset to evaluate",
- "type": "string"
- },
- "knowledge_base_id": {
- "description": "ID of knowledge base to use",
- "type": "string"
- },
- "rerank_id": {
- "description": "ID of rerank model to use",
- "type": "string"
- }
- }
- },
- "handler.FabriTextRequest": {
- "type": "object",
- "required": [
- "model_id"
- ],
- "properties": {
- "model_id": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "handler.GetStorageEngineStatusResponse": {
- "type": "object",
- "properties": {
- "engines": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/handler.StorageEngineStatusItem"
- }
- },
- "minio_env_available": {
- "type": "boolean"
- }
- }
- },
- "handler.GetSystemInfoResponse": {
- "type": "object",
- "properties": {
- "build_time": {
- "type": "string"
- },
- "commit_id": {
- "type": "string"
- },
- "db_version": {
- "type": "string"
- },
- "edition": {
- "type": "string"
- },
- "go_version": {
- "type": "string"
- },
- "graph_database_engine": {
- "type": "string"
- },
- "keyword_index_engine": {
- "type": "string"
- },
- "minio_enabled": {
- "type": "boolean"
- },
- "vector_store_engine": {
- "type": "string"
- },
- "version": {
- "type": "string"
- }
- }
- },
- "handler.KBModelConfigRequest": {
- "type": "object",
- "required": [
- "embeddingModelId",
- "llmModelId"
- ],
- "properties": {
- "asr_config": {
- "$ref": "#/definitions/types.ASRConfig"
- },
- "documentSplitting": {
- "description": "文档分块配置",
- "type": "object",
- "properties": {
- "childChunkSize": {
- "type": "integer"
- },
- "chunkOverlap": {
- "type": "integer"
- },
- "chunkSize": {
- "type": "integer"
- },
- "enableParentChild": {
- "type": "boolean"
- },
- "parentChunkSize": {
- "type": "integer"
- },
- "parserEngineRules": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/types.ParserEngineRule"
- }
- },
- "separators": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "embeddingModelId": {
- "type": "string"
- },
- "llmModelId": {
- "type": "string"
- },
- "multimodal": {
- "description": "多模态配置(仅模型相关;存储引擎在 storageProvider 中配置)",
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- }
- }
- },
- "nodeExtract": {
- "description": "知识图谱配置",
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- },
- "nodes": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/types.GraphNode"
- }
- },
- "relations": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/types.GraphRelation"
- }
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "text": {
- "type": "string"
- }
- }
- },
- "questionGeneration": {
- "description": "问题生成配置",
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- },
- "questionCount": {
- "type": "integer"
- }
- }
- },
- "storageProvider": {
- "description": "存储引擎选择(\"local\" | \"minio\" | \"cos\"),影响文档上传与文档内图片存储,参数从全局设置读取",
- "type": "string"
- },
- "vlm_config": {
- "$ref": "#/definitions/types.VLMConfig"
- }
- }
- },
- "handler.RemoteModelCheckRequest": {
- "type": "object",
- "required": [
- "baseUrl",
- "modelName"
- ],
- "properties": {
- "apiKey": {
- "type": "string"
- },
- "baseUrl": {
- "type": "string"
- },
- "modelName": {
- "type": "string"
- },
- "provider": {
- "type": "string"
- }
- }
- },
- "handler.SearchMessagesRequest": {
- "type": "object",
- "required": [
- "query"
- ],
- "properties": {
- "limit": {
- "description": "Maximum number of results to return (default: 20)",
- "type": "integer"
- },
- "mode": {
- "description": "Search mode: \"keyword\", \"vector\", \"hybrid\" (default: \"hybrid\")",
- "type": "string"
- },
- "query": {
- "description": "Query text for search",
- "type": "string"
- },
- "session_ids": {
- "description": "Filter by specific session IDs (optional)",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "handler.StorageCheckRequest": {
- "type": "object",
- "properties": {
- "cos": {
- "$ref": "#/definitions/types.COSEngineConfig"
- },
- "minio": {
- "$ref": "#/definitions/types.MinIOEngineConfig"
- },
- "oss": {
- "$ref": "#/definitions/types.OSSEngineConfig"
- },
- "provider": {
- "description": "\"minio\", \"cos\", \"tos\", \"s3\", \"oss\"",
- "type": "string"
- },
- "s3": {
- "$ref": "#/definitions/types.S3EngineConfig"
- },
- "tos": {
- "$ref": "#/definitions/types.TOSEngineConfig"
- }
- }
- },
- "handler.StorageCheckResponse": {
- "type": "object",
- "properties": {
- "bucket_created": {
- "type": "boolean"
- },
- "message": {
- "type": "string"
- },
- "ok": {
- "type": "boolean"
- }
- }
- },
- "handler.StorageEngineStatusItem": {
- "type": "object",
- "properties": {
- "available": {
- "description": "whether the engine can be used",
- "type": "boolean"
- },
- "description": {
- "description": "short description for UI",
- "type": "string"
- },
- "name": {
- "description": "\"local\", \"minio\", \"cos\", \"tos\"",
- "type": "string"
- }
- }
- },
- "handler.TestStoreRequest": {
- "type": "object",
- "required": [
- "connection_config",
- "engine_type"
- ],
- "properties": {
- "connection_config": {
- "$ref": "#/definitions/types.ConnectionConfig"
- },
- "engine_type": {
- "$ref": "#/definitions/types.RetrieverEngineType"
- }
- }
- },
- "handler.TextRelationExtractionRequest": {
- "type": "object",
- "required": [
- "model_id",
- "tags",
- "text"
- ],
- "properties": {
- "model_id": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "text": {
- "type": "string"
- }
- }
- },
- "handler.UpdateAgentRequest": {
- "type": "object",
- "properties": {
- "avatar": {
- "type": "string"
- },
- "config": {
- "$ref": "#/definitions/types.CustomAgentConfig"
- },
- "description": {
- "type": "string"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "handler.UpdateChunkRequest": {
- "type": "object",
- "properties": {
- "chunk_index": {
- "type": "integer"
- },
- "content": {
- "type": "string"
- },
- "embedding": {
- "type": "array",
- "items": {
- "type": "number"
- }
- },
- "end_at": {
- "type": "integer"
- },
- "image_info": {
- "type": "string"
- },
- "is_enabled": {
- "type": "boolean"
- },
- "start_at": {
- "type": "integer"
- }
- }
- },
- "handler.UpdateKnowledgeBaseRequest": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "config": {
- "$ref": "#/definitions/types.KnowledgeBaseConfig"
- },
- "description": {
- "type": "string"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "handler.UpdateModelRequest": {
- "type": "object",
- "properties": {
- "description": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "parameters": {
- "$ref": "#/definitions/types.ModelParameters"
- },
- "source": {
- "$ref": "#/definitions/types.ModelSource"
- },
- "type": {
- "$ref": "#/definitions/types.ModelType"
- }
- }
- },
- "handler.UpdateStoreRequest": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string"
- }
- }
- },
- "handler.addSimilarQuestionsRequest": {
- "type": "object",
- "required": [
- "similar_questions"
- ],
- "properties": {
- "similar_questions": {
- "type": "array",
- "minItems": 1,
- "items": {
- "type": "string"
- }
- }
- }
- },
- "handler.updateLastFAQImportResultDisplayStatusRequest": {
- "type": "object",
- "required": [
- "display_status"
- ],
- "properties": {
- "display_status": {
- "type": "string",
- "enum": [
- "open",
- "close"
- ]
- }
- }
- },
- "handler_session.AttachmentUpload": {
- "type": "object",
- "properties": {
- "data": {
- "description": "Base64-encoded file content",
- "type": "string"
- },
- "file_name": {
- "description": "Original filename",
- "type": "string"
- },
- "file_size": {
- "description": "File size in bytes",
- "type": "integer"
- }
- }
- },
- "handler_session.CreateKnowledgeQARequest": {
- "type": "object",
- "required": [
- "query"
- ],
- "properties": {
- "agent_enabled": {
- "description": "Whether agent mode is enabled for this request",
- "type": "boolean"
- },
- "agent_id": {
- "description": "Selected custom agent ID (backend resolves shared agent and its tenant from share relation)",
- "type": "string"
- },
- "attachment_uploads": {
- "description": "Attached files (documents, audio, etc.)",
- "type": "array",
- "items": {
- "$ref": "#/definitions/handler_session.AttachmentUpload"
- }
- },
- "channel": {
- "description": "Source channel: \"web\", \"api\", \"im\", etc.",
- "type": "string"
- },
- "disable_title": {
- "description": "Whether to disable auto title generation",
- "type": "boolean"
- },
- "enable_memory": {
- "description": "Whether memory feature is enabled for this request",
- "type": "boolean"
- },
- "images": {
- "description": "Attached images for multimodal chat",
- "type": "array",
- "items": {
- "$ref": "#/definitions/handler_session.ImageAttachment"
- }
- },
- "knowledge_base_ids": {
- "description": "Selected knowledge base ID for this request",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "knowledge_ids": {
- "description": "Selected knowledge ID for this request",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "mentioned_items": {
- "description": "@mentioned knowledge bases and files",
- "type": "array",
- "items": {
- "$ref": "#/definitions/handler_session.MentionedItemRequest"
- }
- },
- "query": {
- "description": "Query text for knowledge base search",
- "type": "string"
- },
- "summary_model_id": {
- "description": "Optional summary model ID for this request (overrides session default)",
- "type": "string"
- },
- "web_search_enabled": {
- "description": "Whether web search is enabled for this request",
- "type": "boolean"
- }
- }
- },
- "handler_session.CreateSessionRequest": {
- "type": "object",
- "properties": {
- "description": {
- "description": "Description for the session (optional)",
- "type": "string"
- },
- "title": {
- "description": "Title for the session (optional)",
- "type": "string"
- }
- }
- },
- "handler_session.GenerateTitleRequest": {
- "type": "object",
- "required": [
- "messages"
- ],
- "properties": {
- "messages": {
- "description": "Messages to use as context for title generation",
- "type": "array",
- "items": {
- "$ref": "#/definitions/types.Message"
- }
- }
- }
- },
- "handler_session.ImageAttachment": {
- "type": "object",
- "properties": {
- "caption": {
- "description": "VLM analysis result (context-aware, single call)",
- "type": "string"
- },
- "data": {
- "description": "base64 data URI from frontend (data:image/png;base64,...)",
- "type": "string"
- },
- "url": {
- "description": "serving URL after saving to storage",
- "type": "string"
- }
- }
- },
- "handler_session.MentionedItemRequest": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "kb_type": {
- "description": "\"document\" or \"faq\" (only for kb type)",
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "type": {
- "description": "\"kb\" for knowledge base, \"file\" for file",
- "type": "string"
- }
- }
- },
- "handler_session.SearchKnowledgeRequest": {
- "type": "object",
- "required": [
- "query"
- ],
- "properties": {
- "knowledge_base_id": {
- "description": "Single knowledge base ID (for backward compatibility)",
- "type": "string"
- },
- "knowledge_base_ids": {
- "description": "IDs of knowledge bases to search (multi-KB support)",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "knowledge_ids": {
- "description": "IDs of specific knowledge (files) to search",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "query": {
- "description": "Query text to search for",
- "type": "string"
- }
- }
- },
- "handler_session.StopSessionRequest": {
- "type": "object",
- "required": [
- "message_id"
- ],
- "properties": {
- "message_id": {
- "type": "string"
- }
- }
- },
- "handler_session.batchDeleteRequest": {
- "type": "object",
- "properties": {
- "delete_all": {
- "type": "boolean"
- },
- "ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "types.ASRConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ASRConfig": {
"type": "object",
"properties": {
"enabled": {
@@ -9908,7 +9903,7 @@ const docTemplate = `{
}
}
},
- "types.AgentConfig": {
+ "github_com_Tencent_WeKnora_internal_types.AgentConfig": {
"type": "object",
"properties": {
"allowed_skills": {
@@ -9978,6 +9973,10 @@ const docTemplate = `{
"description": "Whether to execute independent tool calls in parallel (default: false).\nWhen enabled and the LLM returns multiple tool calls, they run concurrently via errgroup.",
"type": "boolean"
},
+ "retain_retrieval_history": {
+ "description": "Whether to retain retrieval history (like wiki_read_page results) across turns (default: false)",
+ "type": "boolean"
+ },
"retrieve_kb_only_when_mentioned": {
"description": "Whether to retrieve knowledge base only when explicitly mentioned with @ (default: false)",
"type": "boolean"
@@ -10031,7 +10030,7 @@ const docTemplate = `{
}
}
},
- "types.AgentStep": {
+ "github_com_Tencent_WeKnora_internal_types.AgentStep": {
"type": "object",
"properties": {
"iteration": {
@@ -10050,12 +10049,12 @@ const docTemplate = `{
"description": "Tools called in this step (Act phase)",
"type": "array",
"items": {
- "$ref": "#/definitions/types.ToolCall"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ToolCall"
}
}
}
},
- "types.AnswerStrategy": {
+ "github_com_Tencent_WeKnora_internal_types.AnswerStrategy": {
"type": "string",
"enum": [
"all",
@@ -10066,7 +10065,7 @@ const docTemplate = `{
"AnswerStrategyRandom"
]
},
- "types.COSEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.COSEngineConfig": {
"type": "object",
"properties": {
"app_id": {
@@ -10089,7 +10088,7 @@ const docTemplate = `{
}
}
},
- "types.ChatHistoryConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ChatHistoryConfig": {
"type": "object",
"properties": {
"embedding_model_id": {
@@ -10106,7 +10105,7 @@ const docTemplate = `{
}
}
},
- "types.ChunkingConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ChunkingConfig": {
"type": "object",
"properties": {
"child_chunk_size": {
@@ -10137,7 +10136,7 @@ const docTemplate = `{
"description": "ParserEngineRules configures which parser engine to use for each file type.\nWhen empty, the builtin engine is used for all types.",
"type": "array",
"items": {
- "$ref": "#/definitions/types.ParserEngineRule"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineRule"
}
},
"separators": {
@@ -10149,7 +10148,7 @@ const docTemplate = `{
}
}
},
- "types.ConnectionConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ConnectionConfig": {
"type": "object",
"properties": {
"addr": {
@@ -10194,7 +10193,7 @@ const docTemplate = `{
}
}
},
- "types.ContextCompressionStrategy": {
+ "github_com_Tencent_WeKnora_internal_types.ContextCompressionStrategy": {
"type": "string",
"enum": [
"sliding_window",
@@ -10205,14 +10204,14 @@ const docTemplate = `{
"ContextCompressionSmart"
]
},
- "types.ContextConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ContextConfig": {
"type": "object",
"properties": {
"compression_strategy": {
"description": "Compression strategy: \"sliding_window\" or \"smart\"",
"allOf": [
{
- "$ref": "#/definitions/types.ContextCompressionStrategy"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ContextCompressionStrategy"
}
]
},
@@ -10230,7 +10229,7 @@ const docTemplate = `{
}
}
},
- "types.ConversationConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ConversationConfig": {
"type": "object",
"properties": {
"context_template": {
@@ -10300,7 +10299,7 @@ const docTemplate = `{
}
}
},
- "types.CreateOrganizationRequest": {
+ "github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest": {
"type": "object",
"required": [
"name"
@@ -10330,21 +10329,25 @@ const docTemplate = `{
}
}
},
- "types.CredentialsConfig": {
+ "github_com_Tencent_WeKnora_internal_types.CredentialsConfig": {
"type": "object",
"properties": {
"weknoracloud": {
- "$ref": "#/definitions/types.WeKnoraCloudCredentials"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WeKnoraCloudCredentials"
}
}
},
- "types.CustomAgentConfig": {
+ "github_com_Tencent_WeKnora_internal_types.CustomAgentConfig": {
"type": "object",
"properties": {
"agent_mode": {
"description": "===== Basic Settings =====\nAgent mode: \"quick-answer\" for RAG mode, \"smart-reasoning\" for ReAct agent mode",
"type": "string"
},
+ "agent_type": {
+ "description": "AgentType is a preset category under smart-reasoning mode that pre-fills\nsystem prompt, allowed tools and recommended KB compatibility.\nValid values: \"rag-qa\", \"wiki-qa\", \"hybrid-rag-wiki\", \"custom\".\nEmpty / unknown values are treated as \"custom\" (no preset applied).\nIgnored for quick-answer mode.",
+ "type": "string"
+ },
"allowed_tools": {
"description": "Allowed tools (only for agent type)",
"type": "array",
@@ -10474,6 +10477,10 @@ const docTemplate = `{
"description": "Rerank top K",
"type": "integer"
},
+ "retain_retrieval_history": {
+ "description": "Whether to retain retrieval history across turns",
+ "type": "boolean"
+ },
"retrieve_kb_only_when_mentioned": {
"description": "Whether to retrieve knowledge base only when explicitly mentioned with @ (default: false)\nWhen true, knowledge base retrieval only happens if user explicitly mentions KB/files with @\nWhen false, knowledge base retrieval happens according to KBSelectionMode",
"type": "boolean"
@@ -10557,7 +10564,7 @@ const docTemplate = `{
}
}
},
- "types.DataSource": {
+ "github_com_Tencent_WeKnora_internal_types.DataSource": {
"type": "object",
"properties": {
"config": {
@@ -10617,7 +10624,7 @@ const docTemplate = `{
"description": "Latest sync log (not stored in DB, populated on query)",
"allOf": [
{
- "$ref": "#/definitions/types.SyncLog"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog"
}
]
},
@@ -10663,7 +10670,7 @@ const docTemplate = `{
}
}
},
- "types.EmbeddingParameters": {
+ "github_com_Tencent_WeKnora_internal_types.EmbeddingParameters": {
"type": "object",
"properties": {
"dimension": {
@@ -10674,7 +10681,7 @@ const docTemplate = `{
}
}
},
- "types.ExtractConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ExtractConfig": {
"type": "object",
"properties": {
"enabled": {
@@ -10683,13 +10690,13 @@ const docTemplate = `{
"nodes": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.GraphNode"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.GraphNode"
}
},
"relations": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.GraphRelation"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.GraphRelation"
}
},
"tags": {
@@ -10703,7 +10710,7 @@ const docTemplate = `{
}
}
},
- "types.FAQBatchUpsertPayload": {
+ "github_com_Tencent_WeKnora_internal_types.FAQBatchUpsertPayload": {
"type": "object",
"required": [
"entries"
@@ -10716,7 +10723,7 @@ const docTemplate = `{
"entries": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.FAQEntryPayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload"
}
},
"knowledge_id": {
@@ -10735,32 +10742,32 @@ const docTemplate = `{
}
}
},
- "types.FAQConfig": {
+ "github_com_Tencent_WeKnora_internal_types.FAQConfig": {
"type": "object",
"properties": {
"index_mode": {
- "$ref": "#/definitions/types.FAQIndexMode"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQIndexMode"
},
"question_index_mode": {
- "$ref": "#/definitions/types.FAQQuestionIndexMode"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQQuestionIndexMode"
}
}
},
- "types.FAQEntryFieldsBatchUpdate": {
+ "github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsBatchUpdate": {
"type": "object",
"properties": {
"by_id": {
"description": "ByID 按条目ID更新,key为条目ID (seq_id)",
"type": "object",
"additionalProperties": {
- "$ref": "#/definitions/types.FAQEntryFieldsUpdate"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate"
}
},
"by_tag": {
"description": "ByTag 按Tag批量更新,key为TagID (seq_id)",
"type": "object",
"additionalProperties": {
- "$ref": "#/definitions/types.FAQEntryFieldsUpdate"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate"
}
},
"exclude_ids": {
@@ -10772,7 +10779,7 @@ const docTemplate = `{
}
}
},
- "types.FAQEntryFieldsUpdate": {
+ "github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate": {
"type": "object",
"properties": {
"is_enabled": {
@@ -10786,14 +10793,14 @@ const docTemplate = `{
}
}
},
- "types.FAQEntryPayload": {
+ "github_com_Tencent_WeKnora_internal_types.FAQEntryPayload": {
"type": "object",
"required": [
"standard_question"
],
"properties": {
"answer_strategy": {
- "$ref": "#/definitions/types.AnswerStrategy"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.AnswerStrategy"
},
"answers": {
"type": "array",
@@ -10834,7 +10841,7 @@ const docTemplate = `{
}
}
},
- "types.FAQIndexMode": {
+ "github_com_Tencent_WeKnora_internal_types.FAQIndexMode": {
"type": "string",
"enum": [
"question_only",
@@ -10845,7 +10852,7 @@ const docTemplate = `{
"FAQIndexModeQuestionAnswer"
]
},
- "types.FAQQuestionIndexMode": {
+ "github_com_Tencent_WeKnora_internal_types.FAQQuestionIndexMode": {
"type": "string",
"enum": [
"combined",
@@ -10856,7 +10863,7 @@ const docTemplate = `{
"FAQQuestionIndexModeSeparate"
]
},
- "types.FAQSearchRequest": {
+ "github_com_Tencent_WeKnora_internal_types.FAQSearchRequest": {
"type": "object",
"required": [
"query_text"
@@ -10891,7 +10898,7 @@ const docTemplate = `{
}
}
},
- "types.GraphNode": {
+ "github_com_Tencent_WeKnora_internal_types.GraphNode": {
"type": "object",
"properties": {
"attributes": {
@@ -10911,7 +10918,7 @@ const docTemplate = `{
}
}
},
- "types.GraphRelation": {
+ "github_com_Tencent_WeKnora_internal_types.GraphRelation": {
"type": "object",
"properties": {
"node1": {
@@ -10925,7 +10932,7 @@ const docTemplate = `{
}
}
},
- "types.ImageProcessingConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig": {
"type": "object",
"properties": {
"model_id": {
@@ -10934,7 +10941,7 @@ const docTemplate = `{
}
}
},
- "types.IndexConfig": {
+ "github_com_Tencent_WeKnora_internal_types.IndexConfig": {
"type": "object",
"properties": {
"collection_name": {
@@ -10942,11 +10949,15 @@ const docTemplate = `{
"type": "string"
},
"collection_prefix": {
- "description": "Qdrant",
+ "description": "Qdrant, Weaviate",
"type": "string"
},
+ "desired_shard_count": {
+ "description": "Weaviate: number of shards per collection",
+ "type": "integer"
+ },
"index_name": {
- "description": "ES, OpenSearch",
+ "description": "--- Existing fields ---",
"type": "string"
},
"number_of_replicas": {
@@ -10956,10 +10967,47 @@ const docTemplate = `{
"number_of_shards": {
"description": "ES, OpenSearch",
"type": "integer"
+ },
+ "replica_number": {
+ "description": "Milvus: in-memory replica count (LoadCollection)",
+ "type": "integer"
+ },
+ "replication_factor": {
+ "description": "Qdrant, Weaviate: number of replicas",
+ "type": "integer"
+ },
+ "shard_number": {
+ "description": "--- Scalability fields ---",
+ "type": "integer"
+ },
+ "shards_num": {
+ "description": "Milvus: number of shards per collection (CreateCollection)",
+ "type": "integer"
}
}
},
- "types.InviteMemberRequest": {
+ "github_com_Tencent_WeKnora_internal_types.IndexingStrategy": {
+ "type": "object",
+ "properties": {
+ "graph_enabled": {
+ "description": "GraphEnabled enables knowledge graph entity/relation extraction",
+ "type": "boolean"
+ },
+ "keyword_enabled": {
+ "description": "KeywordEnabled enables keyword-based (BM25) search",
+ "type": "boolean"
+ },
+ "vector_enabled": {
+ "description": "VectorEnabled enables semantic vector embedding and search",
+ "type": "boolean"
+ },
+ "wiki_enabled": {
+ "description": "WikiEnabled enables automatic wiki page generation from documents",
+ "type": "boolean"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.InviteMemberRequest": {
"type": "object",
"required": [
"role",
@@ -10970,7 +11018,7 @@ const docTemplate = `{
"description": "Role to assign: admin/editor/viewer",
"allOf": [
{
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
},
@@ -10980,7 +11028,7 @@ const docTemplate = `{
}
}
},
- "types.JoinByOrganizationIDRequest": {
+ "github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest": {
"type": "object",
"required": [
"organization_id"
@@ -10998,13 +11046,13 @@ const docTemplate = `{
"description": "Optional: requested role (admin/editor/viewer); default viewer",
"allOf": [
{
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
}
}
},
- "types.JoinOrganizationRequest": {
+ "github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest": {
"type": "object",
"required": [
"invite_code"
@@ -11017,7 +11065,7 @@ const docTemplate = `{
}
}
},
- "types.Knowledge": {
+ "github_com_Tencent_WeKnora_internal_types.Knowledge": {
"type": "object",
"properties": {
"channel": {
@@ -11140,14 +11188,14 @@ const docTemplate = `{
}
}
},
- "types.KnowledgeBase": {
+ "github_com_Tencent_WeKnora_internal_types.KnowledgeBase": {
"type": "object",
"properties": {
"asr_config": {
"description": "ASR config (Automatic Speech Recognition)",
"allOf": [
{
- "$ref": "#/definitions/types.ASRConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ASRConfig"
}
]
},
@@ -11159,7 +11207,7 @@ const docTemplate = `{
"description": "Chunking configuration",
"allOf": [
{
- "$ref": "#/definitions/types.ChunkingConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ChunkingConfig"
}
]
},
@@ -11187,7 +11235,7 @@ const docTemplate = `{
"description": "Extract config",
"allOf": [
{
- "$ref": "#/definitions/types.ExtractConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ExtractConfig"
}
]
},
@@ -11195,7 +11243,7 @@ const docTemplate = `{
"description": "FAQConfig stores FAQ specific configuration such as indexing strategy",
"allOf": [
{
- "$ref": "#/definitions/types.FAQConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQConfig"
}
]
},
@@ -11207,7 +11255,15 @@ const docTemplate = `{
"description": "Image processing configuration",
"allOf": [
{
- "$ref": "#/definitions/types.ImageProcessingConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig"
+ }
+ ]
+ },
+ "indexing_strategy": {
+ "description": "IndexingStrategy controls which indexing pipelines are active for this knowledge base.\nPipelines: vector search, keyword search, wiki generation, knowledge graph extraction.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.IndexingStrategy"
}
]
},
@@ -11243,7 +11299,7 @@ const docTemplate = `{
"description": "QuestionGenerationConfig stores question generation configuration for document knowledge bases",
"allOf": [
{
- "$ref": "#/definitions/types.QuestionGenerationConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig"
}
]
},
@@ -11255,7 +11311,7 @@ const docTemplate = `{
"description": "Deprecated: legacy COS config column. Kept for backward compatibility with old data.",
"allOf": [
{
- "$ref": "#/definitions/types.StorageConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.StorageConfig"
}
]
},
@@ -11263,7 +11319,7 @@ const docTemplate = `{
"description": "Storage provider config (new): only stores provider selection; credentials from tenant StorageEngineConfig",
"allOf": [
{
- "$ref": "#/definitions/types.StorageProviderConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.StorageProviderConfig"
}
]
},
@@ -11283,24 +11339,36 @@ const docTemplate = `{
"description": "Last updated time of the knowledge base",
"type": "string"
},
+ "vector_store_id": {
+ "description": "VectorStoreID references the VectorStore this knowledge base is bound to.\nWhen nil, the KB falls back to the tenant's effective engines derived from\nthe RETRIEVE_DRIVER environment variable (env store flow).\nThis field is set once at creation time and must not be modified afterwards;\nenforcement lives at the GORM layer (` + "`" + `\u003c-:create` + "`" + `) plus the service-layer\nKB update path, which omits this field from its update DTO.",
+ "type": "string"
+ },
"vlm_config": {
"description": "VLM config",
"allOf": [
{
- "$ref": "#/definitions/types.VLMConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig"
+ }
+ ]
+ },
+ "wiki_config": {
+ "description": "WikiConfig stores wiki-specific configuration (only for wiki type knowledge bases)",
+ "allOf": [
+ {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiConfig"
}
]
}
}
},
- "types.KnowledgeBaseConfig": {
+ "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseConfig": {
"type": "object",
"properties": {
"chunking_config": {
"description": "Chunking configuration",
"allOf": [
{
- "$ref": "#/definitions/types.ChunkingConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ChunkingConfig"
}
]
},
@@ -11308,7 +11376,7 @@ const docTemplate = `{
"description": "FAQ configuration (only for FAQ type knowledge bases)",
"allOf": [
{
- "$ref": "#/definitions/types.FAQConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQConfig"
}
]
},
@@ -11316,13 +11384,29 @@ const docTemplate = `{
"description": "Image processing configuration",
"allOf": [
{
- "$ref": "#/definitions/types.ImageProcessingConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig"
+ }
+ ]
+ },
+ "indexing_strategy": {
+ "description": "IndexingStrategy controls which indexing pipelines are active.\nnil means \"no change\" when updating (preserves existing strategy).",
+ "allOf": [
+ {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.IndexingStrategy"
+ }
+ ]
+ },
+ "wiki_config": {
+ "description": "Wiki configuration (only for wiki-enabled knowledge bases)",
+ "allOf": [
+ {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiConfig"
}
]
}
}
},
- "types.KnowledgeBaseShareResponse": {
+ "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse": {
"type": "object",
"properties": {
"chunk_count": {
@@ -11378,13 +11462,13 @@ const docTemplate = `{
}
}
},
- "types.ListMembersResponse": {
+ "github_com_Tencent_WeKnora_internal_types.ListMembersResponse": {
"type": "object",
"properties": {
"members": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.OrganizationMemberResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrganizationMemberResponse"
}
},
"total": {
@@ -11392,20 +11476,20 @@ const docTemplate = `{
}
}
},
- "types.ListOrganizationsResponse": {
+ "github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse": {
"type": "object",
"properties": {
"organizations": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.OrganizationResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrganizationResponse"
}
},
"resource_counts": {
"description": "各空间内知识库/智能体数量,供列表侧栏展示",
"allOf": [
{
- "$ref": "#/definitions/types.ResourceCountsByOrgResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ResourceCountsByOrgResponse"
}
]
},
@@ -11414,13 +11498,13 @@ const docTemplate = `{
}
}
},
- "types.ListSharesResponse": {
+ "github_com_Tencent_WeKnora_internal_types.ListSharesResponse": {
"type": "object",
"properties": {
"shares": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.KnowledgeBaseShareResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse"
}
},
"total": {
@@ -11428,7 +11512,7 @@ const docTemplate = `{
}
}
},
- "types.LocalEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.LocalEngineConfig": {
"type": "object",
"properties": {
"path_prefix": {
@@ -11436,7 +11520,7 @@ const docTemplate = `{
}
}
},
- "types.LoginRequest": {
+ "github_com_Tencent_WeKnora_internal_types.LoginRequest": {
"type": "object",
"required": [
"email",
@@ -11452,7 +11536,7 @@ const docTemplate = `{
}
}
},
- "types.LoginResponse": {
+ "github_com_Tencent_WeKnora_internal_types.LoginResponse": {
"type": "object",
"properties": {
"message": {
@@ -11465,17 +11549,17 @@ const docTemplate = `{
"type": "boolean"
},
"tenant": {
- "$ref": "#/definitions/types.Tenant"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
},
"token": {
"type": "string"
},
"user": {
- "$ref": "#/definitions/types.User"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.User"
}
}
},
- "types.MCPAdvancedConfig": {
+ "github_com_Tencent_WeKnora_internal_types.MCPAdvancedConfig": {
"type": "object",
"properties": {
"retry_count": {
@@ -11492,7 +11576,7 @@ const docTemplate = `{
}
}
},
- "types.MCPAuthConfig": {
+ "github_com_Tencent_WeKnora_internal_types.MCPAuthConfig": {
"type": "object",
"properties": {
"api_key": {
@@ -11509,26 +11593,26 @@ const docTemplate = `{
}
}
},
- "types.MCPEnvVars": {
+ "github_com_Tencent_WeKnora_internal_types.MCPEnvVars": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
- "types.MCPHeaders": {
+ "github_com_Tencent_WeKnora_internal_types.MCPHeaders": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
- "types.MCPService": {
+ "github_com_Tencent_WeKnora_internal_types.MCPService": {
"type": "object",
"properties": {
"advanced_config": {
- "$ref": "#/definitions/types.MCPAdvancedConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPAdvancedConfig"
},
"auth_config": {
- "$ref": "#/definitions/types.MCPAuthConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPAuthConfig"
},
"created_at": {
"type": "string"
@@ -11546,12 +11630,12 @@ const docTemplate = `{
"description": "Environment variables for stdio",
"allOf": [
{
- "$ref": "#/definitions/types.MCPEnvVars"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPEnvVars"
}
]
},
"headers": {
- "$ref": "#/definitions/types.MCPHeaders"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPHeaders"
},
"id": {
"type": "string"
@@ -11567,7 +11651,7 @@ const docTemplate = `{
"description": "Required for stdio transport",
"allOf": [
{
- "$ref": "#/definitions/types.MCPStdioConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPStdioConfig"
}
]
},
@@ -11575,7 +11659,7 @@ const docTemplate = `{
"type": "integer"
},
"transport_type": {
- "$ref": "#/definitions/types.MCPTransportType"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPTransportType"
},
"updated_at": {
"type": "string"
@@ -11586,7 +11670,7 @@ const docTemplate = `{
}
}
},
- "types.MCPStdioConfig": {
+ "github_com_Tencent_WeKnora_internal_types.MCPStdioConfig": {
"type": "object",
"properties": {
"args": {
@@ -11602,7 +11686,7 @@ const docTemplate = `{
}
}
},
- "types.MCPTransportType": {
+ "github_com_Tencent_WeKnora_internal_types.MCPTransportType": {
"type": "string",
"enum": [
"sse",
@@ -11625,7 +11709,7 @@ const docTemplate = `{
"MCPTransportStdio"
]
},
- "types.ManualKnowledgePayload": {
+ "github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload": {
"type": "object",
"properties": {
"channel": {
@@ -11645,7 +11729,7 @@ const docTemplate = `{
}
}
},
- "types.MatchType": {
+ "github_com_Tencent_WeKnora_internal_types.MatchType": {
"type": "integer",
"enum": [
0,
@@ -11691,7 +11775,7 @@ const docTemplate = `{
"MatchTypeDataAnalysis"
]
},
- "types.MentionedItem": {
+ "github_com_Tencent_WeKnora_internal_types.MentionedItem": {
"type": "object",
"properties": {
"id": {
@@ -11710,7 +11794,7 @@ const docTemplate = `{
}
}
},
- "types.Message": {
+ "github_com_Tencent_WeKnora_internal_types.Message": {
"type": "object",
"properties": {
"agent_duration_ms": {
@@ -11721,14 +11805,14 @@ const docTemplate = `{
"description": "Agent execution steps (only for assistant messages generated by agent)\nThis contains the detailed reasoning process and tool calls made by the agent\nStored for user history display, but NOT included in LLM context to avoid redundancy",
"type": "array",
"items": {
- "$ref": "#/definitions/types.AgentStep"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.AgentStep"
}
},
"attachments": {
"description": "Attached files (documents, audio, etc., for user messages)",
"type": "array",
"items": {
- "$ref": "#/definitions/types.MessageAttachment"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MessageAttachment"
}
},
"channel": {
@@ -11759,7 +11843,7 @@ const docTemplate = `{
"description": "Attached images with OCR/Caption text (for user messages)",
"type": "array",
"items": {
- "$ref": "#/definitions/types.MessageImage"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MessageImage"
}
},
"is_completed": {
@@ -11778,14 +11862,14 @@ const docTemplate = `{
"description": "References to knowledge chunks used in the response",
"type": "array",
"items": {
- "$ref": "#/definitions/types.SearchResult"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SearchResult"
}
},
"mentioned_items": {
"description": "Mentioned knowledge bases and files (for user messages)\nStores the @mentioned items when user sends a message",
"type": "array",
"items": {
- "$ref": "#/definitions/types.MentionedItem"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MentionedItem"
}
},
"request_id": {
@@ -11806,7 +11890,7 @@ const docTemplate = `{
}
}
},
- "types.MessageAttachment": {
+ "github_com_Tencent_WeKnora_internal_types.MessageAttachment": {
"type": "object",
"properties": {
"content": {
@@ -11839,7 +11923,7 @@ const docTemplate = `{
}
}
},
- "types.MessageImage": {
+ "github_com_Tencent_WeKnora_internal_types.MessageImage": {
"type": "object",
"properties": {
"caption": {
@@ -11850,7 +11934,7 @@ const docTemplate = `{
}
}
},
- "types.MinIOEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.MinIOEngineConfig": {
"type": "object",
"properties": {
"access_key_id": {
@@ -11877,7 +11961,7 @@ const docTemplate = `{
}
}
},
- "types.ModelParameters": {
+ "github_com_Tencent_WeKnora_internal_types.ModelParameters": {
"type": "object",
"properties": {
"api_key": {
@@ -11894,8 +11978,15 @@ const docTemplate = `{
"base_url": {
"type": "string"
},
+ "custom_headers": {
+ "description": "CustomHeaders 允许在调用远程模型 API 时附加自定义 HTTP 请求头,\n用途类似 Python OpenAI SDK 的 extra_headers 参数,\n常见场景包括透传企业网关鉴权信息、追踪 ID、路由标识等。\n保留字段(Authorization、api-key、Content-Type、Accept 等)会在运行期被忽略以避免破坏签名/鉴权流程。",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
"embedding_parameters": {
- "$ref": "#/definitions/types.EmbeddingParameters"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.EmbeddingParameters"
},
"extra_config": {
"description": "Provider-specific configuration",
@@ -11921,7 +12012,7 @@ const docTemplate = `{
}
}
},
- "types.ModelSource": {
+ "github_com_Tencent_WeKnora_internal_types.ModelSource": {
"type": "string",
"enum": [
"local",
@@ -12000,7 +12091,7 @@ const docTemplate = `{
"ModelSourceAzureOpenAI"
]
},
- "types.ModelType": {
+ "github_com_Tencent_WeKnora_internal_types.ModelType": {
"type": "string",
"enum": [
"Embedding",
@@ -12031,7 +12122,7 @@ const docTemplate = `{
"ModelTypeASR"
]
},
- "types.OIDCAuthURLResponse": {
+ "github_com_Tencent_WeKnora_internal_types.OIDCAuthURLResponse": {
"type": "object",
"properties": {
"authorization_url": {
@@ -12048,7 +12139,7 @@ const docTemplate = `{
}
}
},
- "types.OIDCConfigResponse": {
+ "github_com_Tencent_WeKnora_internal_types.OIDCConfigResponse": {
"type": "object",
"properties": {
"enabled": {
@@ -12062,7 +12153,7 @@ const docTemplate = `{
}
}
},
- "types.OSSEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.OSSEngineConfig": {
"type": "object",
"properties": {
"access_key": {
@@ -12094,7 +12185,7 @@ const docTemplate = `{
}
}
},
- "types.OrgMemberRole": {
+ "github_com_Tencent_WeKnora_internal_types.OrgMemberRole": {
"type": "string",
"enum": [
"admin",
@@ -12107,7 +12198,7 @@ const docTemplate = `{
"OrgRoleViewer"
]
},
- "types.OrganizationMemberResponse": {
+ "github_com_Tencent_WeKnora_internal_types.OrganizationMemberResponse": {
"type": "object",
"properties": {
"avatar": {
@@ -12136,7 +12227,7 @@ const docTemplate = `{
}
}
},
- "types.OrganizationResponse": {
+ "github_com_Tencent_WeKnora_internal_types.OrganizationResponse": {
"type": "object",
"properties": {
"agent_share_count": {
@@ -12206,7 +12297,7 @@ const docTemplate = `{
}
}
},
- "types.ParserEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ParserEngineConfig": {
"type": "object",
"properties": {
"mineru_api_key": {
@@ -12251,7 +12342,7 @@ const docTemplate = `{
}
}
},
- "types.ParserEngineRule": {
+ "github_com_Tencent_WeKnora_internal_types.ParserEngineRule": {
"type": "object",
"properties": {
"engine": {
@@ -12265,7 +12356,7 @@ const docTemplate = `{
}
}
},
- "types.QuestionGenerationConfig": {
+ "github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig": {
"type": "object",
"properties": {
"enabled": {
@@ -12277,7 +12368,7 @@ const docTemplate = `{
}
}
},
- "types.RegisterRequest": {
+ "github_com_Tencent_WeKnora_internal_types.RegisterRequest": {
"type": "object",
"required": [
"email",
@@ -12299,7 +12390,7 @@ const docTemplate = `{
}
}
},
- "types.RegisterResponse": {
+ "github_com_Tencent_WeKnora_internal_types.RegisterResponse": {
"type": "object",
"properties": {
"message": {
@@ -12309,14 +12400,14 @@ const docTemplate = `{
"type": "boolean"
},
"tenant": {
- "$ref": "#/definitions/types.Tenant"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
},
"user": {
- "$ref": "#/definitions/types.User"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.User"
}
}
},
- "types.RequestRoleUpgradeRequest": {
+ "github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest": {
"type": "object",
"required": [
"requested_role"
@@ -12331,13 +12422,13 @@ const docTemplate = `{
"description": "The role user wants to upgrade to",
"allOf": [
{
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
}
}
},
- "types.Resource": {
+ "github_com_Tencent_WeKnora_internal_types.Resource": {
"type": "object",
"properties": {
"description": {
@@ -12379,7 +12470,7 @@ const docTemplate = `{
}
}
},
- "types.ResourceCountsByOrgResponse": {
+ "github_com_Tencent_WeKnora_internal_types.ResourceCountsByOrgResponse": {
"type": "object",
"properties": {
"agents": {
@@ -12406,7 +12497,7 @@ const docTemplate = `{
}
}
},
- "types.RetrievalConfig": {
+ "github_com_Tencent_WeKnora_internal_types.RetrievalConfig": {
"type": "object",
"properties": {
"embedding_top_k": {
@@ -12435,14 +12526,14 @@ const docTemplate = `{
}
}
},
- "types.RetrieverEngineParams": {
+ "github_com_Tencent_WeKnora_internal_types.RetrieverEngineParams": {
"type": "object",
"properties": {
"retriever_engine_type": {
"description": "Retriever engine type",
"allOf": [
{
- "$ref": "#/definitions/types.RetrieverEngineType"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineType"
}
]
},
@@ -12450,13 +12541,13 @@ const docTemplate = `{
"description": "Retriever type",
"allOf": [
{
- "$ref": "#/definitions/types.RetrieverType"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverType"
}
]
}
}
},
- "types.RetrieverEngineType": {
+ "github_com_Tencent_WeKnora_internal_types.RetrieverEngineType": {
"type": "string",
"enum": [
"postgres",
@@ -12479,18 +12570,18 @@ const docTemplate = `{
"SQLiteRetrieverEngineType"
]
},
- "types.RetrieverEngines": {
+ "github_com_Tencent_WeKnora_internal_types.RetrieverEngines": {
"type": "object",
"properties": {
"engines": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.RetrieverEngineParams"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineParams"
}
}
}
},
- "types.RetrieverType": {
+ "github_com_Tencent_WeKnora_internal_types.RetrieverType": {
"type": "string",
"enum": [
"keywords",
@@ -12513,7 +12604,7 @@ const docTemplate = `{
"WebSearchRetrieverType"
]
},
- "types.ReviewJoinRequestRequest": {
+ "github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest": {
"type": "object",
"properties": {
"approved": {
@@ -12527,13 +12618,13 @@ const docTemplate = `{
"description": "Optional: role to assign when approving; overrides applicant's requested role",
"allOf": [
{
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
}
}
},
- "types.S3EngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.S3EngineConfig": {
"type": "object",
"properties": {
"access_key": {
@@ -12556,7 +12647,7 @@ const docTemplate = `{
}
}
},
- "types.SearchParams": {
+ "github_com_Tencent_WeKnora_internal_types.SearchParams": {
"type": "object",
"properties": {
"disable_keywords_match": {
@@ -12612,7 +12703,7 @@ const docTemplate = `{
}
}
},
- "types.SearchResult": {
+ "github_com_Tencent_WeKnora_internal_types.SearchResult": {
"type": "object",
"properties": {
"chunk_index": {
@@ -12678,7 +12769,7 @@ const docTemplate = `{
"description": "Match type",
"allOf": [
{
- "$ref": "#/definitions/types.MatchType"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MatchType"
}
]
},
@@ -12718,7 +12809,7 @@ const docTemplate = `{
}
}
},
- "types.Session": {
+ "github_com_Tencent_WeKnora_internal_types.Session": {
"type": "object",
"properties": {
"created_at": {
@@ -12748,7 +12839,7 @@ const docTemplate = `{
}
}
},
- "types.ShareKnowledgeBaseRequest": {
+ "github_com_Tencent_WeKnora_internal_types.ShareKnowledgeBaseRequest": {
"type": "object",
"required": [
"organization_id",
@@ -12759,11 +12850,11 @@ const docTemplate = `{
"type": "string"
},
"permission": {
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
}
},
- "types.StorageConfig": {
+ "github_com_Tencent_WeKnora_internal_types.StorageConfig": {
"type": "object",
"properties": {
"app_id": {
@@ -12789,34 +12880,34 @@ const docTemplate = `{
}
}
},
- "types.StorageEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.StorageEngineConfig": {
"type": "object",
"properties": {
"cos": {
- "$ref": "#/definitions/types.COSEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.COSEngineConfig"
},
"default_provider": {
"description": "\"local\", \"minio\", \"cos\", \"tos\", \"s3\", \"oss\"",
"type": "string"
},
"local": {
- "$ref": "#/definitions/types.LocalEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.LocalEngineConfig"
},
"minio": {
- "$ref": "#/definitions/types.MinIOEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MinIOEngineConfig"
},
"oss": {
- "$ref": "#/definitions/types.OSSEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OSSEngineConfig"
},
"s3": {
- "$ref": "#/definitions/types.S3EngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.S3EngineConfig"
},
"tos": {
- "$ref": "#/definitions/types.TOSEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.TOSEngineConfig"
}
}
},
- "types.StorageProviderConfig": {
+ "github_com_Tencent_WeKnora_internal_types.StorageProviderConfig": {
"type": "object",
"properties": {
"provider": {
@@ -12825,7 +12916,7 @@ const docTemplate = `{
}
}
},
- "types.SubmitJoinRequestRequest": {
+ "github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest": {
"type": "object",
"required": [
"invite_code"
@@ -12844,13 +12935,13 @@ const docTemplate = `{
"description": "Optional: role the applicant requests (admin/editor/viewer); default viewer",
"allOf": [
{
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
}
}
},
- "types.SyncLog": {
+ "github_com_Tencent_WeKnora_internal_types.SyncLog": {
"type": "object",
"properties": {
"created_at": {
@@ -12922,7 +13013,7 @@ const docTemplate = `{
}
}
},
- "types.TOSEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.TOSEngineConfig": {
"type": "object",
"properties": {
"access_key": {
@@ -12945,14 +13036,14 @@ const docTemplate = `{
}
}
},
- "types.Tenant": {
+ "github_com_Tencent_WeKnora_internal_types.Tenant": {
"type": "object",
"properties": {
"agent_config": {
"description": "Deprecated: AgentConfig is deprecated, use CustomAgent (builtin-smart-reasoning) config instead.\nThis field is kept for backward compatibility and will be removed in future versions.",
"allOf": [
{
- "$ref": "#/definitions/types.AgentConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.AgentConfig"
}
]
},
@@ -12968,7 +13059,7 @@ const docTemplate = `{
"description": "Chat history config: knowledge base configuration for indexing and searching chat messages via vector search",
"allOf": [
{
- "$ref": "#/definitions/types.ChatHistoryConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ChatHistoryConfig"
}
]
},
@@ -12976,7 +13067,7 @@ const docTemplate = `{
"description": "Global Context configuration for this tenant (default for all sessions)",
"allOf": [
{
- "$ref": "#/definitions/types.ContextConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ContextConfig"
}
]
},
@@ -12984,7 +13075,7 @@ const docTemplate = `{
"description": "Deprecated: ConversationConfig is deprecated, use CustomAgent (builtin-quick-answer) config instead.\nThis field is kept for backward compatibility and will be removed in future versions.",
"allOf": [
{
- "$ref": "#/definitions/types.ConversationConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ConversationConfig"
}
]
},
@@ -12996,7 +13087,7 @@ const docTemplate = `{
"description": "Credentials config: third-party provider credentials (e.g. WeKnoraCloud AppID/AppSecret)",
"allOf": [
{
- "$ref": "#/definitions/types.CredentialsConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CredentialsConfig"
}
]
},
@@ -13024,7 +13115,7 @@ const docTemplate = `{
"description": "Parser engine config overrides (MinerU endpoint, API key, etc.). Used when parsing documents; overrides env.",
"allOf": [
{
- "$ref": "#/definitions/types.ParserEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineConfig"
}
]
},
@@ -13032,7 +13123,7 @@ const docTemplate = `{
"description": "Retrieval config: global search/retrieval parameters shared by knowledge search and message search",
"allOf": [
{
- "$ref": "#/definitions/types.RetrievalConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrievalConfig"
}
]
},
@@ -13040,7 +13131,7 @@ const docTemplate = `{
"description": "Retriever engines",
"allOf": [
{
- "$ref": "#/definitions/types.RetrieverEngines"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngines"
}
]
},
@@ -13052,7 +13143,7 @@ const docTemplate = `{
"description": "Storage engine config: parameters for Local, MinIO, COS. Used for document/file storage and docreader.",
"allOf": [
{
- "$ref": "#/definitions/types.StorageEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.StorageEngineConfig"
}
]
},
@@ -13072,13 +13163,13 @@ const docTemplate = `{
"description": "Global WebSearch configuration for this tenant",
"allOf": [
{
- "$ref": "#/definitions/types.WebSearchConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WebSearchConfig"
}
]
}
}
},
- "types.ToolCall": {
+ "github_com_Tencent_WeKnora_internal_types.ToolCall": {
"type": "object",
"properties": {
"args": {
@@ -13106,13 +13197,13 @@ const docTemplate = `{
"description": "Execution result (contains Output)",
"allOf": [
{
- "$ref": "#/definitions/types.ToolResult"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ToolResult"
}
]
}
}
},
- "types.ToolResult": {
+ "github_com_Tencent_WeKnora_internal_types.ToolResult": {
"type": "object",
"properties": {
"data": {
@@ -13141,18 +13232,18 @@ const docTemplate = `{
}
}
},
- "types.UpdateMemberRoleRequest": {
+ "github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
}
},
- "types.UpdateOrganizationRequest": {
+ "github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest": {
"type": "object",
"properties": {
"avatar": {
@@ -13186,18 +13277,18 @@ const docTemplate = `{
}
}
},
- "types.UpdateSharePermissionRequest": {
+ "github_com_Tencent_WeKnora_internal_types.UpdateSharePermissionRequest": {
"type": "object",
"required": [
"permission"
],
"properties": {
"permission": {
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
}
},
- "types.User": {
+ "github_com_Tencent_WeKnora_internal_types.User": {
"type": "object",
"properties": {
"avatar": {
@@ -13236,7 +13327,7 @@ const docTemplate = `{
"description": "Association relationship, not stored in the database",
"allOf": [
{
- "$ref": "#/definitions/types.Tenant"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
}
]
},
@@ -13254,7 +13345,7 @@ const docTemplate = `{
}
}
},
- "types.VLMConfig": {
+ "github_com_Tencent_WeKnora_internal_types.VLMConfig": {
"type": "object",
"properties": {
"api_key": {
@@ -13281,7 +13372,7 @@ const docTemplate = `{
}
}
},
- "types.WeKnoraCloudCredentials": {
+ "github_com_Tencent_WeKnora_internal_types.WeKnoraCloudCredentials": {
"type": "object",
"properties": {
"app_id": {
@@ -13292,7 +13383,7 @@ const docTemplate = `{
}
}
},
- "types.WebSearchConfig": {
+ "github_com_Tencent_WeKnora_internal_types.WebSearchConfig": {
"type": "object",
"properties": {
"api_key": {
@@ -13334,11 +13425,1109 @@ const docTemplate = `{
"description": "Deprecated: Use WebSearchProviderEntity.Parameters.APIKey instead.",
"type": "string"
},
+ "proxy_url": {
+ "description": "Optional per-request proxy override; normally empty — use WebSearchProviderEntity.Parameters.proxy_url. Merged at call time when set.",
+ "type": "string"
+ },
"rerank_model_id": {
"description": "重排模型ID(用于RAG压缩)",
"type": "string"
}
}
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiConfig": {
+ "type": "object",
+ "properties": {
+ "extraction_granularity": {
+ "description": "ExtractionGranularity controls how many candidate slugs Pass 0 extracts\nper document. Empty / unknown value is treated as WikiExtractionStandard.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiExtractionGranularity"
+ }
+ ]
+ },
+ "max_pages_per_ingest": {
+ "description": "MaxPagesPerIngest limits pages created/updated per ingest operation (0 = no limit)",
+ "type": "integer"
+ },
+ "synthesis_model_id": {
+ "description": "SynthesisModelID is the LLM model ID used for wiki page generation and updates",
+ "type": "string"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiExtractionGranularity": {
+ "type": "string",
+ "enum": [
+ "focused",
+ "standard",
+ "exhaustive"
+ ],
+ "x-enum-varnames": [
+ "WikiExtractionFocused",
+ "WikiExtractionStandard",
+ "WikiExtractionExhaustive"
+ ]
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiGraphData": {
+ "type": "object",
+ "properties": {
+ "edges": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiGraphEdge"
+ }
+ },
+ "nodes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiGraphNode"
+ }
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiGraphEdge": {
+ "type": "object",
+ "properties": {
+ "source": {
+ "description": "source slug",
+ "type": "string"
+ },
+ "target": {
+ "description": "target slug",
+ "type": "string"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiGraphNode": {
+ "type": "object",
+ "properties": {
+ "link_count": {
+ "description": "Number of inbound + outbound links",
+ "type": "integer"
+ },
+ "page_type": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiPage": {
+ "type": "object",
+ "properties": {
+ "aliases": {
+ "description": "Alternate names, abbreviations, acronyms or translated names",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "chunk_refs": {
+ "description": "ChunkRefs records the specific source-document chunks this page was\nbuilt from — one UUID per cited chunk. Populated during ingest from\nthe chunk-citation pass; refreshed wholesale whenever the page is\nre-materialized. Empty for summary pages (they are document-level\nsynopses and don't carry chunk-level citations). Use this when you\nneed to surface the underlying evidence for a wiki page, or to\nretract citations when a source document is deleted.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "content": {
+ "description": "Full markdown content",
+ "type": "string"
+ },
+ "created_at": {
+ "description": "Creation time",
+ "type": "string"
+ },
+ "deleted_at": {
+ "description": "Soft delete",
+ "allOf": [
+ {
+ "$ref": "#/definitions/gorm.DeletedAt"
+ }
+ ]
+ },
+ "id": {
+ "description": "Unique identifier (UUID)",
+ "type": "string"
+ },
+ "in_links": {
+ "description": "Slugs of pages that link TO this page (backlinks)",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "knowledge_base_id": {
+ "description": "Knowledge base this page belongs to",
+ "type": "string"
+ },
+ "out_links": {
+ "description": "Slugs of pages this page links to (outbound links)",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "page_metadata": {
+ "description": "Arbitrary metadata (tags, categories, dates, etc.)",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ "page_type": {
+ "description": "Page type: summary, entity, concept, index, log, synthesis, comparison",
+ "type": "string"
+ },
+ "slug": {
+ "description": "URL-friendly slug for addressing, e.g. \"entity/acme-corp\", \"concept/rag\"\nUnique within a knowledge base",
+ "type": "string"
+ },
+ "source_refs": {
+ "description": "References to source knowledge IDs that contributed to this page.\nFormat matches the legacy \"\u003cknowledge_id\u003e|\u003cdoc_title\u003e\" convention used\nacross the ingest pipeline, so retract / display code can split on ` + "`" + `|` + "`" + `\nto recover the title. Document-level granularity.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "status": {
+ "description": "Page status: draft, published, archived",
+ "type": "string"
+ },
+ "summary": {
+ "description": "One-line summary for index listing",
+ "type": "string"
+ },
+ "tenant_id": {
+ "description": "Tenant ID for multi-tenant isolation",
+ "type": "integer"
+ },
+ "title": {
+ "description": "Human-readable title",
+ "type": "string"
+ },
+ "updated_at": {
+ "description": "Last update time",
+ "type": "string"
+ },
+ "version": {
+ "description": "Version number. Incremented only when a user-visible content field\n(title, content, summary, page_type, status) actually changes; pure\nbookkeeping writes (link maintenance, same-content re-ingest, status\nsync from background jobs) leave it untouched so it can be used as a\nreal \"the page was edited\" signal.",
+ "type": "integer"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiPageIssue": {
+ "type": "object",
+ "properties": {
+ "created_at": {
+ "type": "string"
+ },
+ "deleted_at": {
+ "$ref": "#/definitions/gorm.DeletedAt"
+ },
+ "description": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "issue_type": {
+ "type": "string"
+ },
+ "knowledge_base_id": {
+ "type": "string"
+ },
+ "reported_by": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ },
+ "suspected_knowledge_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "tenant_id": {
+ "type": "integer"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiPageListResponse": {
+ "type": "object",
+ "properties": {
+ "page": {
+ "type": "integer"
+ },
+ "page_size": {
+ "type": "integer"
+ },
+ "pages": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ },
+ "total": {
+ "type": "integer"
+ },
+ "total_pages": {
+ "type": "integer"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiStats": {
+ "type": "object",
+ "properties": {
+ "is_active": {
+ "description": "whether wiki ingestion is currently running",
+ "type": "boolean"
+ },
+ "orphan_count": {
+ "description": "pages with no inbound links",
+ "type": "integer"
+ },
+ "pages_by_type": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ "pending_issues": {
+ "description": "number of pending wiki issues",
+ "type": "integer"
+ },
+ "pending_tasks": {
+ "description": "number of documents waiting to be ingested",
+ "type": "integer"
+ },
+ "recent_updates": {
+ "description": "last N updated pages",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ },
+ "total_links": {
+ "type": "integer"
+ },
+ "total_pages": {
+ "type": "integer"
+ }
+ }
+ },
+ "gorm.DeletedAt": {
+ "type": "object",
+ "properties": {
+ "time": {
+ "type": "string"
+ },
+ "valid": {
+ "description": "Valid is true if Time is not NULL",
+ "type": "boolean"
+ }
+ }
+ },
+ "internal_handler.CopyKnowledgeBaseRequest": {
+ "type": "object",
+ "required": [
+ "source_id"
+ ],
+ "properties": {
+ "source_id": {
+ "type": "string"
+ },
+ "target_id": {
+ "type": "string"
+ },
+ "task_id": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.CreateAgentRequest": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "avatar": {
+ "type": "string"
+ },
+ "config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CustomAgentConfig"
+ },
+ "description": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.CreateModelRequest": {
+ "type": "object",
+ "required": [
+ "name",
+ "parameters",
+ "source",
+ "type"
+ ],
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "parameters": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelParameters"
+ },
+ "source": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSource"
+ },
+ "type": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType"
+ }
+ }
+ },
+ "internal_handler.CreateStoreRequest": {
+ "type": "object",
+ "required": [
+ "connection_config",
+ "engine_type",
+ "name"
+ ],
+ "properties": {
+ "connection_config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ConnectionConfig"
+ },
+ "engine_type": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineType"
+ },
+ "index_config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.IndexConfig"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.DeleteTagRequest": {
+ "type": "object",
+ "properties": {
+ "exclude_ids": {
+ "description": "Chunk seq_ids to exclude from deletion",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "internal_handler.EvaluationRequest": {
+ "type": "object",
+ "properties": {
+ "chat_id": {
+ "description": "ID of chat model to use",
+ "type": "string"
+ },
+ "dataset_id": {
+ "description": "ID of dataset to evaluate",
+ "type": "string"
+ },
+ "knowledge_base_id": {
+ "description": "ID of knowledge base to use",
+ "type": "string"
+ },
+ "rerank_id": {
+ "description": "ID of rerank model to use",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.FabriTextRequest": {
+ "type": "object",
+ "required": [
+ "model_id"
+ ],
+ "properties": {
+ "model_id": {
+ "type": "string"
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "internal_handler.GetStorageEngineStatusResponse": {
+ "type": "object",
+ "properties": {
+ "engines": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/internal_handler.StorageEngineStatusItem"
+ }
+ },
+ "minio_env_available": {
+ "type": "boolean"
+ }
+ }
+ },
+ "internal_handler.GetSystemInfoResponse": {
+ "type": "object",
+ "properties": {
+ "build_time": {
+ "type": "string"
+ },
+ "commit_id": {
+ "type": "string"
+ },
+ "db_version": {
+ "type": "string"
+ },
+ "edition": {
+ "type": "string"
+ },
+ "go_version": {
+ "type": "string"
+ },
+ "graph_database_engine": {
+ "type": "string"
+ },
+ "keyword_index_engine": {
+ "type": "string"
+ },
+ "minio_enabled": {
+ "type": "boolean"
+ },
+ "vector_store_engine": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.KBModelConfigRequest": {
+ "type": "object",
+ "required": [
+ "llmModelId"
+ ],
+ "properties": {
+ "asr_config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ASRConfig"
+ },
+ "documentSplitting": {
+ "description": "文档分块配置",
+ "type": "object",
+ "properties": {
+ "childChunkSize": {
+ "type": "integer"
+ },
+ "chunkOverlap": {
+ "type": "integer"
+ },
+ "chunkSize": {
+ "type": "integer"
+ },
+ "enableParentChild": {
+ "type": "boolean"
+ },
+ "parentChunkSize": {
+ "type": "integer"
+ },
+ "parserEngineRules": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineRule"
+ }
+ },
+ "separators": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "embeddingModelId": {
+ "description": "optional when RAG indexing is disabled",
+ "type": "string"
+ },
+ "llmModelId": {
+ "type": "string"
+ },
+ "multimodal": {
+ "description": "多模态配置(仅模型相关;存储引擎在 storageProvider 中配置)",
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ }
+ }
+ },
+ "nodeExtract": {
+ "description": "知识图谱配置",
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ },
+ "nodes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.GraphNode"
+ }
+ },
+ "relations": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.GraphRelation"
+ }
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "text": {
+ "type": "string"
+ }
+ }
+ },
+ "questionGeneration": {
+ "description": "问题生成配置",
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ },
+ "questionCount": {
+ "type": "integer"
+ }
+ }
+ },
+ "storageProvider": {
+ "description": "存储引擎选择(\"local\" | \"minio\" | \"cos\"),影响文档上传与文档内图片存储,参数从全局设置读取",
+ "type": "string"
+ },
+ "vlm_config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig"
+ }
+ }
+ },
+ "internal_handler.RemoteModelCheckRequest": {
+ "type": "object",
+ "required": [
+ "modelName"
+ ],
+ "properties": {
+ "apiKey": {
+ "type": "string"
+ },
+ "baseUrl": {
+ "type": "string"
+ },
+ "customHeaders": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "dimension": {
+ "type": "integer"
+ },
+ "extraConfig": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "interfaceType": {
+ "type": "string"
+ },
+ "modelName": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "source": {
+ "description": "为空时按需默认为 \"remote\"",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.SearchMessagesRequest": {
+ "type": "object",
+ "required": [
+ "query"
+ ],
+ "properties": {
+ "limit": {
+ "description": "Maximum number of results to return (default: 20)",
+ "type": "integer"
+ },
+ "mode": {
+ "description": "Search mode: \"keyword\", \"vector\", \"hybrid\" (default: \"hybrid\")",
+ "type": "string"
+ },
+ "query": {
+ "description": "Query text for search",
+ "type": "string"
+ },
+ "session_ids": {
+ "description": "Filter by specific session IDs (optional)",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "internal_handler.StorageCheckRequest": {
+ "type": "object",
+ "properties": {
+ "cos": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.COSEngineConfig"
+ },
+ "minio": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MinIOEngineConfig"
+ },
+ "oss": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OSSEngineConfig"
+ },
+ "provider": {
+ "description": "\"minio\", \"cos\", \"tos\", \"s3\", \"oss\"",
+ "type": "string"
+ },
+ "s3": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.S3EngineConfig"
+ },
+ "tos": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.TOSEngineConfig"
+ }
+ }
+ },
+ "internal_handler.StorageCheckResponse": {
+ "type": "object",
+ "properties": {
+ "bucket_created": {
+ "type": "boolean"
+ },
+ "message": {
+ "type": "string"
+ },
+ "ok": {
+ "type": "boolean"
+ }
+ }
+ },
+ "internal_handler.StorageEngineStatusItem": {
+ "type": "object",
+ "properties": {
+ "available": {
+ "description": "whether the engine can be used",
+ "type": "boolean"
+ },
+ "description": {
+ "description": "short description for UI",
+ "type": "string"
+ },
+ "name": {
+ "description": "\"local\", \"minio\", \"cos\", \"tos\"",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.TestStoreRequest": {
+ "type": "object",
+ "required": [
+ "connection_config",
+ "engine_type"
+ ],
+ "properties": {
+ "connection_config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ConnectionConfig"
+ },
+ "engine_type": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineType"
+ }
+ }
+ },
+ "internal_handler.TextRelationExtractionRequest": {
+ "type": "object",
+ "required": [
+ "model_id",
+ "tags",
+ "text"
+ ],
+ "properties": {
+ "model_id": {
+ "type": "string"
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "text": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.UpdateAgentRequest": {
+ "type": "object",
+ "properties": {
+ "avatar": {
+ "type": "string"
+ },
+ "config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CustomAgentConfig"
+ },
+ "description": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.UpdateChunkRequest": {
+ "type": "object",
+ "properties": {
+ "chunk_index": {
+ "type": "integer"
+ },
+ "content": {
+ "type": "string"
+ },
+ "embedding": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ },
+ "end_at": {
+ "type": "integer"
+ },
+ "image_info": {
+ "type": "string"
+ },
+ "is_enabled": {
+ "type": "boolean"
+ },
+ "start_at": {
+ "type": "integer"
+ }
+ }
+ },
+ "internal_handler.UpdateKnowledgeBaseRequest": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseConfig"
+ },
+ "description": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.UpdateModelRequest": {
+ "type": "object",
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "parameters": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelParameters"
+ },
+ "source": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSource"
+ },
+ "type": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType"
+ }
+ }
+ },
+ "internal_handler.UpdateStoreRequest": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.addSimilarQuestionsRequest": {
+ "type": "object",
+ "required": [
+ "similar_questions"
+ ],
+ "properties": {
+ "similar_questions": {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "internal_handler.updateLastFAQImportResultDisplayStatusRequest": {
+ "type": "object",
+ "required": [
+ "display_status"
+ ],
+ "properties": {
+ "display_status": {
+ "type": "string",
+ "enum": [
+ "open",
+ "close"
+ ]
+ }
+ }
+ },
+ "internal_handler_session.AttachmentUpload": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "description": "Base64-encoded file content",
+ "type": "string"
+ },
+ "file_name": {
+ "description": "Original filename",
+ "type": "string"
+ },
+ "file_size": {
+ "description": "File size in bytes",
+ "type": "integer"
+ }
+ }
+ },
+ "internal_handler_session.CreateKnowledgeQARequest": {
+ "type": "object",
+ "required": [
+ "query"
+ ],
+ "properties": {
+ "agent_enabled": {
+ "description": "Whether agent mode is enabled for this request",
+ "type": "boolean"
+ },
+ "agent_id": {
+ "description": "Selected custom agent ID (backend resolves shared agent and its tenant from share relation)",
+ "type": "string"
+ },
+ "attachment_uploads": {
+ "description": "Attached files (documents, audio, etc.)",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/internal_handler_session.AttachmentUpload"
+ }
+ },
+ "channel": {
+ "description": "Source channel: \"web\", \"api\", \"im\", etc.",
+ "type": "string"
+ },
+ "disable_title": {
+ "description": "Whether to disable auto title generation",
+ "type": "boolean"
+ },
+ "enable_memory": {
+ "description": "Whether memory feature is enabled for this request",
+ "type": "boolean"
+ },
+ "images": {
+ "description": "Attached images for multimodal chat",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/internal_handler_session.ImageAttachment"
+ }
+ },
+ "knowledge_base_ids": {
+ "description": "Selected knowledge base ID for this request",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "knowledge_ids": {
+ "description": "Selected knowledge ID for this request",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "mentioned_items": {
+ "description": "@mentioned knowledge bases and files",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/internal_handler_session.MentionedItemRequest"
+ }
+ },
+ "query": {
+ "description": "Query text for knowledge base search",
+ "type": "string"
+ },
+ "summary_model_id": {
+ "description": "Optional summary model ID for this request (overrides session default)",
+ "type": "string"
+ },
+ "web_search_enabled": {
+ "description": "Whether web search is enabled for this request",
+ "type": "boolean"
+ }
+ }
+ },
+ "internal_handler_session.CreateSessionRequest": {
+ "type": "object",
+ "properties": {
+ "description": {
+ "description": "Description for the session (optional)",
+ "type": "string"
+ },
+ "title": {
+ "description": "Title for the session (optional)",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler_session.GenerateTitleRequest": {
+ "type": "object",
+ "required": [
+ "messages"
+ ],
+ "properties": {
+ "messages": {
+ "description": "Messages to use as context for title generation",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Message"
+ }
+ }
+ }
+ },
+ "internal_handler_session.ImageAttachment": {
+ "type": "object",
+ "properties": {
+ "caption": {
+ "description": "VLM analysis result (context-aware, single call)",
+ "type": "string"
+ },
+ "data": {
+ "description": "base64 data URI from frontend (data:image/png;base64,...)",
+ "type": "string"
+ },
+ "url": {
+ "description": "serving URL after saving to storage",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler_session.MentionedItemRequest": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "kb_type": {
+ "description": "\"document\" or \"faq\" (only for kb type)",
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "description": "\"kb\" for knowledge base, \"file\" for file",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler_session.SearchKnowledgeRequest": {
+ "type": "object",
+ "required": [
+ "query"
+ ],
+ "properties": {
+ "knowledge_base_id": {
+ "description": "Single knowledge base ID (for backward compatibility)",
+ "type": "string"
+ },
+ "knowledge_base_ids": {
+ "description": "IDs of knowledge bases to search (multi-KB support)",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "knowledge_ids": {
+ "description": "IDs of specific knowledge (files) to search",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "query": {
+ "description": "Query text to search for",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler_session.StopSessionRequest": {
+ "type": "object",
+ "required": [
+ "message_id"
+ ],
+ "properties": {
+ "message_id": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler_session.batchDeleteRequest": {
+ "type": "object",
+ "properties": {
+ "delete_all": {
+ "type": "boolean"
+ },
+ "ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
}
},
"securityDefinitions": {
diff --git a/docs/images/architecture.png b/docs/images/architecture.png
index a163d968..dfb06f9a 100644
Binary files a/docs/images/architecture.png and b/docs/images/architecture.png differ
diff --git a/docs/images/wiki-browser.png b/docs/images/wiki-browser.png
new file mode 100644
index 00000000..ee98dbca
Binary files /dev/null and b/docs/images/wiki-browser.png differ
diff --git a/docs/images/wiki-graph.png b/docs/images/wiki-graph.png
new file mode 100644
index 00000000..671b49bf
Binary files /dev/null and b/docs/images/wiki-graph.png differ
diff --git a/docs/swagger.json b/docs/swagger.json
index 13adbdb1..198bd8b7 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -44,7 +44,7 @@
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -76,7 +76,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.CreateAgentRequest"
+ "$ref": "#/definitions/internal_handler.CreateAgentRequest"
}
}
],
@@ -91,7 +91,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -129,6 +129,38 @@
}
}
},
+ "/agents/type-presets": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ },
+ {
+ "ApiKeyAuth": []
+ }
+ ],
+ "description": "返回所有 smart-reasoning 下可用的智能体类型预设(RAG/Wiki/Hybrid/Custom),用于编辑器自动填充系统提示词、工具和 KB 兼容性",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "智能体"
+ ],
+ "summary": "获取智能体类型预设列表",
+ "responses": {
+ "200": {
+ "description": "预设列表",
+ "schema": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ }
+ }
+ }
+ },
"/agents/{id}": {
"get": {
"security": [
@@ -170,13 +202,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "智能体不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -215,7 +247,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.UpdateAgentRequest"
+ "$ref": "#/definitions/internal_handler.UpdateAgentRequest"
}
}
],
@@ -230,13 +262,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "无法修改内置智能体",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -281,19 +313,19 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "无法删除内置智能体",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "智能体不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -340,13 +372,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "智能体不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -411,13 +443,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "智能体不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -448,7 +480,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
}
},
@@ -482,7 +514,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
}
],
@@ -490,7 +522,7 @@
"201": {
"description": "Created",
"schema": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
},
"400": {
@@ -528,7 +560,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.SyncLog"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog"
}
},
"404": {
@@ -559,7 +591,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/datasource.ConnectorMetadata"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_datasource.ConnectorMetadata"
}
}
}
@@ -635,7 +667,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
},
"404": {
@@ -675,7 +707,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
}
],
@@ -683,7 +715,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.DataSource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource"
}
},
"400": {
@@ -765,7 +797,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.SyncLog"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog"
}
}
},
@@ -844,7 +876,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.Resource"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Resource"
}
}
},
@@ -918,7 +950,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.SyncLog"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog"
}
},
"400": {
@@ -971,6 +1003,681 @@
}
}
},
+ "/api/v1/knowledgebase/{kb_id}/wiki/auto-fix": {
+ "post": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Automatically fix fixable wiki issues (broken links, etc.)",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Auto-fix wiki issues",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/graph": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Returns the wiki link graph data for visualization",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Get wiki link graph",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiGraphData"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/index": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Returns the wiki index page (creates default if not exists)",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Get wiki index page",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/issues": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "List issues flagged on wiki pages with optional filtering",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "List wiki page issues",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Filter by page slug",
+ "name": "slug",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Filter by status (pending, ignored, resolved)",
+ "name": "status",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPageIssue"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/issues/{issue_id}/status": {
+ "put": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Update the status of a flagged wiki page issue",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Update wiki page issue status",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Issue ID",
+ "name": "issue_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "New status {'status': 'ignored'}",
+ "name": "status",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "object"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/lint": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Perform a comprehensive health check on the wiki",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Run wiki lint",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintReport"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/log": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Returns the wiki operation log page (creates default if not exists)",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Get wiki operation log",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/pages": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "List wiki pages with optional filtering and pagination",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "List wiki pages",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Filter by page type",
+ "name": "page_type",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Filter by status",
+ "name": "status",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Full-text search",
+ "name": "query",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "Page number",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "Page size",
+ "name": "page_size",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Sort field",
+ "name": "sort_by",
+ "in": "query"
+ },
+ {
+ "type": "string",
+ "description": "Sort order (asc/desc)",
+ "name": "sort_order",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPageListResponse"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ },
+ "post": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Create a new wiki page in the knowledge base",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Create a wiki page",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "Wiki page data",
+ "name": "page",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "Created",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/pages/{slug}": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Retrieve a wiki page by its slug",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Get a wiki page by slug",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Page slug",
+ "name": "slug",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ },
+ "404": {
+ "description": "Not Found",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ },
+ "put": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Update an existing wiki page by slug",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Update a wiki page",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Page slug",
+ "name": "slug",
+ "in": "path",
+ "required": true
+ },
+ {
+ "description": "Updated wiki page data",
+ "name": "page",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ },
+ "404": {
+ "description": "Not Found",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ },
+ "delete": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Soft-delete a wiki page by slug",
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Delete a wiki page",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Page slug",
+ "name": "slug",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content"
+ },
+ "404": {
+ "description": "Not Found",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/rebuild-links": {
+ "post": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Re-parse all pages and rebuild bidirectional link references",
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Rebuild wiki links",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/search": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Full-text search over wiki pages",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Search wiki pages",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "Search query",
+ "name": "q",
+ "in": "query",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "Max results (default 10)",
+ "name": "limit",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/knowledgebase/{kb_id}/wiki/stats": {
+ "get": {
+ "security": [
+ {
+ "Bearer": []
+ }
+ ],
+ "description": "Returns aggregate statistics about the wiki",
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Wiki"
+ ],
+ "summary": "Get wiki statistics",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "Knowledge base ID",
+ "name": "kb_id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiStats"
+ }
+ }
+ }
+ }
+ },
"/auth/auto-setup": {
"post": {
"description": "Lite 版专用:首次启动时自动创建默认用户和租户并返回令牌,后续启动直接签发令牌,免除手动注册/登录流程",
@@ -988,13 +1695,13 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.LoginResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.LoginResponse"
}
},
"403": {
"description": "非 Lite 版本",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1048,7 +1755,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1074,7 +1781,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.LoginRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.LoginRequest"
}
}
],
@@ -1082,13 +1789,13 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.LoginResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.LoginResponse"
}
},
"401": {
"description": "认证失败",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1123,7 +1830,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1158,7 +1865,7 @@
"401": {
"description": "未授权",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1221,7 +1928,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.OIDCConfigResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OIDCConfigResponse"
}
}
}
@@ -1253,19 +1960,19 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.OIDCAuthURLResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OIDCAuthURLResponse"
}
},
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "OIDC未启用",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1311,7 +2018,7 @@
"401": {
"description": "令牌无效",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1337,7 +2044,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.RegisterRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RegisterRequest"
}
}
],
@@ -1345,19 +2052,19 @@
"201": {
"description": "Created",
"schema": {
- "$ref": "#/definitions/types.RegisterResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RegisterResponse"
}
},
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "注册功能已禁用",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1392,7 +2099,7 @@
"401": {
"description": "令牌无效",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1439,13 +2146,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "分块不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1506,13 +2213,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "分块不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1573,7 +2280,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1618,7 +2325,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1666,7 +2373,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.UpdateChunkRequest"
+ "$ref": "#/definitions/internal_handler.UpdateChunkRequest"
}
}
],
@@ -1681,13 +2388,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "分块不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1739,13 +2446,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "分块不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1792,7 +2499,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1824,7 +2531,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.EvaluationRequest"
+ "$ref": "#/definitions/internal_handler.EvaluationRequest"
}
}
],
@@ -1839,7 +2546,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1886,7 +2593,7 @@
"404": {
"description": "任务不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1920,7 +2627,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.TextRelationExtractionRequest"
+ "$ref": "#/definitions/internal_handler.TextRelationExtractionRequest"
}
}
],
@@ -1935,7 +2642,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -1993,7 +2700,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.FabriTextRequest"
+ "$ref": "#/definitions/internal_handler.FabriTextRequest"
}
}
],
@@ -2008,7 +2715,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2064,7 +2771,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2111,7 +2818,7 @@
"404": {
"description": "知识库不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2150,7 +2857,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.KBModelConfigRequest"
+ "$ref": "#/definitions/internal_handler.KBModelConfigRequest"
}
}
],
@@ -2165,13 +2872,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "知识库不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2220,7 +2927,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2269,7 +2976,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2303,7 +3010,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.RemoteModelCheckRequest"
+ "$ref": "#/definitions/internal_handler.RemoteModelCheckRequest"
}
}
],
@@ -2318,7 +3025,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2367,7 +3074,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2447,7 +3154,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2526,7 +3233,7 @@
"404": {
"description": "任务不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2564,7 +3271,7 @@
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2621,7 +3328,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2675,7 +3382,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2745,7 +3452,7 @@
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2777,7 +3484,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.KnowledgeBase"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBase"
}
}
],
@@ -2792,7 +3499,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2826,7 +3533,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.CopyKnowledgeBaseRequest"
+ "$ref": "#/definitions/internal_handler.CopyKnowledgeBaseRequest"
}
}
],
@@ -2841,7 +3548,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2888,7 +3595,7 @@
"404": {
"description": "任务不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2941,13 +3648,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "知识库不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -2986,7 +3693,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.UpdateKnowledgeBaseRequest"
+ "$ref": "#/definitions/internal_handler.UpdateKnowledgeBaseRequest"
}
}
],
@@ -3001,7 +3708,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3046,7 +3753,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3129,7 +3836,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3168,7 +3875,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.FAQBatchUpsertPayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQBatchUpsertPayload"
}
}
],
@@ -3183,7 +3890,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3245,7 +3952,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3291,7 +3998,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3332,7 +4039,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.FAQEntryFieldsBatchUpdate"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsBatchUpdate"
}
}
],
@@ -3347,7 +4054,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3403,7 +4110,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3457,13 +4164,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "条目不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3509,7 +4216,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.FAQEntryPayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload"
}
}
],
@@ -3524,7 +4231,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3572,7 +4279,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.addSimilarQuestionsRequest"
+ "$ref": "#/definitions/internal_handler.addSimilarQuestionsRequest"
}
}
],
@@ -3587,13 +4294,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "条目不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3634,7 +4341,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.FAQEntryPayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload"
}
}
],
@@ -3649,7 +4356,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3690,7 +4397,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.updateLastFAQImportResultDisplayStatusRequest"
+ "$ref": "#/definitions/internal_handler.updateLastFAQImportResultDisplayStatusRequest"
}
}
],
@@ -3705,13 +4412,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "知识库不存在或无导入记录",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3752,7 +4459,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.FAQSearchRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQSearchRequest"
}
}
],
@@ -3767,7 +4474,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3808,7 +4515,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.SearchParams"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SearchParams"
}
}
],
@@ -3823,7 +4530,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3900,7 +4607,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -3945,13 +4652,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "权限不足",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4023,7 +4730,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"409": {
@@ -4071,7 +4778,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.ManualKnowledgePayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload"
}
}
],
@@ -4086,7 +4793,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4162,7 +4869,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"409": {
@@ -4216,7 +4923,7 @@
"404": {
"description": "知识库不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4250,7 +4957,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.ListSharesResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse"
}
}
}
@@ -4286,7 +4993,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.ShareKnowledgeBaseRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ShareKnowledgeBaseRequest"
}
}
],
@@ -4346,7 +5053,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.UpdateSharePermissionRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateSharePermissionRequest"
}
}
],
@@ -4469,7 +5176,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4534,7 +5241,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4597,7 +5304,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4654,7 +5361,7 @@
"name": "body",
"in": "body",
"schema": {
- "$ref": "#/definitions/handler.DeleteTagRequest"
+ "$ref": "#/definitions/internal_handler.DeleteTagRequest"
}
}
],
@@ -4669,7 +5376,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4732,7 +5439,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4800,7 +5507,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4841,7 +5548,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.ManualKnowledgePayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload"
}
}
],
@@ -4856,7 +5563,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4926,7 +5633,7 @@
"400": {
"description": "Invalid request",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -4975,7 +5682,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5022,13 +5729,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "知识不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5067,7 +5774,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.Knowledge"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Knowledge"
}
}
],
@@ -5082,7 +5789,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5127,7 +5834,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5173,7 +5880,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5222,7 +5929,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5269,13 +5976,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "权限不足",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5313,7 +6020,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5345,7 +6052,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.MCPService"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPService"
}
}
],
@@ -5360,7 +6067,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5407,7 +6114,7 @@
"404": {
"description": "服务不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5461,7 +6168,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5506,7 +6213,7 @@
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5553,7 +6260,7 @@
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5600,7 +6307,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5647,7 +6354,7 @@
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5713,7 +6420,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.SearchMessagesRequest"
+ "$ref": "#/definitions/internal_handler.SearchMessagesRequest"
}
}
],
@@ -5728,7 +6435,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5788,7 +6495,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5842,7 +6549,7 @@
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5880,7 +6587,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -5912,7 +6619,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.CreateModelRequest"
+ "$ref": "#/definitions/internal_handler.CreateModelRequest"
}
}
],
@@ -5927,7 +6634,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -6014,7 +6721,7 @@
"404": {
"description": "模型不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -6053,7 +6760,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.UpdateModelRequest"
+ "$ref": "#/definitions/internal_handler.UpdateModelRequest"
}
}
],
@@ -6068,7 +6775,7 @@
"404": {
"description": "模型不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -6113,7 +6820,7 @@
"404": {
"description": "模型不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -6138,7 +6845,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.ListOrganizationsResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse"
}
}
}
@@ -6167,7 +6874,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.CreateOrganizationRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest"
}
}
],
@@ -6213,7 +6920,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.JoinOrganizationRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest"
}
}
],
@@ -6259,7 +6966,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.JoinByOrganizationIDRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest"
}
}
],
@@ -6305,7 +7012,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.SubmitJoinRequestRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest"
}
}
],
@@ -6479,7 +7186,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.UpdateOrganizationRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest"
}
}
],
@@ -6568,7 +7275,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.InviteMemberRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.InviteMemberRequest"
}
}
],
@@ -6716,7 +7423,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.ReviewJoinRequestRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest"
}
}
],
@@ -6803,7 +7510,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.ListMembersResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListMembersResponse"
}
}
}
@@ -6848,7 +7555,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.UpdateMemberRoleRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest"
}
}
],
@@ -6944,7 +7651,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.RequestRoleUpgradeRequest"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest"
}
}
],
@@ -7118,7 +7825,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/types.ListSharesResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse"
}
}
}
@@ -7170,7 +7877,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7202,7 +7909,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.CreateSessionRequest"
+ "$ref": "#/definitions/internal_handler_session.CreateSessionRequest"
}
}
],
@@ -7217,7 +7924,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7251,7 +7958,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.batchDeleteRequest"
+ "$ref": "#/definitions/internal_handler_session.batchDeleteRequest"
}
}
],
@@ -7266,7 +7973,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7300,7 +8007,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.SearchKnowledgeRequest"
+ "$ref": "#/definitions/internal_handler_session.SearchKnowledgeRequest"
}
}
],
@@ -7315,7 +8022,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7362,7 +8069,7 @@
"404": {
"description": "会话不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7401,7 +8108,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.Session"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Session"
}
}
],
@@ -7416,7 +8123,7 @@
"404": {
"description": "会话不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7461,7 +8168,7 @@
"404": {
"description": "会话不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7508,13 +8215,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "会话不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7555,7 +8262,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.CreateKnowledgeQARequest"
+ "$ref": "#/definitions/internal_handler_session.CreateKnowledgeQARequest"
}
}
],
@@ -7570,7 +8277,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7624,7 +8331,7 @@
"404": {
"description": "会话或消息不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7665,7 +8372,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.CreateKnowledgeQARequest"
+ "$ref": "#/definitions/internal_handler_session.CreateKnowledgeQARequest"
}
}
],
@@ -7680,7 +8387,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7721,7 +8428,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.StopSessionRequest"
+ "$ref": "#/definitions/internal_handler_session.StopSessionRequest"
}
}
],
@@ -7736,7 +8443,7 @@
"404": {
"description": "会话或消息不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7777,7 +8484,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler_session.GenerateTitleRequest"
+ "$ref": "#/definitions/internal_handler_session.GenerateTitleRequest"
}
}
],
@@ -7792,7 +8499,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7856,7 +8563,7 @@
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -7909,7 +8616,7 @@
"200": {
"description": "系统信息",
"schema": {
- "$ref": "#/definitions/handler.GetSystemInfoResponse"
+ "$ref": "#/definitions/internal_handler.GetSystemInfoResponse"
}
}
}
@@ -7985,7 +8692,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.StorageCheckRequest"
+ "$ref": "#/definitions/internal_handler.StorageCheckRequest"
}
}
],
@@ -7993,7 +8700,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/handler.StorageCheckResponse"
+ "$ref": "#/definitions/internal_handler.StorageCheckResponse"
}
}
}
@@ -8013,7 +8720,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/handler.GetStorageEngineStatusResponse"
+ "$ref": "#/definitions/internal_handler.GetStorageEngineStatusResponse"
}
}
}
@@ -8048,7 +8755,7 @@
"500": {
"description": "服务器错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8077,7 +8784,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.Tenant"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
}
}
],
@@ -8092,7 +8799,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8127,7 +8834,7 @@
"403": {
"description": "权限不足",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8165,7 +8872,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8203,7 +8910,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8241,7 +8948,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8279,7 +8986,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8326,7 +9033,7 @@
"400": {
"description": "不支持的键",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8380,7 +9087,7 @@
"400": {
"description": "不支持的键",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8446,7 +9153,7 @@
"403": {
"description": "权限不足",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8493,13 +9200,13 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"404": {
"description": "租户不存在",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8535,7 +9242,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/types.Tenant"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
}
}
],
@@ -8550,7 +9257,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8592,7 +9299,7 @@
"400": {
"description": "请求参数错误",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8660,7 +9367,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.CreateStoreRequest"
+ "$ref": "#/definitions/internal_handler.CreateStoreRequest"
}
}
],
@@ -8675,7 +9382,7 @@
"400": {
"description": "Invalid request or validation error",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"401": {
@@ -8688,7 +9395,7 @@
"409": {
"description": "Duplicate endpoint and index",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
@@ -8722,7 +9429,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.TestStoreRequest"
+ "$ref": "#/definitions/internal_handler.TestStoreRequest"
}
}
],
@@ -8737,7 +9444,7 @@
"400": {
"description": "Invalid request",
"schema": {
- "$ref": "#/definitions/errors.AppError"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"401": {
@@ -8856,7 +9563,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/handler.UpdateStoreRequest"
+ "$ref": "#/definitions/internal_handler.UpdateStoreRequest"
}
}
],
@@ -9003,7 +9710,87 @@
}
},
"definitions": {
- "datasource.ConnectorMetadata": {
+ "github_com_Tencent_WeKnora_internal_application_service.WikiLintIssue": {
+ "type": "object",
+ "properties": {
+ "auto_fixable": {
+ "type": "boolean"
+ },
+ "description": {
+ "type": "string"
+ },
+ "page_slug": {
+ "type": "string"
+ },
+ "severity": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueSeverity"
+ },
+ "target_slug": {
+ "description": "TargetSlug identifies the other page involved in the issue (e.g. the\nbroken link target, or the entity slug for a missing cross-ref). It is\nthe structured field used by AutoFix instead of parsing Description.",
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueType"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueSeverity": {
+ "type": "string",
+ "enum": [
+ "info",
+ "warning",
+ "error"
+ ],
+ "x-enum-varnames": [
+ "SeverityInfo",
+ "SeverityWarning",
+ "SeverityError"
+ ]
+ },
+ "github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueType": {
+ "type": "string",
+ "enum": [
+ "orphan_page",
+ "broken_link",
+ "stale_ref",
+ "missing_cross_ref",
+ "empty_content",
+ "duplicate_slug"
+ ],
+ "x-enum-varnames": [
+ "LintIssueOrphanPage",
+ "LintIssueBrokenLink",
+ "LintIssueStaleRef",
+ "LintIssueMissingCrossRef",
+ "LintIssueEmptyContent",
+ "LintIssueDuplicateSlug"
+ ]
+ },
+ "github_com_Tencent_WeKnora_internal_application_service.WikiLintReport": {
+ "type": "object",
+ "properties": {
+ "health_score": {
+ "description": "0-100",
+ "type": "integer"
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintIssue"
+ }
+ },
+ "knowledge_base_id": {
+ "type": "string"
+ },
+ "stats": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiStats"
+ },
+ "summary": {
+ "type": "string"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_datasource.ConnectorMetadata": {
"type": "object",
"properties": {
"auth_type": {
@@ -9035,11 +9822,11 @@
}
}
},
- "errors.AppError": {
+ "github_com_Tencent_WeKnora_internal_errors.AppError": {
"type": "object",
"properties": {
"code": {
- "$ref": "#/definitions/errors.ErrorCode"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.ErrorCode"
},
"details": {},
"message": {
@@ -9047,7 +9834,7 @@
}
}
},
- "errors.ErrorCode": {
+ "github_com_Tencent_WeKnora_internal_errors.ErrorCode": {
"type": "integer",
"enum": [
1000,
@@ -9094,799 +9881,7 @@
"ErrAgentInvalidTemperature"
]
},
- "github_com_Tencent_WeKnora_internal_errors.AppError": {
- "type": "object",
- "properties": {
- "code": {
- "$ref": "#/definitions/errors.ErrorCode"
- },
- "details": {},
- "message": {
- "type": "string"
- }
- }
- },
- "gorm.DeletedAt": {
- "type": "object",
- "properties": {
- "time": {
- "type": "string"
- },
- "valid": {
- "description": "Valid is true if Time is not NULL",
- "type": "boolean"
- }
- }
- },
- "handler.CopyKnowledgeBaseRequest": {
- "type": "object",
- "required": [
- "source_id"
- ],
- "properties": {
- "source_id": {
- "type": "string"
- },
- "target_id": {
- "type": "string"
- },
- "task_id": {
- "type": "string"
- }
- }
- },
- "handler.CreateAgentRequest": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "avatar": {
- "type": "string"
- },
- "config": {
- "$ref": "#/definitions/types.CustomAgentConfig"
- },
- "description": {
- "type": "string"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "handler.CreateModelRequest": {
- "type": "object",
- "required": [
- "name",
- "parameters",
- "source",
- "type"
- ],
- "properties": {
- "description": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "parameters": {
- "$ref": "#/definitions/types.ModelParameters"
- },
- "source": {
- "$ref": "#/definitions/types.ModelSource"
- },
- "type": {
- "$ref": "#/definitions/types.ModelType"
- }
- }
- },
- "handler.CreateStoreRequest": {
- "type": "object",
- "required": [
- "connection_config",
- "engine_type",
- "name"
- ],
- "properties": {
- "connection_config": {
- "$ref": "#/definitions/types.ConnectionConfig"
- },
- "engine_type": {
- "$ref": "#/definitions/types.RetrieverEngineType"
- },
- "index_config": {
- "$ref": "#/definitions/types.IndexConfig"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "handler.DeleteTagRequest": {
- "type": "object",
- "properties": {
- "exclude_ids": {
- "description": "Chunk seq_ids to exclude from deletion",
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- }
- },
- "handler.EvaluationRequest": {
- "type": "object",
- "properties": {
- "chat_id": {
- "description": "ID of chat model to use",
- "type": "string"
- },
- "dataset_id": {
- "description": "ID of dataset to evaluate",
- "type": "string"
- },
- "knowledge_base_id": {
- "description": "ID of knowledge base to use",
- "type": "string"
- },
- "rerank_id": {
- "description": "ID of rerank model to use",
- "type": "string"
- }
- }
- },
- "handler.FabriTextRequest": {
- "type": "object",
- "required": [
- "model_id"
- ],
- "properties": {
- "model_id": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "handler.GetStorageEngineStatusResponse": {
- "type": "object",
- "properties": {
- "engines": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/handler.StorageEngineStatusItem"
- }
- },
- "minio_env_available": {
- "type": "boolean"
- }
- }
- },
- "handler.GetSystemInfoResponse": {
- "type": "object",
- "properties": {
- "build_time": {
- "type": "string"
- },
- "commit_id": {
- "type": "string"
- },
- "db_version": {
- "type": "string"
- },
- "edition": {
- "type": "string"
- },
- "go_version": {
- "type": "string"
- },
- "graph_database_engine": {
- "type": "string"
- },
- "keyword_index_engine": {
- "type": "string"
- },
- "minio_enabled": {
- "type": "boolean"
- },
- "vector_store_engine": {
- "type": "string"
- },
- "version": {
- "type": "string"
- }
- }
- },
- "handler.KBModelConfigRequest": {
- "type": "object",
- "required": [
- "embeddingModelId",
- "llmModelId"
- ],
- "properties": {
- "asr_config": {
- "$ref": "#/definitions/types.ASRConfig"
- },
- "documentSplitting": {
- "description": "文档分块配置",
- "type": "object",
- "properties": {
- "childChunkSize": {
- "type": "integer"
- },
- "chunkOverlap": {
- "type": "integer"
- },
- "chunkSize": {
- "type": "integer"
- },
- "enableParentChild": {
- "type": "boolean"
- },
- "parentChunkSize": {
- "type": "integer"
- },
- "parserEngineRules": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/types.ParserEngineRule"
- }
- },
- "separators": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "embeddingModelId": {
- "type": "string"
- },
- "llmModelId": {
- "type": "string"
- },
- "multimodal": {
- "description": "多模态配置(仅模型相关;存储引擎在 storageProvider 中配置)",
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- }
- }
- },
- "nodeExtract": {
- "description": "知识图谱配置",
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- },
- "nodes": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/types.GraphNode"
- }
- },
- "relations": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/types.GraphRelation"
- }
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "text": {
- "type": "string"
- }
- }
- },
- "questionGeneration": {
- "description": "问题生成配置",
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- },
- "questionCount": {
- "type": "integer"
- }
- }
- },
- "storageProvider": {
- "description": "存储引擎选择(\"local\" | \"minio\" | \"cos\"),影响文档上传与文档内图片存储,参数从全局设置读取",
- "type": "string"
- },
- "vlm_config": {
- "$ref": "#/definitions/types.VLMConfig"
- }
- }
- },
- "handler.RemoteModelCheckRequest": {
- "type": "object",
- "required": [
- "baseUrl",
- "modelName"
- ],
- "properties": {
- "apiKey": {
- "type": "string"
- },
- "baseUrl": {
- "type": "string"
- },
- "modelName": {
- "type": "string"
- },
- "provider": {
- "type": "string"
- }
- }
- },
- "handler.SearchMessagesRequest": {
- "type": "object",
- "required": [
- "query"
- ],
- "properties": {
- "limit": {
- "description": "Maximum number of results to return (default: 20)",
- "type": "integer"
- },
- "mode": {
- "description": "Search mode: \"keyword\", \"vector\", \"hybrid\" (default: \"hybrid\")",
- "type": "string"
- },
- "query": {
- "description": "Query text for search",
- "type": "string"
- },
- "session_ids": {
- "description": "Filter by specific session IDs (optional)",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "handler.StorageCheckRequest": {
- "type": "object",
- "properties": {
- "cos": {
- "$ref": "#/definitions/types.COSEngineConfig"
- },
- "minio": {
- "$ref": "#/definitions/types.MinIOEngineConfig"
- },
- "oss": {
- "$ref": "#/definitions/types.OSSEngineConfig"
- },
- "provider": {
- "description": "\"minio\", \"cos\", \"tos\", \"s3\", \"oss\"",
- "type": "string"
- },
- "s3": {
- "$ref": "#/definitions/types.S3EngineConfig"
- },
- "tos": {
- "$ref": "#/definitions/types.TOSEngineConfig"
- }
- }
- },
- "handler.StorageCheckResponse": {
- "type": "object",
- "properties": {
- "bucket_created": {
- "type": "boolean"
- },
- "message": {
- "type": "string"
- },
- "ok": {
- "type": "boolean"
- }
- }
- },
- "handler.StorageEngineStatusItem": {
- "type": "object",
- "properties": {
- "available": {
- "description": "whether the engine can be used",
- "type": "boolean"
- },
- "description": {
- "description": "short description for UI",
- "type": "string"
- },
- "name": {
- "description": "\"local\", \"minio\", \"cos\", \"tos\"",
- "type": "string"
- }
- }
- },
- "handler.TestStoreRequest": {
- "type": "object",
- "required": [
- "connection_config",
- "engine_type"
- ],
- "properties": {
- "connection_config": {
- "$ref": "#/definitions/types.ConnectionConfig"
- },
- "engine_type": {
- "$ref": "#/definitions/types.RetrieverEngineType"
- }
- }
- },
- "handler.TextRelationExtractionRequest": {
- "type": "object",
- "required": [
- "model_id",
- "tags",
- "text"
- ],
- "properties": {
- "model_id": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "text": {
- "type": "string"
- }
- }
- },
- "handler.UpdateAgentRequest": {
- "type": "object",
- "properties": {
- "avatar": {
- "type": "string"
- },
- "config": {
- "$ref": "#/definitions/types.CustomAgentConfig"
- },
- "description": {
- "type": "string"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "handler.UpdateChunkRequest": {
- "type": "object",
- "properties": {
- "chunk_index": {
- "type": "integer"
- },
- "content": {
- "type": "string"
- },
- "embedding": {
- "type": "array",
- "items": {
- "type": "number"
- }
- },
- "end_at": {
- "type": "integer"
- },
- "image_info": {
- "type": "string"
- },
- "is_enabled": {
- "type": "boolean"
- },
- "start_at": {
- "type": "integer"
- }
- }
- },
- "handler.UpdateKnowledgeBaseRequest": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "config": {
- "$ref": "#/definitions/types.KnowledgeBaseConfig"
- },
- "description": {
- "type": "string"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "handler.UpdateModelRequest": {
- "type": "object",
- "properties": {
- "description": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "parameters": {
- "$ref": "#/definitions/types.ModelParameters"
- },
- "source": {
- "$ref": "#/definitions/types.ModelSource"
- },
- "type": {
- "$ref": "#/definitions/types.ModelType"
- }
- }
- },
- "handler.UpdateStoreRequest": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string"
- }
- }
- },
- "handler.addSimilarQuestionsRequest": {
- "type": "object",
- "required": [
- "similar_questions"
- ],
- "properties": {
- "similar_questions": {
- "type": "array",
- "minItems": 1,
- "items": {
- "type": "string"
- }
- }
- }
- },
- "handler.updateLastFAQImportResultDisplayStatusRequest": {
- "type": "object",
- "required": [
- "display_status"
- ],
- "properties": {
- "display_status": {
- "type": "string",
- "enum": [
- "open",
- "close"
- ]
- }
- }
- },
- "handler_session.AttachmentUpload": {
- "type": "object",
- "properties": {
- "data": {
- "description": "Base64-encoded file content",
- "type": "string"
- },
- "file_name": {
- "description": "Original filename",
- "type": "string"
- },
- "file_size": {
- "description": "File size in bytes",
- "type": "integer"
- }
- }
- },
- "handler_session.CreateKnowledgeQARequest": {
- "type": "object",
- "required": [
- "query"
- ],
- "properties": {
- "agent_enabled": {
- "description": "Whether agent mode is enabled for this request",
- "type": "boolean"
- },
- "agent_id": {
- "description": "Selected custom agent ID (backend resolves shared agent and its tenant from share relation)",
- "type": "string"
- },
- "attachment_uploads": {
- "description": "Attached files (documents, audio, etc.)",
- "type": "array",
- "items": {
- "$ref": "#/definitions/handler_session.AttachmentUpload"
- }
- },
- "channel": {
- "description": "Source channel: \"web\", \"api\", \"im\", etc.",
- "type": "string"
- },
- "disable_title": {
- "description": "Whether to disable auto title generation",
- "type": "boolean"
- },
- "enable_memory": {
- "description": "Whether memory feature is enabled for this request",
- "type": "boolean"
- },
- "images": {
- "description": "Attached images for multimodal chat",
- "type": "array",
- "items": {
- "$ref": "#/definitions/handler_session.ImageAttachment"
- }
- },
- "knowledge_base_ids": {
- "description": "Selected knowledge base ID for this request",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "knowledge_ids": {
- "description": "Selected knowledge ID for this request",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "mentioned_items": {
- "description": "@mentioned knowledge bases and files",
- "type": "array",
- "items": {
- "$ref": "#/definitions/handler_session.MentionedItemRequest"
- }
- },
- "query": {
- "description": "Query text for knowledge base search",
- "type": "string"
- },
- "summary_model_id": {
- "description": "Optional summary model ID for this request (overrides session default)",
- "type": "string"
- },
- "web_search_enabled": {
- "description": "Whether web search is enabled for this request",
- "type": "boolean"
- }
- }
- },
- "handler_session.CreateSessionRequest": {
- "type": "object",
- "properties": {
- "description": {
- "description": "Description for the session (optional)",
- "type": "string"
- },
- "title": {
- "description": "Title for the session (optional)",
- "type": "string"
- }
- }
- },
- "handler_session.GenerateTitleRequest": {
- "type": "object",
- "required": [
- "messages"
- ],
- "properties": {
- "messages": {
- "description": "Messages to use as context for title generation",
- "type": "array",
- "items": {
- "$ref": "#/definitions/types.Message"
- }
- }
- }
- },
- "handler_session.ImageAttachment": {
- "type": "object",
- "properties": {
- "caption": {
- "description": "VLM analysis result (context-aware, single call)",
- "type": "string"
- },
- "data": {
- "description": "base64 data URI from frontend (data:image/png;base64,...)",
- "type": "string"
- },
- "url": {
- "description": "serving URL after saving to storage",
- "type": "string"
- }
- }
- },
- "handler_session.MentionedItemRequest": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "kb_type": {
- "description": "\"document\" or \"faq\" (only for kb type)",
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "type": {
- "description": "\"kb\" for knowledge base, \"file\" for file",
- "type": "string"
- }
- }
- },
- "handler_session.SearchKnowledgeRequest": {
- "type": "object",
- "required": [
- "query"
- ],
- "properties": {
- "knowledge_base_id": {
- "description": "Single knowledge base ID (for backward compatibility)",
- "type": "string"
- },
- "knowledge_base_ids": {
- "description": "IDs of knowledge bases to search (multi-KB support)",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "knowledge_ids": {
- "description": "IDs of specific knowledge (files) to search",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "query": {
- "description": "Query text to search for",
- "type": "string"
- }
- }
- },
- "handler_session.StopSessionRequest": {
- "type": "object",
- "required": [
- "message_id"
- ],
- "properties": {
- "message_id": {
- "type": "string"
- }
- }
- },
- "handler_session.batchDeleteRequest": {
- "type": "object",
- "properties": {
- "delete_all": {
- "type": "boolean"
- },
- "ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "types.ASRConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ASRConfig": {
"type": "object",
"properties": {
"enabled": {
@@ -9901,7 +9896,7 @@
}
}
},
- "types.AgentConfig": {
+ "github_com_Tencent_WeKnora_internal_types.AgentConfig": {
"type": "object",
"properties": {
"allowed_skills": {
@@ -9971,6 +9966,10 @@
"description": "Whether to execute independent tool calls in parallel (default: false).\nWhen enabled and the LLM returns multiple tool calls, they run concurrently via errgroup.",
"type": "boolean"
},
+ "retain_retrieval_history": {
+ "description": "Whether to retain retrieval history (like wiki_read_page results) across turns (default: false)",
+ "type": "boolean"
+ },
"retrieve_kb_only_when_mentioned": {
"description": "Whether to retrieve knowledge base only when explicitly mentioned with @ (default: false)",
"type": "boolean"
@@ -10024,7 +10023,7 @@
}
}
},
- "types.AgentStep": {
+ "github_com_Tencent_WeKnora_internal_types.AgentStep": {
"type": "object",
"properties": {
"iteration": {
@@ -10043,12 +10042,12 @@
"description": "Tools called in this step (Act phase)",
"type": "array",
"items": {
- "$ref": "#/definitions/types.ToolCall"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ToolCall"
}
}
}
},
- "types.AnswerStrategy": {
+ "github_com_Tencent_WeKnora_internal_types.AnswerStrategy": {
"type": "string",
"enum": [
"all",
@@ -10059,7 +10058,7 @@
"AnswerStrategyRandom"
]
},
- "types.COSEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.COSEngineConfig": {
"type": "object",
"properties": {
"app_id": {
@@ -10082,7 +10081,7 @@
}
}
},
- "types.ChatHistoryConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ChatHistoryConfig": {
"type": "object",
"properties": {
"embedding_model_id": {
@@ -10099,7 +10098,7 @@
}
}
},
- "types.ChunkingConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ChunkingConfig": {
"type": "object",
"properties": {
"child_chunk_size": {
@@ -10130,7 +10129,7 @@
"description": "ParserEngineRules configures which parser engine to use for each file type.\nWhen empty, the builtin engine is used for all types.",
"type": "array",
"items": {
- "$ref": "#/definitions/types.ParserEngineRule"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineRule"
}
},
"separators": {
@@ -10142,7 +10141,7 @@
}
}
},
- "types.ConnectionConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ConnectionConfig": {
"type": "object",
"properties": {
"addr": {
@@ -10187,7 +10186,7 @@
}
}
},
- "types.ContextCompressionStrategy": {
+ "github_com_Tencent_WeKnora_internal_types.ContextCompressionStrategy": {
"type": "string",
"enum": [
"sliding_window",
@@ -10198,14 +10197,14 @@
"ContextCompressionSmart"
]
},
- "types.ContextConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ContextConfig": {
"type": "object",
"properties": {
"compression_strategy": {
"description": "Compression strategy: \"sliding_window\" or \"smart\"",
"allOf": [
{
- "$ref": "#/definitions/types.ContextCompressionStrategy"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ContextCompressionStrategy"
}
]
},
@@ -10223,7 +10222,7 @@
}
}
},
- "types.ConversationConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ConversationConfig": {
"type": "object",
"properties": {
"context_template": {
@@ -10293,7 +10292,7 @@
}
}
},
- "types.CreateOrganizationRequest": {
+ "github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest": {
"type": "object",
"required": [
"name"
@@ -10323,21 +10322,25 @@
}
}
},
- "types.CredentialsConfig": {
+ "github_com_Tencent_WeKnora_internal_types.CredentialsConfig": {
"type": "object",
"properties": {
"weknoracloud": {
- "$ref": "#/definitions/types.WeKnoraCloudCredentials"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WeKnoraCloudCredentials"
}
}
},
- "types.CustomAgentConfig": {
+ "github_com_Tencent_WeKnora_internal_types.CustomAgentConfig": {
"type": "object",
"properties": {
"agent_mode": {
"description": "===== Basic Settings =====\nAgent mode: \"quick-answer\" for RAG mode, \"smart-reasoning\" for ReAct agent mode",
"type": "string"
},
+ "agent_type": {
+ "description": "AgentType is a preset category under smart-reasoning mode that pre-fills\nsystem prompt, allowed tools and recommended KB compatibility.\nValid values: \"rag-qa\", \"wiki-qa\", \"hybrid-rag-wiki\", \"custom\".\nEmpty / unknown values are treated as \"custom\" (no preset applied).\nIgnored for quick-answer mode.",
+ "type": "string"
+ },
"allowed_tools": {
"description": "Allowed tools (only for agent type)",
"type": "array",
@@ -10467,6 +10470,10 @@
"description": "Rerank top K",
"type": "integer"
},
+ "retain_retrieval_history": {
+ "description": "Whether to retain retrieval history across turns",
+ "type": "boolean"
+ },
"retrieve_kb_only_when_mentioned": {
"description": "Whether to retrieve knowledge base only when explicitly mentioned with @ (default: false)\nWhen true, knowledge base retrieval only happens if user explicitly mentions KB/files with @\nWhen false, knowledge base retrieval happens according to KBSelectionMode",
"type": "boolean"
@@ -10550,7 +10557,7 @@
}
}
},
- "types.DataSource": {
+ "github_com_Tencent_WeKnora_internal_types.DataSource": {
"type": "object",
"properties": {
"config": {
@@ -10610,7 +10617,7 @@
"description": "Latest sync log (not stored in DB, populated on query)",
"allOf": [
{
- "$ref": "#/definitions/types.SyncLog"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog"
}
]
},
@@ -10656,7 +10663,7 @@
}
}
},
- "types.EmbeddingParameters": {
+ "github_com_Tencent_WeKnora_internal_types.EmbeddingParameters": {
"type": "object",
"properties": {
"dimension": {
@@ -10667,7 +10674,7 @@
}
}
},
- "types.ExtractConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ExtractConfig": {
"type": "object",
"properties": {
"enabled": {
@@ -10676,13 +10683,13 @@
"nodes": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.GraphNode"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.GraphNode"
}
},
"relations": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.GraphRelation"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.GraphRelation"
}
},
"tags": {
@@ -10696,7 +10703,7 @@
}
}
},
- "types.FAQBatchUpsertPayload": {
+ "github_com_Tencent_WeKnora_internal_types.FAQBatchUpsertPayload": {
"type": "object",
"required": [
"entries"
@@ -10709,7 +10716,7 @@
"entries": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.FAQEntryPayload"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload"
}
},
"knowledge_id": {
@@ -10728,32 +10735,32 @@
}
}
},
- "types.FAQConfig": {
+ "github_com_Tencent_WeKnora_internal_types.FAQConfig": {
"type": "object",
"properties": {
"index_mode": {
- "$ref": "#/definitions/types.FAQIndexMode"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQIndexMode"
},
"question_index_mode": {
- "$ref": "#/definitions/types.FAQQuestionIndexMode"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQQuestionIndexMode"
}
}
},
- "types.FAQEntryFieldsBatchUpdate": {
+ "github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsBatchUpdate": {
"type": "object",
"properties": {
"by_id": {
"description": "ByID 按条目ID更新,key为条目ID (seq_id)",
"type": "object",
"additionalProperties": {
- "$ref": "#/definitions/types.FAQEntryFieldsUpdate"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate"
}
},
"by_tag": {
"description": "ByTag 按Tag批量更新,key为TagID (seq_id)",
"type": "object",
"additionalProperties": {
- "$ref": "#/definitions/types.FAQEntryFieldsUpdate"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate"
}
},
"exclude_ids": {
@@ -10765,7 +10772,7 @@
}
}
},
- "types.FAQEntryFieldsUpdate": {
+ "github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate": {
"type": "object",
"properties": {
"is_enabled": {
@@ -10779,14 +10786,14 @@
}
}
},
- "types.FAQEntryPayload": {
+ "github_com_Tencent_WeKnora_internal_types.FAQEntryPayload": {
"type": "object",
"required": [
"standard_question"
],
"properties": {
"answer_strategy": {
- "$ref": "#/definitions/types.AnswerStrategy"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.AnswerStrategy"
},
"answers": {
"type": "array",
@@ -10827,7 +10834,7 @@
}
}
},
- "types.FAQIndexMode": {
+ "github_com_Tencent_WeKnora_internal_types.FAQIndexMode": {
"type": "string",
"enum": [
"question_only",
@@ -10838,7 +10845,7 @@
"FAQIndexModeQuestionAnswer"
]
},
- "types.FAQQuestionIndexMode": {
+ "github_com_Tencent_WeKnora_internal_types.FAQQuestionIndexMode": {
"type": "string",
"enum": [
"combined",
@@ -10849,7 +10856,7 @@
"FAQQuestionIndexModeSeparate"
]
},
- "types.FAQSearchRequest": {
+ "github_com_Tencent_WeKnora_internal_types.FAQSearchRequest": {
"type": "object",
"required": [
"query_text"
@@ -10884,7 +10891,7 @@
}
}
},
- "types.GraphNode": {
+ "github_com_Tencent_WeKnora_internal_types.GraphNode": {
"type": "object",
"properties": {
"attributes": {
@@ -10904,7 +10911,7 @@
}
}
},
- "types.GraphRelation": {
+ "github_com_Tencent_WeKnora_internal_types.GraphRelation": {
"type": "object",
"properties": {
"node1": {
@@ -10918,7 +10925,7 @@
}
}
},
- "types.ImageProcessingConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig": {
"type": "object",
"properties": {
"model_id": {
@@ -10927,7 +10934,7 @@
}
}
},
- "types.IndexConfig": {
+ "github_com_Tencent_WeKnora_internal_types.IndexConfig": {
"type": "object",
"properties": {
"collection_name": {
@@ -10935,11 +10942,15 @@
"type": "string"
},
"collection_prefix": {
- "description": "Qdrant",
+ "description": "Qdrant, Weaviate",
"type": "string"
},
+ "desired_shard_count": {
+ "description": "Weaviate: number of shards per collection",
+ "type": "integer"
+ },
"index_name": {
- "description": "ES, OpenSearch",
+ "description": "--- Existing fields ---",
"type": "string"
},
"number_of_replicas": {
@@ -10949,10 +10960,47 @@
"number_of_shards": {
"description": "ES, OpenSearch",
"type": "integer"
+ },
+ "replica_number": {
+ "description": "Milvus: in-memory replica count (LoadCollection)",
+ "type": "integer"
+ },
+ "replication_factor": {
+ "description": "Qdrant, Weaviate: number of replicas",
+ "type": "integer"
+ },
+ "shard_number": {
+ "description": "--- Scalability fields ---",
+ "type": "integer"
+ },
+ "shards_num": {
+ "description": "Milvus: number of shards per collection (CreateCollection)",
+ "type": "integer"
}
}
},
- "types.InviteMemberRequest": {
+ "github_com_Tencent_WeKnora_internal_types.IndexingStrategy": {
+ "type": "object",
+ "properties": {
+ "graph_enabled": {
+ "description": "GraphEnabled enables knowledge graph entity/relation extraction",
+ "type": "boolean"
+ },
+ "keyword_enabled": {
+ "description": "KeywordEnabled enables keyword-based (BM25) search",
+ "type": "boolean"
+ },
+ "vector_enabled": {
+ "description": "VectorEnabled enables semantic vector embedding and search",
+ "type": "boolean"
+ },
+ "wiki_enabled": {
+ "description": "WikiEnabled enables automatic wiki page generation from documents",
+ "type": "boolean"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.InviteMemberRequest": {
"type": "object",
"required": [
"role",
@@ -10963,7 +11011,7 @@
"description": "Role to assign: admin/editor/viewer",
"allOf": [
{
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
},
@@ -10973,7 +11021,7 @@
}
}
},
- "types.JoinByOrganizationIDRequest": {
+ "github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest": {
"type": "object",
"required": [
"organization_id"
@@ -10991,13 +11039,13 @@
"description": "Optional: requested role (admin/editor/viewer); default viewer",
"allOf": [
{
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
}
}
},
- "types.JoinOrganizationRequest": {
+ "github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest": {
"type": "object",
"required": [
"invite_code"
@@ -11010,7 +11058,7 @@
}
}
},
- "types.Knowledge": {
+ "github_com_Tencent_WeKnora_internal_types.Knowledge": {
"type": "object",
"properties": {
"channel": {
@@ -11133,14 +11181,14 @@
}
}
},
- "types.KnowledgeBase": {
+ "github_com_Tencent_WeKnora_internal_types.KnowledgeBase": {
"type": "object",
"properties": {
"asr_config": {
"description": "ASR config (Automatic Speech Recognition)",
"allOf": [
{
- "$ref": "#/definitions/types.ASRConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ASRConfig"
}
]
},
@@ -11152,7 +11200,7 @@
"description": "Chunking configuration",
"allOf": [
{
- "$ref": "#/definitions/types.ChunkingConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ChunkingConfig"
}
]
},
@@ -11180,7 +11228,7 @@
"description": "Extract config",
"allOf": [
{
- "$ref": "#/definitions/types.ExtractConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ExtractConfig"
}
]
},
@@ -11188,7 +11236,7 @@
"description": "FAQConfig stores FAQ specific configuration such as indexing strategy",
"allOf": [
{
- "$ref": "#/definitions/types.FAQConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQConfig"
}
]
},
@@ -11200,7 +11248,15 @@
"description": "Image processing configuration",
"allOf": [
{
- "$ref": "#/definitions/types.ImageProcessingConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig"
+ }
+ ]
+ },
+ "indexing_strategy": {
+ "description": "IndexingStrategy controls which indexing pipelines are active for this knowledge base.\nPipelines: vector search, keyword search, wiki generation, knowledge graph extraction.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.IndexingStrategy"
}
]
},
@@ -11236,7 +11292,7 @@
"description": "QuestionGenerationConfig stores question generation configuration for document knowledge bases",
"allOf": [
{
- "$ref": "#/definitions/types.QuestionGenerationConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig"
}
]
},
@@ -11248,7 +11304,7 @@
"description": "Deprecated: legacy COS config column. Kept for backward compatibility with old data.",
"allOf": [
{
- "$ref": "#/definitions/types.StorageConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.StorageConfig"
}
]
},
@@ -11256,7 +11312,7 @@
"description": "Storage provider config (new): only stores provider selection; credentials from tenant StorageEngineConfig",
"allOf": [
{
- "$ref": "#/definitions/types.StorageProviderConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.StorageProviderConfig"
}
]
},
@@ -11276,24 +11332,36 @@
"description": "Last updated time of the knowledge base",
"type": "string"
},
+ "vector_store_id": {
+ "description": "VectorStoreID references the VectorStore this knowledge base is bound to.\nWhen nil, the KB falls back to the tenant's effective engines derived from\nthe RETRIEVE_DRIVER environment variable (env store flow).\nThis field is set once at creation time and must not be modified afterwards;\nenforcement lives at the GORM layer (`\u003c-:create`) plus the service-layer\nKB update path, which omits this field from its update DTO.",
+ "type": "string"
+ },
"vlm_config": {
"description": "VLM config",
"allOf": [
{
- "$ref": "#/definitions/types.VLMConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig"
+ }
+ ]
+ },
+ "wiki_config": {
+ "description": "WikiConfig stores wiki-specific configuration (only for wiki type knowledge bases)",
+ "allOf": [
+ {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiConfig"
}
]
}
}
},
- "types.KnowledgeBaseConfig": {
+ "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseConfig": {
"type": "object",
"properties": {
"chunking_config": {
"description": "Chunking configuration",
"allOf": [
{
- "$ref": "#/definitions/types.ChunkingConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ChunkingConfig"
}
]
},
@@ -11301,7 +11369,7 @@
"description": "FAQ configuration (only for FAQ type knowledge bases)",
"allOf": [
{
- "$ref": "#/definitions/types.FAQConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQConfig"
}
]
},
@@ -11309,13 +11377,29 @@
"description": "Image processing configuration",
"allOf": [
{
- "$ref": "#/definitions/types.ImageProcessingConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig"
+ }
+ ]
+ },
+ "indexing_strategy": {
+ "description": "IndexingStrategy controls which indexing pipelines are active.\nnil means \"no change\" when updating (preserves existing strategy).",
+ "allOf": [
+ {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.IndexingStrategy"
+ }
+ ]
+ },
+ "wiki_config": {
+ "description": "Wiki configuration (only for wiki-enabled knowledge bases)",
+ "allOf": [
+ {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiConfig"
}
]
}
}
},
- "types.KnowledgeBaseShareResponse": {
+ "github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse": {
"type": "object",
"properties": {
"chunk_count": {
@@ -11371,13 +11455,13 @@
}
}
},
- "types.ListMembersResponse": {
+ "github_com_Tencent_WeKnora_internal_types.ListMembersResponse": {
"type": "object",
"properties": {
"members": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.OrganizationMemberResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrganizationMemberResponse"
}
},
"total": {
@@ -11385,20 +11469,20 @@
}
}
},
- "types.ListOrganizationsResponse": {
+ "github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse": {
"type": "object",
"properties": {
"organizations": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.OrganizationResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrganizationResponse"
}
},
"resource_counts": {
"description": "各空间内知识库/智能体数量,供列表侧栏展示",
"allOf": [
{
- "$ref": "#/definitions/types.ResourceCountsByOrgResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ResourceCountsByOrgResponse"
}
]
},
@@ -11407,13 +11491,13 @@
}
}
},
- "types.ListSharesResponse": {
+ "github_com_Tencent_WeKnora_internal_types.ListSharesResponse": {
"type": "object",
"properties": {
"shares": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.KnowledgeBaseShareResponse"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse"
}
},
"total": {
@@ -11421,7 +11505,7 @@
}
}
},
- "types.LocalEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.LocalEngineConfig": {
"type": "object",
"properties": {
"path_prefix": {
@@ -11429,7 +11513,7 @@
}
}
},
- "types.LoginRequest": {
+ "github_com_Tencent_WeKnora_internal_types.LoginRequest": {
"type": "object",
"required": [
"email",
@@ -11445,7 +11529,7 @@
}
}
},
- "types.LoginResponse": {
+ "github_com_Tencent_WeKnora_internal_types.LoginResponse": {
"type": "object",
"properties": {
"message": {
@@ -11458,17 +11542,17 @@
"type": "boolean"
},
"tenant": {
- "$ref": "#/definitions/types.Tenant"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
},
"token": {
"type": "string"
},
"user": {
- "$ref": "#/definitions/types.User"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.User"
}
}
},
- "types.MCPAdvancedConfig": {
+ "github_com_Tencent_WeKnora_internal_types.MCPAdvancedConfig": {
"type": "object",
"properties": {
"retry_count": {
@@ -11485,7 +11569,7 @@
}
}
},
- "types.MCPAuthConfig": {
+ "github_com_Tencent_WeKnora_internal_types.MCPAuthConfig": {
"type": "object",
"properties": {
"api_key": {
@@ -11502,26 +11586,26 @@
}
}
},
- "types.MCPEnvVars": {
+ "github_com_Tencent_WeKnora_internal_types.MCPEnvVars": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
- "types.MCPHeaders": {
+ "github_com_Tencent_WeKnora_internal_types.MCPHeaders": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
- "types.MCPService": {
+ "github_com_Tencent_WeKnora_internal_types.MCPService": {
"type": "object",
"properties": {
"advanced_config": {
- "$ref": "#/definitions/types.MCPAdvancedConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPAdvancedConfig"
},
"auth_config": {
- "$ref": "#/definitions/types.MCPAuthConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPAuthConfig"
},
"created_at": {
"type": "string"
@@ -11539,12 +11623,12 @@
"description": "Environment variables for stdio",
"allOf": [
{
- "$ref": "#/definitions/types.MCPEnvVars"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPEnvVars"
}
]
},
"headers": {
- "$ref": "#/definitions/types.MCPHeaders"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPHeaders"
},
"id": {
"type": "string"
@@ -11560,7 +11644,7 @@
"description": "Required for stdio transport",
"allOf": [
{
- "$ref": "#/definitions/types.MCPStdioConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPStdioConfig"
}
]
},
@@ -11568,7 +11652,7 @@
"type": "integer"
},
"transport_type": {
- "$ref": "#/definitions/types.MCPTransportType"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPTransportType"
},
"updated_at": {
"type": "string"
@@ -11579,7 +11663,7 @@
}
}
},
- "types.MCPStdioConfig": {
+ "github_com_Tencent_WeKnora_internal_types.MCPStdioConfig": {
"type": "object",
"properties": {
"args": {
@@ -11595,7 +11679,7 @@
}
}
},
- "types.MCPTransportType": {
+ "github_com_Tencent_WeKnora_internal_types.MCPTransportType": {
"type": "string",
"enum": [
"sse",
@@ -11618,7 +11702,7 @@
"MCPTransportStdio"
]
},
- "types.ManualKnowledgePayload": {
+ "github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload": {
"type": "object",
"properties": {
"channel": {
@@ -11638,7 +11722,7 @@
}
}
},
- "types.MatchType": {
+ "github_com_Tencent_WeKnora_internal_types.MatchType": {
"type": "integer",
"enum": [
0,
@@ -11684,7 +11768,7 @@
"MatchTypeDataAnalysis"
]
},
- "types.MentionedItem": {
+ "github_com_Tencent_WeKnora_internal_types.MentionedItem": {
"type": "object",
"properties": {
"id": {
@@ -11703,7 +11787,7 @@
}
}
},
- "types.Message": {
+ "github_com_Tencent_WeKnora_internal_types.Message": {
"type": "object",
"properties": {
"agent_duration_ms": {
@@ -11714,14 +11798,14 @@
"description": "Agent execution steps (only for assistant messages generated by agent)\nThis contains the detailed reasoning process and tool calls made by the agent\nStored for user history display, but NOT included in LLM context to avoid redundancy",
"type": "array",
"items": {
- "$ref": "#/definitions/types.AgentStep"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.AgentStep"
}
},
"attachments": {
"description": "Attached files (documents, audio, etc., for user messages)",
"type": "array",
"items": {
- "$ref": "#/definitions/types.MessageAttachment"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MessageAttachment"
}
},
"channel": {
@@ -11752,7 +11836,7 @@
"description": "Attached images with OCR/Caption text (for user messages)",
"type": "array",
"items": {
- "$ref": "#/definitions/types.MessageImage"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MessageImage"
}
},
"is_completed": {
@@ -11771,14 +11855,14 @@
"description": "References to knowledge chunks used in the response",
"type": "array",
"items": {
- "$ref": "#/definitions/types.SearchResult"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SearchResult"
}
},
"mentioned_items": {
"description": "Mentioned knowledge bases and files (for user messages)\nStores the @mentioned items when user sends a message",
"type": "array",
"items": {
- "$ref": "#/definitions/types.MentionedItem"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MentionedItem"
}
},
"request_id": {
@@ -11799,7 +11883,7 @@
}
}
},
- "types.MessageAttachment": {
+ "github_com_Tencent_WeKnora_internal_types.MessageAttachment": {
"type": "object",
"properties": {
"content": {
@@ -11832,7 +11916,7 @@
}
}
},
- "types.MessageImage": {
+ "github_com_Tencent_WeKnora_internal_types.MessageImage": {
"type": "object",
"properties": {
"caption": {
@@ -11843,7 +11927,7 @@
}
}
},
- "types.MinIOEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.MinIOEngineConfig": {
"type": "object",
"properties": {
"access_key_id": {
@@ -11870,7 +11954,7 @@
}
}
},
- "types.ModelParameters": {
+ "github_com_Tencent_WeKnora_internal_types.ModelParameters": {
"type": "object",
"properties": {
"api_key": {
@@ -11887,8 +11971,15 @@
"base_url": {
"type": "string"
},
+ "custom_headers": {
+ "description": "CustomHeaders 允许在调用远程模型 API 时附加自定义 HTTP 请求头,\n用途类似 Python OpenAI SDK 的 extra_headers 参数,\n常见场景包括透传企业网关鉴权信息、追踪 ID、路由标识等。\n保留字段(Authorization、api-key、Content-Type、Accept 等)会在运行期被忽略以避免破坏签名/鉴权流程。",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
"embedding_parameters": {
- "$ref": "#/definitions/types.EmbeddingParameters"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.EmbeddingParameters"
},
"extra_config": {
"description": "Provider-specific configuration",
@@ -11914,7 +12005,7 @@
}
}
},
- "types.ModelSource": {
+ "github_com_Tencent_WeKnora_internal_types.ModelSource": {
"type": "string",
"enum": [
"local",
@@ -11993,7 +12084,7 @@
"ModelSourceAzureOpenAI"
]
},
- "types.ModelType": {
+ "github_com_Tencent_WeKnora_internal_types.ModelType": {
"type": "string",
"enum": [
"Embedding",
@@ -12024,7 +12115,7 @@
"ModelTypeASR"
]
},
- "types.OIDCAuthURLResponse": {
+ "github_com_Tencent_WeKnora_internal_types.OIDCAuthURLResponse": {
"type": "object",
"properties": {
"authorization_url": {
@@ -12041,7 +12132,7 @@
}
}
},
- "types.OIDCConfigResponse": {
+ "github_com_Tencent_WeKnora_internal_types.OIDCConfigResponse": {
"type": "object",
"properties": {
"enabled": {
@@ -12055,7 +12146,7 @@
}
}
},
- "types.OSSEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.OSSEngineConfig": {
"type": "object",
"properties": {
"access_key": {
@@ -12087,7 +12178,7 @@
}
}
},
- "types.OrgMemberRole": {
+ "github_com_Tencent_WeKnora_internal_types.OrgMemberRole": {
"type": "string",
"enum": [
"admin",
@@ -12100,7 +12191,7 @@
"OrgRoleViewer"
]
},
- "types.OrganizationMemberResponse": {
+ "github_com_Tencent_WeKnora_internal_types.OrganizationMemberResponse": {
"type": "object",
"properties": {
"avatar": {
@@ -12129,7 +12220,7 @@
}
}
},
- "types.OrganizationResponse": {
+ "github_com_Tencent_WeKnora_internal_types.OrganizationResponse": {
"type": "object",
"properties": {
"agent_share_count": {
@@ -12199,7 +12290,7 @@
}
}
},
- "types.ParserEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.ParserEngineConfig": {
"type": "object",
"properties": {
"mineru_api_key": {
@@ -12244,7 +12335,7 @@
}
}
},
- "types.ParserEngineRule": {
+ "github_com_Tencent_WeKnora_internal_types.ParserEngineRule": {
"type": "object",
"properties": {
"engine": {
@@ -12258,7 +12349,7 @@
}
}
},
- "types.QuestionGenerationConfig": {
+ "github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig": {
"type": "object",
"properties": {
"enabled": {
@@ -12270,7 +12361,7 @@
}
}
},
- "types.RegisterRequest": {
+ "github_com_Tencent_WeKnora_internal_types.RegisterRequest": {
"type": "object",
"required": [
"email",
@@ -12292,7 +12383,7 @@
}
}
},
- "types.RegisterResponse": {
+ "github_com_Tencent_WeKnora_internal_types.RegisterResponse": {
"type": "object",
"properties": {
"message": {
@@ -12302,14 +12393,14 @@
"type": "boolean"
},
"tenant": {
- "$ref": "#/definitions/types.Tenant"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
},
"user": {
- "$ref": "#/definitions/types.User"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.User"
}
}
},
- "types.RequestRoleUpgradeRequest": {
+ "github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest": {
"type": "object",
"required": [
"requested_role"
@@ -12324,13 +12415,13 @@
"description": "The role user wants to upgrade to",
"allOf": [
{
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
}
}
},
- "types.Resource": {
+ "github_com_Tencent_WeKnora_internal_types.Resource": {
"type": "object",
"properties": {
"description": {
@@ -12372,7 +12463,7 @@
}
}
},
- "types.ResourceCountsByOrgResponse": {
+ "github_com_Tencent_WeKnora_internal_types.ResourceCountsByOrgResponse": {
"type": "object",
"properties": {
"agents": {
@@ -12399,7 +12490,7 @@
}
}
},
- "types.RetrievalConfig": {
+ "github_com_Tencent_WeKnora_internal_types.RetrievalConfig": {
"type": "object",
"properties": {
"embedding_top_k": {
@@ -12428,14 +12519,14 @@
}
}
},
- "types.RetrieverEngineParams": {
+ "github_com_Tencent_WeKnora_internal_types.RetrieverEngineParams": {
"type": "object",
"properties": {
"retriever_engine_type": {
"description": "Retriever engine type",
"allOf": [
{
- "$ref": "#/definitions/types.RetrieverEngineType"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineType"
}
]
},
@@ -12443,13 +12534,13 @@
"description": "Retriever type",
"allOf": [
{
- "$ref": "#/definitions/types.RetrieverType"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverType"
}
]
}
}
},
- "types.RetrieverEngineType": {
+ "github_com_Tencent_WeKnora_internal_types.RetrieverEngineType": {
"type": "string",
"enum": [
"postgres",
@@ -12472,18 +12563,18 @@
"SQLiteRetrieverEngineType"
]
},
- "types.RetrieverEngines": {
+ "github_com_Tencent_WeKnora_internal_types.RetrieverEngines": {
"type": "object",
"properties": {
"engines": {
"type": "array",
"items": {
- "$ref": "#/definitions/types.RetrieverEngineParams"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineParams"
}
}
}
},
- "types.RetrieverType": {
+ "github_com_Tencent_WeKnora_internal_types.RetrieverType": {
"type": "string",
"enum": [
"keywords",
@@ -12506,7 +12597,7 @@
"WebSearchRetrieverType"
]
},
- "types.ReviewJoinRequestRequest": {
+ "github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest": {
"type": "object",
"properties": {
"approved": {
@@ -12520,13 +12611,13 @@
"description": "Optional: role to assign when approving; overrides applicant's requested role",
"allOf": [
{
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
}
}
},
- "types.S3EngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.S3EngineConfig": {
"type": "object",
"properties": {
"access_key": {
@@ -12549,7 +12640,7 @@
}
}
},
- "types.SearchParams": {
+ "github_com_Tencent_WeKnora_internal_types.SearchParams": {
"type": "object",
"properties": {
"disable_keywords_match": {
@@ -12605,7 +12696,7 @@
}
}
},
- "types.SearchResult": {
+ "github_com_Tencent_WeKnora_internal_types.SearchResult": {
"type": "object",
"properties": {
"chunk_index": {
@@ -12671,7 +12762,7 @@
"description": "Match type",
"allOf": [
{
- "$ref": "#/definitions/types.MatchType"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MatchType"
}
]
},
@@ -12711,7 +12802,7 @@
}
}
},
- "types.Session": {
+ "github_com_Tencent_WeKnora_internal_types.Session": {
"type": "object",
"properties": {
"created_at": {
@@ -12741,7 +12832,7 @@
}
}
},
- "types.ShareKnowledgeBaseRequest": {
+ "github_com_Tencent_WeKnora_internal_types.ShareKnowledgeBaseRequest": {
"type": "object",
"required": [
"organization_id",
@@ -12752,11 +12843,11 @@
"type": "string"
},
"permission": {
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
}
},
- "types.StorageConfig": {
+ "github_com_Tencent_WeKnora_internal_types.StorageConfig": {
"type": "object",
"properties": {
"app_id": {
@@ -12782,34 +12873,34 @@
}
}
},
- "types.StorageEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.StorageEngineConfig": {
"type": "object",
"properties": {
"cos": {
- "$ref": "#/definitions/types.COSEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.COSEngineConfig"
},
"default_provider": {
"description": "\"local\", \"minio\", \"cos\", \"tos\", \"s3\", \"oss\"",
"type": "string"
},
"local": {
- "$ref": "#/definitions/types.LocalEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.LocalEngineConfig"
},
"minio": {
- "$ref": "#/definitions/types.MinIOEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MinIOEngineConfig"
},
"oss": {
- "$ref": "#/definitions/types.OSSEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OSSEngineConfig"
},
"s3": {
- "$ref": "#/definitions/types.S3EngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.S3EngineConfig"
},
"tos": {
- "$ref": "#/definitions/types.TOSEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.TOSEngineConfig"
}
}
},
- "types.StorageProviderConfig": {
+ "github_com_Tencent_WeKnora_internal_types.StorageProviderConfig": {
"type": "object",
"properties": {
"provider": {
@@ -12818,7 +12909,7 @@
}
}
},
- "types.SubmitJoinRequestRequest": {
+ "github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest": {
"type": "object",
"required": [
"invite_code"
@@ -12837,13 +12928,13 @@
"description": "Optional: role the applicant requests (admin/editor/viewer); default viewer",
"allOf": [
{
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
}
}
},
- "types.SyncLog": {
+ "github_com_Tencent_WeKnora_internal_types.SyncLog": {
"type": "object",
"properties": {
"created_at": {
@@ -12915,7 +13006,7 @@
}
}
},
- "types.TOSEngineConfig": {
+ "github_com_Tencent_WeKnora_internal_types.TOSEngineConfig": {
"type": "object",
"properties": {
"access_key": {
@@ -12938,14 +13029,14 @@
}
}
},
- "types.Tenant": {
+ "github_com_Tencent_WeKnora_internal_types.Tenant": {
"type": "object",
"properties": {
"agent_config": {
"description": "Deprecated: AgentConfig is deprecated, use CustomAgent (builtin-smart-reasoning) config instead.\nThis field is kept for backward compatibility and will be removed in future versions.",
"allOf": [
{
- "$ref": "#/definitions/types.AgentConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.AgentConfig"
}
]
},
@@ -12961,7 +13052,7 @@
"description": "Chat history config: knowledge base configuration for indexing and searching chat messages via vector search",
"allOf": [
{
- "$ref": "#/definitions/types.ChatHistoryConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ChatHistoryConfig"
}
]
},
@@ -12969,7 +13060,7 @@
"description": "Global Context configuration for this tenant (default for all sessions)",
"allOf": [
{
- "$ref": "#/definitions/types.ContextConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ContextConfig"
}
]
},
@@ -12977,7 +13068,7 @@
"description": "Deprecated: ConversationConfig is deprecated, use CustomAgent (builtin-quick-answer) config instead.\nThis field is kept for backward compatibility and will be removed in future versions.",
"allOf": [
{
- "$ref": "#/definitions/types.ConversationConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ConversationConfig"
}
]
},
@@ -12989,7 +13080,7 @@
"description": "Credentials config: third-party provider credentials (e.g. WeKnoraCloud AppID/AppSecret)",
"allOf": [
{
- "$ref": "#/definitions/types.CredentialsConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CredentialsConfig"
}
]
},
@@ -13017,7 +13108,7 @@
"description": "Parser engine config overrides (MinerU endpoint, API key, etc.). Used when parsing documents; overrides env.",
"allOf": [
{
- "$ref": "#/definitions/types.ParserEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineConfig"
}
]
},
@@ -13025,7 +13116,7 @@
"description": "Retrieval config: global search/retrieval parameters shared by knowledge search and message search",
"allOf": [
{
- "$ref": "#/definitions/types.RetrievalConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrievalConfig"
}
]
},
@@ -13033,7 +13124,7 @@
"description": "Retriever engines",
"allOf": [
{
- "$ref": "#/definitions/types.RetrieverEngines"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngines"
}
]
},
@@ -13045,7 +13136,7 @@
"description": "Storage engine config: parameters for Local, MinIO, COS. Used for document/file storage and docreader.",
"allOf": [
{
- "$ref": "#/definitions/types.StorageEngineConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.StorageEngineConfig"
}
]
},
@@ -13065,13 +13156,13 @@
"description": "Global WebSearch configuration for this tenant",
"allOf": [
{
- "$ref": "#/definitions/types.WebSearchConfig"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WebSearchConfig"
}
]
}
}
},
- "types.ToolCall": {
+ "github_com_Tencent_WeKnora_internal_types.ToolCall": {
"type": "object",
"properties": {
"args": {
@@ -13099,13 +13190,13 @@
"description": "Execution result (contains Output)",
"allOf": [
{
- "$ref": "#/definitions/types.ToolResult"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ToolResult"
}
]
}
}
},
- "types.ToolResult": {
+ "github_com_Tencent_WeKnora_internal_types.ToolResult": {
"type": "object",
"properties": {
"data": {
@@ -13134,18 +13225,18 @@
}
}
},
- "types.UpdateMemberRoleRequest": {
+ "github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
}
},
- "types.UpdateOrganizationRequest": {
+ "github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest": {
"type": "object",
"properties": {
"avatar": {
@@ -13179,18 +13270,18 @@
}
}
},
- "types.UpdateSharePermissionRequest": {
+ "github_com_Tencent_WeKnora_internal_types.UpdateSharePermissionRequest": {
"type": "object",
"required": [
"permission"
],
"properties": {
"permission": {
- "$ref": "#/definitions/types.OrgMemberRole"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
}
},
- "types.User": {
+ "github_com_Tencent_WeKnora_internal_types.User": {
"type": "object",
"properties": {
"avatar": {
@@ -13229,7 +13320,7 @@
"description": "Association relationship, not stored in the database",
"allOf": [
{
- "$ref": "#/definitions/types.Tenant"
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
}
]
},
@@ -13247,7 +13338,7 @@
}
}
},
- "types.VLMConfig": {
+ "github_com_Tencent_WeKnora_internal_types.VLMConfig": {
"type": "object",
"properties": {
"api_key": {
@@ -13274,7 +13365,7 @@
}
}
},
- "types.WeKnoraCloudCredentials": {
+ "github_com_Tencent_WeKnora_internal_types.WeKnoraCloudCredentials": {
"type": "object",
"properties": {
"app_id": {
@@ -13285,7 +13376,7 @@
}
}
},
- "types.WebSearchConfig": {
+ "github_com_Tencent_WeKnora_internal_types.WebSearchConfig": {
"type": "object",
"properties": {
"api_key": {
@@ -13327,11 +13418,1109 @@
"description": "Deprecated: Use WebSearchProviderEntity.Parameters.APIKey instead.",
"type": "string"
},
+ "proxy_url": {
+ "description": "Optional per-request proxy override; normally empty — use WebSearchProviderEntity.Parameters.proxy_url. Merged at call time when set.",
+ "type": "string"
+ },
"rerank_model_id": {
"description": "重排模型ID(用于RAG压缩)",
"type": "string"
}
}
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiConfig": {
+ "type": "object",
+ "properties": {
+ "extraction_granularity": {
+ "description": "ExtractionGranularity controls how many candidate slugs Pass 0 extracts\nper document. Empty / unknown value is treated as WikiExtractionStandard.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiExtractionGranularity"
+ }
+ ]
+ },
+ "max_pages_per_ingest": {
+ "description": "MaxPagesPerIngest limits pages created/updated per ingest operation (0 = no limit)",
+ "type": "integer"
+ },
+ "synthesis_model_id": {
+ "description": "SynthesisModelID is the LLM model ID used for wiki page generation and updates",
+ "type": "string"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiExtractionGranularity": {
+ "type": "string",
+ "enum": [
+ "focused",
+ "standard",
+ "exhaustive"
+ ],
+ "x-enum-varnames": [
+ "WikiExtractionFocused",
+ "WikiExtractionStandard",
+ "WikiExtractionExhaustive"
+ ]
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiGraphData": {
+ "type": "object",
+ "properties": {
+ "edges": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiGraphEdge"
+ }
+ },
+ "nodes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiGraphNode"
+ }
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiGraphEdge": {
+ "type": "object",
+ "properties": {
+ "source": {
+ "description": "source slug",
+ "type": "string"
+ },
+ "target": {
+ "description": "target slug",
+ "type": "string"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiGraphNode": {
+ "type": "object",
+ "properties": {
+ "link_count": {
+ "description": "Number of inbound + outbound links",
+ "type": "integer"
+ },
+ "page_type": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiPage": {
+ "type": "object",
+ "properties": {
+ "aliases": {
+ "description": "Alternate names, abbreviations, acronyms or translated names",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "chunk_refs": {
+ "description": "ChunkRefs records the specific source-document chunks this page was\nbuilt from — one UUID per cited chunk. Populated during ingest from\nthe chunk-citation pass; refreshed wholesale whenever the page is\nre-materialized. Empty for summary pages (they are document-level\nsynopses and don't carry chunk-level citations). Use this when you\nneed to surface the underlying evidence for a wiki page, or to\nretract citations when a source document is deleted.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "content": {
+ "description": "Full markdown content",
+ "type": "string"
+ },
+ "created_at": {
+ "description": "Creation time",
+ "type": "string"
+ },
+ "deleted_at": {
+ "description": "Soft delete",
+ "allOf": [
+ {
+ "$ref": "#/definitions/gorm.DeletedAt"
+ }
+ ]
+ },
+ "id": {
+ "description": "Unique identifier (UUID)",
+ "type": "string"
+ },
+ "in_links": {
+ "description": "Slugs of pages that link TO this page (backlinks)",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "knowledge_base_id": {
+ "description": "Knowledge base this page belongs to",
+ "type": "string"
+ },
+ "out_links": {
+ "description": "Slugs of pages this page links to (outbound links)",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "page_metadata": {
+ "description": "Arbitrary metadata (tags, categories, dates, etc.)",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ "page_type": {
+ "description": "Page type: summary, entity, concept, index, log, synthesis, comparison",
+ "type": "string"
+ },
+ "slug": {
+ "description": "URL-friendly slug for addressing, e.g. \"entity/acme-corp\", \"concept/rag\"\nUnique within a knowledge base",
+ "type": "string"
+ },
+ "source_refs": {
+ "description": "References to source knowledge IDs that contributed to this page.\nFormat matches the legacy \"\u003cknowledge_id\u003e|\u003cdoc_title\u003e\" convention used\nacross the ingest pipeline, so retract / display code can split on `|`\nto recover the title. Document-level granularity.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "status": {
+ "description": "Page status: draft, published, archived",
+ "type": "string"
+ },
+ "summary": {
+ "description": "One-line summary for index listing",
+ "type": "string"
+ },
+ "tenant_id": {
+ "description": "Tenant ID for multi-tenant isolation",
+ "type": "integer"
+ },
+ "title": {
+ "description": "Human-readable title",
+ "type": "string"
+ },
+ "updated_at": {
+ "description": "Last update time",
+ "type": "string"
+ },
+ "version": {
+ "description": "Version number. Incremented only when a user-visible content field\n(title, content, summary, page_type, status) actually changes; pure\nbookkeeping writes (link maintenance, same-content re-ingest, status\nsync from background jobs) leave it untouched so it can be used as a\nreal \"the page was edited\" signal.",
+ "type": "integer"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiPageIssue": {
+ "type": "object",
+ "properties": {
+ "created_at": {
+ "type": "string"
+ },
+ "deleted_at": {
+ "$ref": "#/definitions/gorm.DeletedAt"
+ },
+ "description": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "issue_type": {
+ "type": "string"
+ },
+ "knowledge_base_id": {
+ "type": "string"
+ },
+ "reported_by": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ },
+ "suspected_knowledge_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "tenant_id": {
+ "type": "integer"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiPageListResponse": {
+ "type": "object",
+ "properties": {
+ "page": {
+ "type": "integer"
+ },
+ "page_size": {
+ "type": "integer"
+ },
+ "pages": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ },
+ "total": {
+ "type": "integer"
+ },
+ "total_pages": {
+ "type": "integer"
+ }
+ }
+ },
+ "github_com_Tencent_WeKnora_internal_types.WikiStats": {
+ "type": "object",
+ "properties": {
+ "is_active": {
+ "description": "whether wiki ingestion is currently running",
+ "type": "boolean"
+ },
+ "orphan_count": {
+ "description": "pages with no inbound links",
+ "type": "integer"
+ },
+ "pages_by_type": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ "pending_issues": {
+ "description": "number of pending wiki issues",
+ "type": "integer"
+ },
+ "pending_tasks": {
+ "description": "number of documents waiting to be ingested",
+ "type": "integer"
+ },
+ "recent_updates": {
+ "description": "last N updated pages",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage"
+ }
+ },
+ "total_links": {
+ "type": "integer"
+ },
+ "total_pages": {
+ "type": "integer"
+ }
+ }
+ },
+ "gorm.DeletedAt": {
+ "type": "object",
+ "properties": {
+ "time": {
+ "type": "string"
+ },
+ "valid": {
+ "description": "Valid is true if Time is not NULL",
+ "type": "boolean"
+ }
+ }
+ },
+ "internal_handler.CopyKnowledgeBaseRequest": {
+ "type": "object",
+ "required": [
+ "source_id"
+ ],
+ "properties": {
+ "source_id": {
+ "type": "string"
+ },
+ "target_id": {
+ "type": "string"
+ },
+ "task_id": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.CreateAgentRequest": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "avatar": {
+ "type": "string"
+ },
+ "config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CustomAgentConfig"
+ },
+ "description": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.CreateModelRequest": {
+ "type": "object",
+ "required": [
+ "name",
+ "parameters",
+ "source",
+ "type"
+ ],
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "parameters": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelParameters"
+ },
+ "source": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSource"
+ },
+ "type": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType"
+ }
+ }
+ },
+ "internal_handler.CreateStoreRequest": {
+ "type": "object",
+ "required": [
+ "connection_config",
+ "engine_type",
+ "name"
+ ],
+ "properties": {
+ "connection_config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ConnectionConfig"
+ },
+ "engine_type": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineType"
+ },
+ "index_config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.IndexConfig"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.DeleteTagRequest": {
+ "type": "object",
+ "properties": {
+ "exclude_ids": {
+ "description": "Chunk seq_ids to exclude from deletion",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "internal_handler.EvaluationRequest": {
+ "type": "object",
+ "properties": {
+ "chat_id": {
+ "description": "ID of chat model to use",
+ "type": "string"
+ },
+ "dataset_id": {
+ "description": "ID of dataset to evaluate",
+ "type": "string"
+ },
+ "knowledge_base_id": {
+ "description": "ID of knowledge base to use",
+ "type": "string"
+ },
+ "rerank_id": {
+ "description": "ID of rerank model to use",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.FabriTextRequest": {
+ "type": "object",
+ "required": [
+ "model_id"
+ ],
+ "properties": {
+ "model_id": {
+ "type": "string"
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "internal_handler.GetStorageEngineStatusResponse": {
+ "type": "object",
+ "properties": {
+ "engines": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/internal_handler.StorageEngineStatusItem"
+ }
+ },
+ "minio_env_available": {
+ "type": "boolean"
+ }
+ }
+ },
+ "internal_handler.GetSystemInfoResponse": {
+ "type": "object",
+ "properties": {
+ "build_time": {
+ "type": "string"
+ },
+ "commit_id": {
+ "type": "string"
+ },
+ "db_version": {
+ "type": "string"
+ },
+ "edition": {
+ "type": "string"
+ },
+ "go_version": {
+ "type": "string"
+ },
+ "graph_database_engine": {
+ "type": "string"
+ },
+ "keyword_index_engine": {
+ "type": "string"
+ },
+ "minio_enabled": {
+ "type": "boolean"
+ },
+ "vector_store_engine": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.KBModelConfigRequest": {
+ "type": "object",
+ "required": [
+ "llmModelId"
+ ],
+ "properties": {
+ "asr_config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ASRConfig"
+ },
+ "documentSplitting": {
+ "description": "文档分块配置",
+ "type": "object",
+ "properties": {
+ "childChunkSize": {
+ "type": "integer"
+ },
+ "chunkOverlap": {
+ "type": "integer"
+ },
+ "chunkSize": {
+ "type": "integer"
+ },
+ "enableParentChild": {
+ "type": "boolean"
+ },
+ "parentChunkSize": {
+ "type": "integer"
+ },
+ "parserEngineRules": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineRule"
+ }
+ },
+ "separators": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "embeddingModelId": {
+ "description": "optional when RAG indexing is disabled",
+ "type": "string"
+ },
+ "llmModelId": {
+ "type": "string"
+ },
+ "multimodal": {
+ "description": "多模态配置(仅模型相关;存储引擎在 storageProvider 中配置)",
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ }
+ }
+ },
+ "nodeExtract": {
+ "description": "知识图谱配置",
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ },
+ "nodes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.GraphNode"
+ }
+ },
+ "relations": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.GraphRelation"
+ }
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "text": {
+ "type": "string"
+ }
+ }
+ },
+ "questionGeneration": {
+ "description": "问题生成配置",
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ },
+ "questionCount": {
+ "type": "integer"
+ }
+ }
+ },
+ "storageProvider": {
+ "description": "存储引擎选择(\"local\" | \"minio\" | \"cos\"),影响文档上传与文档内图片存储,参数从全局设置读取",
+ "type": "string"
+ },
+ "vlm_config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig"
+ }
+ }
+ },
+ "internal_handler.RemoteModelCheckRequest": {
+ "type": "object",
+ "required": [
+ "modelName"
+ ],
+ "properties": {
+ "apiKey": {
+ "type": "string"
+ },
+ "baseUrl": {
+ "type": "string"
+ },
+ "customHeaders": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "dimension": {
+ "type": "integer"
+ },
+ "extraConfig": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "interfaceType": {
+ "type": "string"
+ },
+ "modelName": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "source": {
+ "description": "为空时按需默认为 \"remote\"",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.SearchMessagesRequest": {
+ "type": "object",
+ "required": [
+ "query"
+ ],
+ "properties": {
+ "limit": {
+ "description": "Maximum number of results to return (default: 20)",
+ "type": "integer"
+ },
+ "mode": {
+ "description": "Search mode: \"keyword\", \"vector\", \"hybrid\" (default: \"hybrid\")",
+ "type": "string"
+ },
+ "query": {
+ "description": "Query text for search",
+ "type": "string"
+ },
+ "session_ids": {
+ "description": "Filter by specific session IDs (optional)",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "internal_handler.StorageCheckRequest": {
+ "type": "object",
+ "properties": {
+ "cos": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.COSEngineConfig"
+ },
+ "minio": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MinIOEngineConfig"
+ },
+ "oss": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OSSEngineConfig"
+ },
+ "provider": {
+ "description": "\"minio\", \"cos\", \"tos\", \"s3\", \"oss\"",
+ "type": "string"
+ },
+ "s3": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.S3EngineConfig"
+ },
+ "tos": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.TOSEngineConfig"
+ }
+ }
+ },
+ "internal_handler.StorageCheckResponse": {
+ "type": "object",
+ "properties": {
+ "bucket_created": {
+ "type": "boolean"
+ },
+ "message": {
+ "type": "string"
+ },
+ "ok": {
+ "type": "boolean"
+ }
+ }
+ },
+ "internal_handler.StorageEngineStatusItem": {
+ "type": "object",
+ "properties": {
+ "available": {
+ "description": "whether the engine can be used",
+ "type": "boolean"
+ },
+ "description": {
+ "description": "short description for UI",
+ "type": "string"
+ },
+ "name": {
+ "description": "\"local\", \"minio\", \"cos\", \"tos\"",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.TestStoreRequest": {
+ "type": "object",
+ "required": [
+ "connection_config",
+ "engine_type"
+ ],
+ "properties": {
+ "connection_config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ConnectionConfig"
+ },
+ "engine_type": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineType"
+ }
+ }
+ },
+ "internal_handler.TextRelationExtractionRequest": {
+ "type": "object",
+ "required": [
+ "model_id",
+ "tags",
+ "text"
+ ],
+ "properties": {
+ "model_id": {
+ "type": "string"
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "text": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.UpdateAgentRequest": {
+ "type": "object",
+ "properties": {
+ "avatar": {
+ "type": "string"
+ },
+ "config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CustomAgentConfig"
+ },
+ "description": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.UpdateChunkRequest": {
+ "type": "object",
+ "properties": {
+ "chunk_index": {
+ "type": "integer"
+ },
+ "content": {
+ "type": "string"
+ },
+ "embedding": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ },
+ "end_at": {
+ "type": "integer"
+ },
+ "image_info": {
+ "type": "string"
+ },
+ "is_enabled": {
+ "type": "boolean"
+ },
+ "start_at": {
+ "type": "integer"
+ }
+ }
+ },
+ "internal_handler.UpdateKnowledgeBaseRequest": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "config": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseConfig"
+ },
+ "description": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.UpdateModelRequest": {
+ "type": "object",
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "parameters": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelParameters"
+ },
+ "source": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSource"
+ },
+ "type": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType"
+ }
+ }
+ },
+ "internal_handler.UpdateStoreRequest": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler.addSimilarQuestionsRequest": {
+ "type": "object",
+ "required": [
+ "similar_questions"
+ ],
+ "properties": {
+ "similar_questions": {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "internal_handler.updateLastFAQImportResultDisplayStatusRequest": {
+ "type": "object",
+ "required": [
+ "display_status"
+ ],
+ "properties": {
+ "display_status": {
+ "type": "string",
+ "enum": [
+ "open",
+ "close"
+ ]
+ }
+ }
+ },
+ "internal_handler_session.AttachmentUpload": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "description": "Base64-encoded file content",
+ "type": "string"
+ },
+ "file_name": {
+ "description": "Original filename",
+ "type": "string"
+ },
+ "file_size": {
+ "description": "File size in bytes",
+ "type": "integer"
+ }
+ }
+ },
+ "internal_handler_session.CreateKnowledgeQARequest": {
+ "type": "object",
+ "required": [
+ "query"
+ ],
+ "properties": {
+ "agent_enabled": {
+ "description": "Whether agent mode is enabled for this request",
+ "type": "boolean"
+ },
+ "agent_id": {
+ "description": "Selected custom agent ID (backend resolves shared agent and its tenant from share relation)",
+ "type": "string"
+ },
+ "attachment_uploads": {
+ "description": "Attached files (documents, audio, etc.)",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/internal_handler_session.AttachmentUpload"
+ }
+ },
+ "channel": {
+ "description": "Source channel: \"web\", \"api\", \"im\", etc.",
+ "type": "string"
+ },
+ "disable_title": {
+ "description": "Whether to disable auto title generation",
+ "type": "boolean"
+ },
+ "enable_memory": {
+ "description": "Whether memory feature is enabled for this request",
+ "type": "boolean"
+ },
+ "images": {
+ "description": "Attached images for multimodal chat",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/internal_handler_session.ImageAttachment"
+ }
+ },
+ "knowledge_base_ids": {
+ "description": "Selected knowledge base ID for this request",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "knowledge_ids": {
+ "description": "Selected knowledge ID for this request",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "mentioned_items": {
+ "description": "@mentioned knowledge bases and files",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/internal_handler_session.MentionedItemRequest"
+ }
+ },
+ "query": {
+ "description": "Query text for knowledge base search",
+ "type": "string"
+ },
+ "summary_model_id": {
+ "description": "Optional summary model ID for this request (overrides session default)",
+ "type": "string"
+ },
+ "web_search_enabled": {
+ "description": "Whether web search is enabled for this request",
+ "type": "boolean"
+ }
+ }
+ },
+ "internal_handler_session.CreateSessionRequest": {
+ "type": "object",
+ "properties": {
+ "description": {
+ "description": "Description for the session (optional)",
+ "type": "string"
+ },
+ "title": {
+ "description": "Title for the session (optional)",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler_session.GenerateTitleRequest": {
+ "type": "object",
+ "required": [
+ "messages"
+ ],
+ "properties": {
+ "messages": {
+ "description": "Messages to use as context for title generation",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Message"
+ }
+ }
+ }
+ },
+ "internal_handler_session.ImageAttachment": {
+ "type": "object",
+ "properties": {
+ "caption": {
+ "description": "VLM analysis result (context-aware, single call)",
+ "type": "string"
+ },
+ "data": {
+ "description": "base64 data URI from frontend (data:image/png;base64,...)",
+ "type": "string"
+ },
+ "url": {
+ "description": "serving URL after saving to storage",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler_session.MentionedItemRequest": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "kb_type": {
+ "description": "\"document\" or \"faq\" (only for kb type)",
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "description": "\"kb\" for knowledge base, \"file\" for file",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler_session.SearchKnowledgeRequest": {
+ "type": "object",
+ "required": [
+ "query"
+ ],
+ "properties": {
+ "knowledge_base_id": {
+ "description": "Single knowledge base ID (for backward compatibility)",
+ "type": "string"
+ },
+ "knowledge_base_ids": {
+ "description": "IDs of knowledge bases to search (multi-KB support)",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "knowledge_ids": {
+ "description": "IDs of specific knowledge (files) to search",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "query": {
+ "description": "Query text to search for",
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler_session.StopSessionRequest": {
+ "type": "object",
+ "required": [
+ "message_id"
+ ],
+ "properties": {
+ "message_id": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_handler_session.batchDeleteRequest": {
+ "type": "object",
+ "properties": {
+ "delete_all": {
+ "type": "boolean"
+ },
+ "ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
}
},
"securityDefinitions": {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index ccb6fcdb..88c48e5e 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -1,6 +1,67 @@
basePath: /api/v1
definitions:
- datasource.ConnectorMetadata:
+ github_com_Tencent_WeKnora_internal_application_service.WikiLintIssue:
+ properties:
+ auto_fixable:
+ type: boolean
+ description:
+ type: string
+ page_slug:
+ type: string
+ severity:
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueSeverity'
+ target_slug:
+ description: |-
+ TargetSlug identifies the other page involved in the issue (e.g. the
+ broken link target, or the entity slug for a missing cross-ref). It is
+ the structured field used by AutoFix instead of parsing Description.
+ type: string
+ type:
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueType'
+ type: object
+ github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueSeverity:
+ enum:
+ - info
+ - warning
+ - error
+ type: string
+ x-enum-varnames:
+ - SeverityInfo
+ - SeverityWarning
+ - SeverityError
+ github_com_Tencent_WeKnora_internal_application_service.WikiLintIssueType:
+ enum:
+ - orphan_page
+ - broken_link
+ - stale_ref
+ - missing_cross_ref
+ - empty_content
+ - duplicate_slug
+ type: string
+ x-enum-varnames:
+ - LintIssueOrphanPage
+ - LintIssueBrokenLink
+ - LintIssueStaleRef
+ - LintIssueMissingCrossRef
+ - LintIssueEmptyContent
+ - LintIssueDuplicateSlug
+ github_com_Tencent_WeKnora_internal_application_service.WikiLintReport:
+ properties:
+ health_score:
+ description: 0-100
+ type: integer
+ issues:
+ items:
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintIssue'
+ type: array
+ knowledge_base_id:
+ type: string
+ stats:
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiStats'
+ summary:
+ type: string
+ type: object
+ github_com_Tencent_WeKnora_internal_datasource.ConnectorMetadata:
properties:
auth_type:
description: '"oauth2", "api_key", "token", etc.'
@@ -22,15 +83,15 @@ definitions:
type:
type: string
type: object
- errors.AppError:
+ github_com_Tencent_WeKnora_internal_errors.AppError:
properties:
code:
- $ref: '#/definitions/errors.ErrorCode'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.ErrorCode'
details: {}
message:
type: string
type: object
- errors.ErrorCode:
+ github_com_Tencent_WeKnora_internal_errors.ErrorCode:
enum:
- 1000
- 1001
@@ -74,544 +135,7 @@ definitions:
- ErrAgentMissingAllowedTools
- ErrAgentInvalidMaxIterations
- ErrAgentInvalidTemperature
- github_com_Tencent_WeKnora_internal_errors.AppError:
- properties:
- code:
- $ref: '#/definitions/errors.ErrorCode'
- details: {}
- message:
- type: string
- type: object
- gorm.DeletedAt:
- properties:
- time:
- type: string
- valid:
- description: Valid is true if Time is not NULL
- type: boolean
- type: object
- handler.CopyKnowledgeBaseRequest:
- properties:
- source_id:
- type: string
- target_id:
- type: string
- task_id:
- type: string
- required:
- - source_id
- type: object
- handler.CreateAgentRequest:
- properties:
- avatar:
- type: string
- config:
- $ref: '#/definitions/types.CustomAgentConfig'
- description:
- type: string
- name:
- type: string
- required:
- - name
- type: object
- handler.CreateModelRequest:
- properties:
- description:
- type: string
- name:
- type: string
- parameters:
- $ref: '#/definitions/types.ModelParameters'
- source:
- $ref: '#/definitions/types.ModelSource'
- type:
- $ref: '#/definitions/types.ModelType'
- required:
- - name
- - parameters
- - source
- - type
- type: object
- handler.CreateStoreRequest:
- properties:
- connection_config:
- $ref: '#/definitions/types.ConnectionConfig'
- engine_type:
- $ref: '#/definitions/types.RetrieverEngineType'
- index_config:
- $ref: '#/definitions/types.IndexConfig'
- name:
- type: string
- required:
- - connection_config
- - engine_type
- - name
- type: object
- handler.DeleteTagRequest:
- properties:
- exclude_ids:
- description: Chunk seq_ids to exclude from deletion
- items:
- type: integer
- type: array
- type: object
- handler.EvaluationRequest:
- properties:
- chat_id:
- description: ID of chat model to use
- type: string
- dataset_id:
- description: ID of dataset to evaluate
- type: string
- knowledge_base_id:
- description: ID of knowledge base to use
- type: string
- rerank_id:
- description: ID of rerank model to use
- type: string
- type: object
- handler.FabriTextRequest:
- properties:
- model_id:
- type: string
- tags:
- items:
- type: string
- type: array
- required:
- - model_id
- type: object
- handler.GetStorageEngineStatusResponse:
- properties:
- engines:
- items:
- $ref: '#/definitions/handler.StorageEngineStatusItem'
- type: array
- minio_env_available:
- type: boolean
- type: object
- handler.GetSystemInfoResponse:
- properties:
- build_time:
- type: string
- commit_id:
- type: string
- db_version:
- type: string
- edition:
- type: string
- go_version:
- type: string
- graph_database_engine:
- type: string
- keyword_index_engine:
- type: string
- minio_enabled:
- type: boolean
- vector_store_engine:
- type: string
- version:
- type: string
- type: object
- handler.KBModelConfigRequest:
- properties:
- asr_config:
- $ref: '#/definitions/types.ASRConfig'
- documentSplitting:
- description: 文档分块配置
- properties:
- childChunkSize:
- type: integer
- chunkOverlap:
- type: integer
- chunkSize:
- type: integer
- enableParentChild:
- type: boolean
- parentChunkSize:
- type: integer
- parserEngineRules:
- items:
- $ref: '#/definitions/types.ParserEngineRule'
- type: array
- separators:
- items:
- type: string
- type: array
- type: object
- embeddingModelId:
- type: string
- llmModelId:
- type: string
- multimodal:
- description: 多模态配置(仅模型相关;存储引擎在 storageProvider 中配置)
- properties:
- enabled:
- type: boolean
- type: object
- nodeExtract:
- description: 知识图谱配置
- properties:
- enabled:
- type: boolean
- nodes:
- items:
- $ref: '#/definitions/types.GraphNode'
- type: array
- relations:
- items:
- $ref: '#/definitions/types.GraphRelation'
- type: array
- tags:
- items:
- type: string
- type: array
- text:
- type: string
- type: object
- questionGeneration:
- description: 问题生成配置
- properties:
- enabled:
- type: boolean
- questionCount:
- type: integer
- type: object
- storageProvider:
- description: 存储引擎选择("local" | "minio" | "cos"),影响文档上传与文档内图片存储,参数从全局设置读取
- type: string
- vlm_config:
- $ref: '#/definitions/types.VLMConfig'
- required:
- - embeddingModelId
- - llmModelId
- type: object
- handler.RemoteModelCheckRequest:
- properties:
- apiKey:
- type: string
- baseUrl:
- type: string
- modelName:
- type: string
- provider:
- type: string
- required:
- - baseUrl
- - modelName
- type: object
- handler.SearchMessagesRequest:
- properties:
- limit:
- description: 'Maximum number of results to return (default: 20)'
- type: integer
- mode:
- description: 'Search mode: "keyword", "vector", "hybrid" (default: "hybrid")'
- type: string
- query:
- description: Query text for search
- type: string
- session_ids:
- description: Filter by specific session IDs (optional)
- items:
- type: string
- type: array
- required:
- - query
- type: object
- handler.StorageCheckRequest:
- properties:
- cos:
- $ref: '#/definitions/types.COSEngineConfig'
- minio:
- $ref: '#/definitions/types.MinIOEngineConfig'
- oss:
- $ref: '#/definitions/types.OSSEngineConfig'
- provider:
- description: '"minio", "cos", "tos", "s3", "oss"'
- type: string
- s3:
- $ref: '#/definitions/types.S3EngineConfig'
- tos:
- $ref: '#/definitions/types.TOSEngineConfig'
- type: object
- handler.StorageCheckResponse:
- properties:
- bucket_created:
- type: boolean
- message:
- type: string
- ok:
- type: boolean
- type: object
- handler.StorageEngineStatusItem:
- properties:
- available:
- description: whether the engine can be used
- type: boolean
- description:
- description: short description for UI
- type: string
- name:
- description: '"local", "minio", "cos", "tos"'
- type: string
- type: object
- handler.TestStoreRequest:
- properties:
- connection_config:
- $ref: '#/definitions/types.ConnectionConfig'
- engine_type:
- $ref: '#/definitions/types.RetrieverEngineType'
- required:
- - connection_config
- - engine_type
- type: object
- handler.TextRelationExtractionRequest:
- properties:
- model_id:
- type: string
- tags:
- items:
- type: string
- type: array
- text:
- type: string
- required:
- - model_id
- - tags
- - text
- type: object
- handler.UpdateAgentRequest:
- properties:
- avatar:
- type: string
- config:
- $ref: '#/definitions/types.CustomAgentConfig'
- description:
- type: string
- name:
- type: string
- type: object
- handler.UpdateChunkRequest:
- properties:
- chunk_index:
- type: integer
- content:
- type: string
- embedding:
- items:
- type: number
- type: array
- end_at:
- type: integer
- image_info:
- type: string
- is_enabled:
- type: boolean
- start_at:
- type: integer
- type: object
- handler.UpdateKnowledgeBaseRequest:
- properties:
- config:
- $ref: '#/definitions/types.KnowledgeBaseConfig'
- description:
- type: string
- name:
- type: string
- required:
- - name
- type: object
- handler.UpdateModelRequest:
- properties:
- description:
- type: string
- name:
- type: string
- parameters:
- $ref: '#/definitions/types.ModelParameters'
- source:
- $ref: '#/definitions/types.ModelSource'
- type:
- $ref: '#/definitions/types.ModelType'
- type: object
- handler.UpdateStoreRequest:
- properties:
- name:
- type: string
- required:
- - name
- type: object
- handler.addSimilarQuestionsRequest:
- properties:
- similar_questions:
- items:
- type: string
- minItems: 1
- type: array
- required:
- - similar_questions
- type: object
- handler.updateLastFAQImportResultDisplayStatusRequest:
- properties:
- display_status:
- enum:
- - open
- - close
- type: string
- required:
- - display_status
- type: object
- handler_session.AttachmentUpload:
- properties:
- data:
- description: Base64-encoded file content
- type: string
- file_name:
- description: Original filename
- type: string
- file_size:
- description: File size in bytes
- type: integer
- type: object
- handler_session.CreateKnowledgeQARequest:
- properties:
- agent_enabled:
- description: Whether agent mode is enabled for this request
- type: boolean
- agent_id:
- description: Selected custom agent ID (backend resolves shared agent and its
- tenant from share relation)
- type: string
- attachment_uploads:
- description: Attached files (documents, audio, etc.)
- items:
- $ref: '#/definitions/handler_session.AttachmentUpload'
- type: array
- channel:
- description: 'Source channel: "web", "api", "im", etc.'
- type: string
- disable_title:
- description: Whether to disable auto title generation
- type: boolean
- enable_memory:
- description: Whether memory feature is enabled for this request
- type: boolean
- images:
- description: Attached images for multimodal chat
- items:
- $ref: '#/definitions/handler_session.ImageAttachment'
- type: array
- knowledge_base_ids:
- description: Selected knowledge base ID for this request
- items:
- type: string
- type: array
- knowledge_ids:
- description: Selected knowledge ID for this request
- items:
- type: string
- type: array
- mentioned_items:
- description: '@mentioned knowledge bases and files'
- items:
- $ref: '#/definitions/handler_session.MentionedItemRequest'
- type: array
- query:
- description: Query text for knowledge base search
- type: string
- summary_model_id:
- description: Optional summary model ID for this request (overrides session
- default)
- type: string
- web_search_enabled:
- description: Whether web search is enabled for this request
- type: boolean
- required:
- - query
- type: object
- handler_session.CreateSessionRequest:
- properties:
- description:
- description: Description for the session (optional)
- type: string
- title:
- description: Title for the session (optional)
- type: string
- type: object
- handler_session.GenerateTitleRequest:
- properties:
- messages:
- description: Messages to use as context for title generation
- items:
- $ref: '#/definitions/types.Message'
- type: array
- required:
- - messages
- type: object
- handler_session.ImageAttachment:
- properties:
- caption:
- description: VLM analysis result (context-aware, single call)
- type: string
- data:
- description: base64 data URI from frontend (data:image/png;base64,...)
- type: string
- url:
- description: serving URL after saving to storage
- type: string
- type: object
- handler_session.MentionedItemRequest:
- properties:
- id:
- type: string
- kb_type:
- description: '"document" or "faq" (only for kb type)'
- type: string
- name:
- type: string
- type:
- description: '"kb" for knowledge base, "file" for file'
- type: string
- type: object
- handler_session.SearchKnowledgeRequest:
- properties:
- knowledge_base_id:
- description: Single knowledge base ID (for backward compatibility)
- type: string
- knowledge_base_ids:
- description: IDs of knowledge bases to search (multi-KB support)
- items:
- type: string
- type: array
- knowledge_ids:
- description: IDs of specific knowledge (files) to search
- items:
- type: string
- type: array
- query:
- description: Query text to search for
- type: string
- required:
- - query
- type: object
- handler_session.StopSessionRequest:
- properties:
- message_id:
- type: string
- required:
- - message_id
- type: object
- handler_session.batchDeleteRequest:
- properties:
- delete_all:
- type: boolean
- ids:
- items:
- type: string
- type: array
- type: object
- types.ASRConfig:
+ github_com_Tencent_WeKnora_internal_types.ASRConfig:
properties:
enabled:
type: boolean
@@ -621,7 +145,7 @@ definitions:
model_id:
type: string
type: object
- types.AgentConfig:
+ github_com_Tencent_WeKnora_internal_types.AgentConfig:
properties:
allowed_skills:
description: Skill names whitelist (empty = allow all)
@@ -680,6 +204,10 @@ definitions:
Whether to execute independent tool calls in parallel (default: false).
When enabled and the LLM returns multiple tool calls, they run concurrently via errgroup.
type: boolean
+ retain_retrieval_history:
+ description: 'Whether to retain retrieval history (like wiki_read_page results)
+ across turns (default: false)'
+ type: boolean
retrieve_kb_only_when_mentioned:
description: 'Whether to retrieve knowledge base only when explicitly mentioned
with @ (default: false)'
@@ -723,7 +251,7 @@ definitions:
description: WebSearchProviderEntity ID (resolved from agent config)
type: string
type: object
- types.AgentStep:
+ github_com_Tencent_WeKnora_internal_types.AgentStep:
properties:
iteration:
description: Iteration number (0-indexed)
@@ -737,10 +265,10 @@ definitions:
tool_calls:
description: Tools called in this step (Act phase)
items:
- $ref: '#/definitions/types.ToolCall'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ToolCall'
type: array
type: object
- types.AnswerStrategy:
+ github_com_Tencent_WeKnora_internal_types.AnswerStrategy:
enum:
- all
- random
@@ -748,7 +276,7 @@ definitions:
x-enum-varnames:
- AnswerStrategyAll
- AnswerStrategyRandom
- types.COSEngineConfig:
+ github_com_Tencent_WeKnora_internal_types.COSEngineConfig:
properties:
app_id:
type: string
@@ -763,7 +291,7 @@ definitions:
secret_key:
type: string
type: object
- types.ChatHistoryConfig:
+ github_com_Tencent_WeKnora_internal_types.ChatHistoryConfig:
properties:
embedding_model_id:
description: |-
@@ -779,7 +307,7 @@ definitions:
This is set internally when the feature is first enabled; users should not set this directly.
type: string
type: object
- types.ChunkingConfig:
+ github_com_Tencent_WeKnora_internal_types.ChunkingConfig:
properties:
child_chunk_size:
description: |-
@@ -812,7 +340,7 @@ definitions:
ParserEngineRules configures which parser engine to use for each file type.
When empty, the builtin engine is used for all types.
items:
- $ref: '#/definitions/types.ParserEngineRule'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineRule'
type: array
separators:
description: Separators
@@ -820,7 +348,7 @@ definitions:
type: string
type: array
type: object
- types.ConnectionConfig:
+ github_com_Tencent_WeKnora_internal_types.ConnectionConfig:
properties:
addr:
description: Common
@@ -854,7 +382,7 @@ definitions:
Auto-populated by TestConnection on successful connectivity check.
type: string
type: object
- types.ContextCompressionStrategy:
+ github_com_Tencent_WeKnora_internal_types.ContextCompressionStrategy:
enum:
- sliding_window
- smart
@@ -862,11 +390,11 @@ definitions:
x-enum-varnames:
- ContextCompressionSlidingWindow
- ContextCompressionSmart
- types.ContextConfig:
+ github_com_Tencent_WeKnora_internal_types.ContextConfig:
properties:
compression_strategy:
allOf:
- - $ref: '#/definitions/types.ContextCompressionStrategy'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ContextCompressionStrategy'
description: 'Compression strategy: "sliding_window" or "smart"'
max_tokens:
description: Maximum tokens allowed in LLM context
@@ -880,7 +408,7 @@ definitions:
description: 'Summarize threshold: number of messages before summarization'
type: integer
type: object
- types.ConversationConfig:
+ github_com_Tencent_WeKnora_internal_types.ConversationConfig:
properties:
context_template:
description: ContextTemplate is the prompt template for summarizing retrieval
@@ -930,7 +458,7 @@ definitions:
vector_threshold:
type: number
type: object
- types.CreateOrganizationRequest:
+ github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest:
properties:
avatar:
description: optional avatar URL
@@ -952,18 +480,26 @@ definitions:
required:
- name
type: object
- types.CredentialsConfig:
+ github_com_Tencent_WeKnora_internal_types.CredentialsConfig:
properties:
weknoracloud:
- $ref: '#/definitions/types.WeKnoraCloudCredentials'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WeKnoraCloudCredentials'
type: object
- types.CustomAgentConfig:
+ github_com_Tencent_WeKnora_internal_types.CustomAgentConfig:
properties:
agent_mode:
description: |-
===== Basic Settings =====
Agent mode: "quick-answer" for RAG mode, "smart-reasoning" for ReAct agent mode
type: string
+ agent_type:
+ description: |-
+ AgentType is a preset category under smart-reasoning mode that pre-fills
+ system prompt, allowed tools and recommended KB compatibility.
+ Valid values: "rag-qa", "wiki-qa", "hybrid-rag-wiki", "custom".
+ Empty / unknown values are treated as "custom" (no preset applied).
+ Ignored for quick-answer mode.
+ type: string
allowed_tools:
description: Allowed tools (only for agent type)
items:
@@ -1087,6 +623,9 @@ definitions:
rerank_top_k:
description: Rerank top K
type: integer
+ retain_retrieval_history:
+ description: Whether to retain retrieval history across turns
+ type: boolean
retrieve_kb_only_when_mentioned:
description: |-
Whether to retrieve knowledge base only when explicitly mentioned with @ (default: false)
@@ -1169,7 +708,7 @@ definitions:
If empty, the tenant's default provider (is_default=true) is used.
type: string
type: object
- types.DataSource:
+ github_com_Tencent_WeKnora_internal_types.DataSource:
properties:
config:
description: |-
@@ -1212,7 +751,7 @@ definitions:
type: array
latest_sync_log:
allOf:
- - $ref: '#/definitions/types.SyncLog'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog'
description: Latest sync log (not stored in DB, populated on query)
name:
description: User-friendly name
@@ -1246,24 +785,24 @@ definitions:
description: Last update timestamp
type: string
type: object
- types.EmbeddingParameters:
+ github_com_Tencent_WeKnora_internal_types.EmbeddingParameters:
properties:
dimension:
type: integer
truncate_prompt_tokens:
type: integer
type: object
- types.ExtractConfig:
+ github_com_Tencent_WeKnora_internal_types.ExtractConfig:
properties:
enabled:
type: boolean
nodes:
items:
- $ref: '#/definitions/types.GraphNode'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.GraphNode'
type: array
relations:
items:
- $ref: '#/definitions/types.GraphRelation'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.GraphRelation'
type: array
tags:
items:
@@ -1272,14 +811,14 @@ definitions:
text:
type: string
type: object
- types.FAQBatchUpsertPayload:
+ github_com_Tencent_WeKnora_internal_types.FAQBatchUpsertPayload:
properties:
dry_run:
description: 仅验证,不实际导入
type: boolean
entries:
items:
- $ref: '#/definitions/types.FAQEntryPayload'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload'
type: array
knowledge_id:
type: string
@@ -1294,23 +833,23 @@ definitions:
required:
- entries
type: object
- types.FAQConfig:
+ github_com_Tencent_WeKnora_internal_types.FAQConfig:
properties:
index_mode:
- $ref: '#/definitions/types.FAQIndexMode'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQIndexMode'
question_index_mode:
- $ref: '#/definitions/types.FAQQuestionIndexMode'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQQuestionIndexMode'
type: object
- types.FAQEntryFieldsBatchUpdate:
+ github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsBatchUpdate:
properties:
by_id:
additionalProperties:
- $ref: '#/definitions/types.FAQEntryFieldsUpdate'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate'
description: ByID 按条目ID更新,key为条目ID (seq_id)
type: object
by_tag:
additionalProperties:
- $ref: '#/definitions/types.FAQEntryFieldsUpdate'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate'
description: ByTag 按Tag批量更新,key为TagID (seq_id)
type: object
exclude_ids:
@@ -1319,7 +858,7 @@ definitions:
type: integer
type: array
type: object
- types.FAQEntryFieldsUpdate:
+ github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate:
properties:
is_enabled:
type: boolean
@@ -1328,10 +867,10 @@ definitions:
tag_id:
type: integer
type: object
- types.FAQEntryPayload:
+ github_com_Tencent_WeKnora_internal_types.FAQEntryPayload:
properties:
answer_strategy:
- $ref: '#/definitions/types.AnswerStrategy'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.AnswerStrategy'
answers:
items:
type: string
@@ -1360,7 +899,7 @@ definitions:
required:
- standard_question
type: object
- types.FAQIndexMode:
+ github_com_Tencent_WeKnora_internal_types.FAQIndexMode:
enum:
- question_only
- question_answer
@@ -1368,7 +907,7 @@ definitions:
x-enum-varnames:
- FAQIndexModeQuestionOnly
- FAQIndexModeQuestionAnswer
- types.FAQQuestionIndexMode:
+ github_com_Tencent_WeKnora_internal_types.FAQQuestionIndexMode:
enum:
- combined
- separate
@@ -1376,7 +915,7 @@ definitions:
x-enum-varnames:
- FAQQuestionIndexModeCombined
- FAQQuestionIndexModeSeparate
- types.FAQSearchRequest:
+ github_com_Tencent_WeKnora_internal_types.FAQSearchRequest:
properties:
first_priority_tag_ids:
description: 第一优先级标签ID列表,限定命中范围,优先级最高
@@ -1400,7 +939,7 @@ definitions:
required:
- query_text
type: object
- types.GraphNode:
+ github_com_Tencent_WeKnora_internal_types.GraphNode:
properties:
attributes:
items:
@@ -1413,7 +952,7 @@ definitions:
name:
type: string
type: object
- types.GraphRelation:
+ github_com_Tencent_WeKnora_internal_types.GraphRelation:
properties:
node1:
type: string
@@ -1422,22 +961,25 @@ definitions:
type:
type: string
type: object
- types.ImageProcessingConfig:
+ github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig:
properties:
model_id:
description: Model ID
type: string
type: object
- types.IndexConfig:
+ github_com_Tencent_WeKnora_internal_types.IndexConfig:
properties:
collection_name:
description: Milvus
type: string
collection_prefix:
- description: Qdrant
+ description: Qdrant, Weaviate
type: string
+ desired_shard_count:
+ description: 'Weaviate: number of shards per collection'
+ type: integer
index_name:
- description: ES, OpenSearch
+ description: '--- Existing fields ---'
type: string
number_of_replicas:
description: ES, OpenSearch
@@ -1445,12 +987,39 @@ definitions:
number_of_shards:
description: ES, OpenSearch
type: integer
+ replica_number:
+ description: 'Milvus: in-memory replica count (LoadCollection)'
+ type: integer
+ replication_factor:
+ description: 'Qdrant, Weaviate: number of replicas'
+ type: integer
+ shard_number:
+ description: '--- Scalability fields ---'
+ type: integer
+ shards_num:
+ description: 'Milvus: number of shards per collection (CreateCollection)'
+ type: integer
type: object
- types.InviteMemberRequest:
+ github_com_Tencent_WeKnora_internal_types.IndexingStrategy:
+ properties:
+ graph_enabled:
+ description: GraphEnabled enables knowledge graph entity/relation extraction
+ type: boolean
+ keyword_enabled:
+ description: KeywordEnabled enables keyword-based (BM25) search
+ type: boolean
+ vector_enabled:
+ description: VectorEnabled enables semantic vector embedding and search
+ type: boolean
+ wiki_enabled:
+ description: WikiEnabled enables automatic wiki page generation from documents
+ type: boolean
+ type: object
+ github_com_Tencent_WeKnora_internal_types.InviteMemberRequest:
properties:
role:
allOf:
- - $ref: '#/definitions/types.OrgMemberRole'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
description: 'Role to assign: admin/editor/viewer'
user_id:
description: User ID to invite
@@ -1459,7 +1028,7 @@ definitions:
- role
- user_id
type: object
- types.JoinByOrganizationIDRequest:
+ github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest:
properties:
message:
description: Optional message for join request
@@ -1469,12 +1038,12 @@ definitions:
type: string
role:
allOf:
- - $ref: '#/definitions/types.OrgMemberRole'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
description: 'Optional: requested role (admin/editor/viewer); default viewer'
required:
- organization_id
type: object
- types.JoinOrganizationRequest:
+ github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest:
properties:
invite_code:
maxLength: 32
@@ -1483,7 +1052,7 @@ definitions:
required:
- invite_code
type: object
- types.Knowledge:
+ github_com_Tencent_WeKnora_internal_types.Knowledge:
properties:
channel:
description: Channel indicates through which channel the knowledge was ingested
@@ -1574,18 +1143,18 @@ definitions:
description: Last updated time of the knowledge
type: string
type: object
- types.KnowledgeBase:
+ github_com_Tencent_WeKnora_internal_types.KnowledgeBase:
properties:
asr_config:
allOf:
- - $ref: '#/definitions/types.ASRConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ASRConfig'
description: ASR config (Automatic Speech Recognition)
chunk_count:
description: Chunk count (not stored in database, calculated on query)
type: integer
chunking_config:
allOf:
- - $ref: '#/definitions/types.ChunkingConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ChunkingConfig'
description: Chunking configuration
created_at:
description: Creation time of the knowledge base
@@ -1602,11 +1171,11 @@ definitions:
type: string
extract_config:
allOf:
- - $ref: '#/definitions/types.ExtractConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ExtractConfig'
description: Extract config
faq_config:
allOf:
- - $ref: '#/definitions/types.FAQConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQConfig'
description: FAQConfig stores FAQ specific configuration such as indexing
strategy
id:
@@ -1614,8 +1183,14 @@ definitions:
type: string
image_processing_config:
allOf:
- - $ref: '#/definitions/types.ImageProcessingConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig'
description: Image processing configuration
+ indexing_strategy:
+ allOf:
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.IndexingStrategy'
+ description: |-
+ IndexingStrategy controls which indexing pipelines are active for this knowledge base.
+ Pipelines: vector search, keyword search, wiki generation, knowledge graph extraction.
is_pinned:
description: Whether this knowledge base is pinned to the top of the list
type: boolean
@@ -1642,7 +1217,7 @@ definitions:
type: integer
question_generation_config:
allOf:
- - $ref: '#/definitions/types.QuestionGenerationConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig'
description: QuestionGenerationConfig stores question generation configuration
for document knowledge bases
share_count:
@@ -1651,12 +1226,12 @@ definitions:
type: integer
storage_config:
allOf:
- - $ref: '#/definitions/types.StorageConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.StorageConfig'
description: 'Deprecated: legacy COS config column. Kept for backward compatibility
with old data.'
storage_provider_config:
allOf:
- - $ref: '#/definitions/types.StorageProviderConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.StorageProviderConfig'
description: 'Storage provider config (new): only stores provider selection;
credentials from tenant StorageEngineConfig'
summary_model_id:
@@ -1671,27 +1246,51 @@ definitions:
updated_at:
description: Last updated time of the knowledge base
type: string
+ vector_store_id:
+ description: |-
+ VectorStoreID references the VectorStore this knowledge base is bound to.
+ When nil, the KB falls back to the tenant's effective engines derived from
+ the RETRIEVE_DRIVER environment variable (env store flow).
+ This field is set once at creation time and must not be modified afterwards;
+ enforcement lives at the GORM layer (`<-:create`) plus the service-layer
+ KB update path, which omits this field from its update DTO.
+ type: string
vlm_config:
allOf:
- - $ref: '#/definitions/types.VLMConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig'
description: VLM config
+ wiki_config:
+ allOf:
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiConfig'
+ description: WikiConfig stores wiki-specific configuration (only for wiki
+ type knowledge bases)
type: object
- types.KnowledgeBaseConfig:
+ github_com_Tencent_WeKnora_internal_types.KnowledgeBaseConfig:
properties:
chunking_config:
allOf:
- - $ref: '#/definitions/types.ChunkingConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ChunkingConfig'
description: Chunking configuration
faq_config:
allOf:
- - $ref: '#/definitions/types.FAQConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQConfig'
description: FAQ configuration (only for FAQ type knowledge bases)
image_processing_config:
allOf:
- - $ref: '#/definitions/types.ImageProcessingConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig'
description: Image processing configuration
+ indexing_strategy:
+ allOf:
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.IndexingStrategy'
+ description: |-
+ IndexingStrategy controls which indexing pipelines are active.
+ nil means "no change" when updating (preserves existing strategy).
+ wiki_config:
+ allOf:
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiConfig'
+ description: Wiki configuration (only for wiki-enabled knowledge bases)
type: object
- types.KnowledgeBaseShareResponse:
+ github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse:
properties:
chunk_count:
type: integer
@@ -1729,43 +1328,43 @@ definitions:
source_tenant_id:
type: integer
type: object
- types.ListMembersResponse:
+ github_com_Tencent_WeKnora_internal_types.ListMembersResponse:
properties:
members:
items:
- $ref: '#/definitions/types.OrganizationMemberResponse'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrganizationMemberResponse'
type: array
total:
type: integer
type: object
- types.ListOrganizationsResponse:
+ github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse:
properties:
organizations:
items:
- $ref: '#/definitions/types.OrganizationResponse'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrganizationResponse'
type: array
resource_counts:
allOf:
- - $ref: '#/definitions/types.ResourceCountsByOrgResponse'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ResourceCountsByOrgResponse'
description: 各空间内知识库/智能体数量,供列表侧栏展示
total:
type: integer
type: object
- types.ListSharesResponse:
+ github_com_Tencent_WeKnora_internal_types.ListSharesResponse:
properties:
shares:
items:
- $ref: '#/definitions/types.KnowledgeBaseShareResponse'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse'
type: array
total:
type: integer
type: object
- types.LocalEngineConfig:
+ github_com_Tencent_WeKnora_internal_types.LocalEngineConfig:
properties:
path_prefix:
type: string
type: object
- types.LoginRequest:
+ github_com_Tencent_WeKnora_internal_types.LoginRequest:
properties:
email:
type: string
@@ -1776,7 +1375,7 @@ definitions:
- email
- password
type: object
- types.LoginResponse:
+ github_com_Tencent_WeKnora_internal_types.LoginResponse:
properties:
message:
type: string
@@ -1785,13 +1384,13 @@ definitions:
success:
type: boolean
tenant:
- $ref: '#/definitions/types.Tenant'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant'
token:
type: string
user:
- $ref: '#/definitions/types.User'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.User'
type: object
- types.MCPAdvancedConfig:
+ github_com_Tencent_WeKnora_internal_types.MCPAdvancedConfig:
properties:
retry_count:
description: 'Number of retries, default: 3'
@@ -1803,7 +1402,7 @@ definitions:
description: 'Timeout in seconds, default: 30'
type: integer
type: object
- types.MCPAuthConfig:
+ github_com_Tencent_WeKnora_internal_types.MCPAuthConfig:
properties:
api_key:
type: string
@@ -1814,20 +1413,20 @@ definitions:
token:
type: string
type: object
- types.MCPEnvVars:
+ github_com_Tencent_WeKnora_internal_types.MCPEnvVars:
additionalProperties:
type: string
type: object
- types.MCPHeaders:
+ github_com_Tencent_WeKnora_internal_types.MCPHeaders:
additionalProperties:
type: string
type: object
- types.MCPService:
+ github_com_Tencent_WeKnora_internal_types.MCPService:
properties:
advanced_config:
- $ref: '#/definitions/types.MCPAdvancedConfig'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPAdvancedConfig'
auth_config:
- $ref: '#/definitions/types.MCPAuthConfig'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPAuthConfig'
created_at:
type: string
deleted_at:
@@ -1838,10 +1437,10 @@ definitions:
type: boolean
env_vars:
allOf:
- - $ref: '#/definitions/types.MCPEnvVars'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPEnvVars'
description: Environment variables for stdio
headers:
- $ref: '#/definitions/types.MCPHeaders'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPHeaders'
id:
type: string
is_builtin:
@@ -1851,19 +1450,19 @@ definitions:
type: string
stdio_config:
allOf:
- - $ref: '#/definitions/types.MCPStdioConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPStdioConfig'
description: Required for stdio transport
tenant_id:
type: integer
transport_type:
- $ref: '#/definitions/types.MCPTransportType'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPTransportType'
updated_at:
type: string
url:
description: 'Optional: required for SSE/HTTP Streamable'
type: string
type: object
- types.MCPStdioConfig:
+ github_com_Tencent_WeKnora_internal_types.MCPStdioConfig:
properties:
args:
description: Command arguments array
@@ -1874,7 +1473,7 @@ definitions:
description: 'Command: "uvx" or "npx"'
type: string
type: object
- types.MCPTransportType:
+ github_com_Tencent_WeKnora_internal_types.MCPTransportType:
enum:
- sse
- http-streamable
@@ -1892,7 +1491,7 @@ definitions:
- MCPTransportSSE
- MCPTransportHTTPStreamable
- MCPTransportStdio
- types.ManualKnowledgePayload:
+ github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload:
properties:
channel:
type: string
@@ -1905,7 +1504,7 @@ definitions:
title:
type: string
type: object
- types.MatchType:
+ github_com_Tencent_WeKnora_internal_types.MatchType:
enum:
- 0
- 1
@@ -1946,7 +1545,7 @@ definitions:
- MatchTypeWebSearch
- MatchTypeDirectLoad
- MatchTypeDataAnalysis
- types.MentionedItem:
+ github_com_Tencent_WeKnora_internal_types.MentionedItem:
properties:
id:
type: string
@@ -1959,7 +1558,7 @@ definitions:
description: '"kb" for knowledge base, "file" for file'
type: string
type: object
- types.Message:
+ github_com_Tencent_WeKnora_internal_types.Message:
properties:
agent_duration_ms:
description: Agent total execution duration in milliseconds (from query start
@@ -1971,12 +1570,12 @@ definitions:
This contains the detailed reasoning process and tool calls made by the agent
Stored for user history display, but NOT included in LLM context to avoid redundancy
items:
- $ref: '#/definitions/types.AgentStep'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.AgentStep'
type: array
attachments:
description: Attached files (documents, audio, etc., for user messages)
items:
- $ref: '#/definitions/types.MessageAttachment'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MessageAttachment'
type: array
channel:
description: Channel indicates the source channel of this message (e.g., "web",
@@ -1998,7 +1597,7 @@ definitions:
images:
description: Attached images with OCR/Caption text (for user messages)
items:
- $ref: '#/definitions/types.MessageImage'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MessageImage'
type: array
is_completed:
description: Whether message generation is complete
@@ -2015,14 +1614,14 @@ definitions:
knowledge_references:
description: References to knowledge chunks used in the response
items:
- $ref: '#/definitions/types.SearchResult'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SearchResult'
type: array
mentioned_items:
description: |-
Mentioned knowledge bases and files (for user messages)
Stores the @mentioned items when user sends a message
items:
- $ref: '#/definitions/types.MentionedItem'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MentionedItem'
type: array
request_id:
description: Request identifier for tracking API requests
@@ -2037,7 +1636,7 @@ definitions:
description: Last update timestamp
type: string
type: object
- types.MessageAttachment:
+ github_com_Tencent_WeKnora_internal_types.MessageAttachment:
properties:
content:
description: Extracted text content (for small text files)
@@ -2061,14 +1660,14 @@ definitions:
description: Storage URL (provider://path)
type: string
type: object
- types.MessageImage:
+ github_com_Tencent_WeKnora_internal_types.MessageImage:
properties:
caption:
type: string
url:
type: string
type: object
- types.MinIOEngineConfig:
+ github_com_Tencent_WeKnora_internal_types.MinIOEngineConfig:
properties:
access_key_id:
type: string
@@ -2086,7 +1685,7 @@ definitions:
use_ssl:
type: boolean
type: object
- types.ModelParameters:
+ github_com_Tencent_WeKnora_internal_types.ModelParameters:
properties:
api_key:
type: string
@@ -2098,8 +1697,17 @@ definitions:
type: string
base_url:
type: string
+ custom_headers:
+ additionalProperties:
+ type: string
+ description: |-
+ CustomHeaders 允许在调用远程模型 API 时附加自定义 HTTP 请求头,
+ 用途类似 Python OpenAI SDK 的 extra_headers 参数,
+ 常见场景包括透传企业网关鉴权信息、追踪 ID、路由标识等。
+ 保留字段(Authorization、api-key、Content-Type、Accept 等)会在运行期被忽略以避免破坏签名/鉴权流程。
+ type: object
embedding_parameters:
- $ref: '#/definitions/types.EmbeddingParameters'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.EmbeddingParameters'
extra_config:
additionalProperties:
type: string
@@ -2117,7 +1725,7 @@ definitions:
description: Whether the model accepts image/multimodal input
type: boolean
type: object
- types.ModelSource:
+ github_com_Tencent_WeKnora_internal_types.ModelSource:
enum:
- local
- remote
@@ -2191,7 +1799,7 @@ definitions:
- ModelSourceNvidia
- ModelSourceNovita
- ModelSourceAzureOpenAI
- types.ModelType:
+ github_com_Tencent_WeKnora_internal_types.ModelType:
enum:
- Embedding
- Rerank
@@ -2217,7 +1825,7 @@ definitions:
- ModelTypeKnowledgeQA
- ModelTypeVLLM
- ModelTypeASR
- types.OIDCAuthURLResponse:
+ github_com_Tencent_WeKnora_internal_types.OIDCAuthURLResponse:
properties:
authorization_url:
type: string
@@ -2228,7 +1836,7 @@ definitions:
success:
type: boolean
type: object
- types.OIDCConfigResponse:
+ github_com_Tencent_WeKnora_internal_types.OIDCConfigResponse:
properties:
enabled:
type: boolean
@@ -2237,7 +1845,7 @@ definitions:
success:
type: boolean
type: object
- types.OSSEngineConfig:
+ github_com_Tencent_WeKnora_internal_types.OSSEngineConfig:
properties:
access_key:
type: string
@@ -2258,7 +1866,7 @@ definitions:
use_temp_bucket:
type: boolean
type: object
- types.OrgMemberRole:
+ github_com_Tencent_WeKnora_internal_types.OrgMemberRole:
enum:
- admin
- editor
@@ -2268,7 +1876,7 @@ definitions:
- OrgRoleAdmin
- OrgRoleEditor
- OrgRoleViewer
- types.OrganizationMemberResponse:
+ github_com_Tencent_WeKnora_internal_types.OrganizationMemberResponse:
properties:
avatar:
type: string
@@ -2287,7 +1895,7 @@ definitions:
username:
type: string
type: object
- types.OrganizationResponse:
+ github_com_Tencent_WeKnora_internal_types.OrganizationResponse:
properties:
agent_share_count:
description: 共享到该组织的智能体数量
@@ -2335,7 +1943,7 @@ definitions:
updated_at:
type: string
type: object
- types.ParserEngineConfig:
+ github_com_Tencent_WeKnora_internal_types.ParserEngineConfig:
properties:
mineru_api_key:
description: MinerU 云 API Key
@@ -2366,7 +1974,7 @@ definitions:
description: MinerU 自建解析参数
type: string
type: object
- types.ParserEngineRule:
+ github_com_Tencent_WeKnora_internal_types.ParserEngineRule:
properties:
engine:
type: string
@@ -2375,7 +1983,7 @@ definitions:
type: string
type: array
type: object
- types.QuestionGenerationConfig:
+ github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig:
properties:
enabled:
type: boolean
@@ -2384,7 +1992,7 @@ definitions:
10)'
type: integer
type: object
- types.RegisterRequest:
+ github_com_Tencent_WeKnora_internal_types.RegisterRequest:
properties:
email:
type: string
@@ -2400,18 +2008,18 @@ definitions:
- password
- username
type: object
- types.RegisterResponse:
+ github_com_Tencent_WeKnora_internal_types.RegisterResponse:
properties:
message:
type: string
success:
type: boolean
tenant:
- $ref: '#/definitions/types.Tenant'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant'
user:
- $ref: '#/definitions/types.User'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.User'
type: object
- types.RequestRoleUpgradeRequest:
+ github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest:
properties:
message:
description: Optional message explaining the reason
@@ -2419,12 +2027,12 @@ definitions:
type: string
requested_role:
allOf:
- - $ref: '#/definitions/types.OrgMemberRole'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
description: The role user wants to upgrade to
required:
- requested_role
type: object
- types.Resource:
+ github_com_Tencent_WeKnora_internal_types.Resource:
properties:
description:
description: Optional description
@@ -2455,7 +2063,7 @@ definitions:
description: URL to access in external system
type: string
type: object
- types.ResourceCountsByOrgResponse:
+ github_com_Tencent_WeKnora_internal_types.ResourceCountsByOrgResponse:
properties:
agents:
properties:
@@ -2472,7 +2080,7 @@ definitions:
type: object
type: object
type: object
- types.RetrievalConfig:
+ github_com_Tencent_WeKnora_internal_types.RetrievalConfig:
properties:
embedding_top_k:
description: 'EmbeddingTopK is the maximum number of chunks returned by vector
@@ -2499,18 +2107,18 @@ definitions:
default: 0.15)'
type: number
type: object
- types.RetrieverEngineParams:
+ github_com_Tencent_WeKnora_internal_types.RetrieverEngineParams:
properties:
retriever_engine_type:
allOf:
- - $ref: '#/definitions/types.RetrieverEngineType'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineType'
description: Retriever engine type
retriever_type:
allOf:
- - $ref: '#/definitions/types.RetrieverType'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverType'
description: Retriever type
type: object
- types.RetrieverEngineType:
+ github_com_Tencent_WeKnora_internal_types.RetrieverEngineType:
enum:
- postgres
- elasticsearch
@@ -2530,14 +2138,14 @@ definitions:
- MilvusRetrieverEngineType
- WeaviateRetrieverEngineType
- SQLiteRetrieverEngineType
- types.RetrieverEngines:
+ github_com_Tencent_WeKnora_internal_types.RetrieverEngines:
properties:
engines:
items:
- $ref: '#/definitions/types.RetrieverEngineParams'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineParams'
type: array
type: object
- types.RetrieverType:
+ github_com_Tencent_WeKnora_internal_types.RetrieverType:
enum:
- keywords
- vector
@@ -2555,7 +2163,7 @@ definitions:
- KeywordsRetrieverType
- VectorRetrieverType
- WebSearchRetrieverType
- types.ReviewJoinRequestRequest:
+ github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest:
properties:
approved:
type: boolean
@@ -2564,11 +2172,11 @@ definitions:
type: string
role:
allOf:
- - $ref: '#/definitions/types.OrgMemberRole'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
description: 'Optional: role to assign when approving; overrides applicant''s
requested role'
type: object
- types.S3EngineConfig:
+ github_com_Tencent_WeKnora_internal_types.S3EngineConfig:
properties:
access_key:
type: string
@@ -2583,7 +2191,7 @@ definitions:
secret_key:
type: string
type: object
- types.SearchParams:
+ github_com_Tencent_WeKnora_internal_types.SearchParams:
properties:
disable_keywords_match:
type: boolean
@@ -2627,7 +2235,7 @@ definitions:
vector_threshold:
type: number
type: object
- types.SearchResult:
+ github_com_Tencent_WeKnora_internal_types.SearchResult:
properties:
chunk_index:
description: Chunk index
@@ -2681,7 +2289,7 @@ definitions:
type: string
match_type:
allOf:
- - $ref: '#/definitions/types.MatchType'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MatchType'
description: Match type
matched_content:
description: |-
@@ -2711,7 +2319,7 @@ definitions:
type: string
type: array
type: object
- types.Session:
+ github_com_Tencent_WeKnora_internal_types.Session:
properties:
created_at:
type: string
@@ -2732,17 +2340,17 @@ definitions:
updated_at:
type: string
type: object
- types.ShareKnowledgeBaseRequest:
+ github_com_Tencent_WeKnora_internal_types.ShareKnowledgeBaseRequest:
properties:
organization_id:
type: string
permission:
- $ref: '#/definitions/types.OrgMemberRole'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
required:
- organization_id
- permission
type: object
- types.StorageConfig:
+ github_com_Tencent_WeKnora_internal_types.StorageConfig:
properties:
app_id:
type: string
@@ -2759,31 +2367,31 @@ definitions:
secret_key:
type: string
type: object
- types.StorageEngineConfig:
+ github_com_Tencent_WeKnora_internal_types.StorageEngineConfig:
properties:
cos:
- $ref: '#/definitions/types.COSEngineConfig'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.COSEngineConfig'
default_provider:
description: '"local", "minio", "cos", "tos", "s3", "oss"'
type: string
local:
- $ref: '#/definitions/types.LocalEngineConfig'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.LocalEngineConfig'
minio:
- $ref: '#/definitions/types.MinIOEngineConfig'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MinIOEngineConfig'
oss:
- $ref: '#/definitions/types.OSSEngineConfig'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OSSEngineConfig'
s3:
- $ref: '#/definitions/types.S3EngineConfig'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.S3EngineConfig'
tos:
- $ref: '#/definitions/types.TOSEngineConfig'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.TOSEngineConfig'
type: object
- types.StorageProviderConfig:
+ github_com_Tencent_WeKnora_internal_types.StorageProviderConfig:
properties:
provider:
description: '"local", "minio", "cos", "tos", "s3", "oss"'
type: string
type: object
- types.SubmitJoinRequestRequest:
+ github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest:
properties:
invite_code:
maxLength: 32
@@ -2794,13 +2402,13 @@ definitions:
type: string
role:
allOf:
- - $ref: '#/definitions/types.OrgMemberRole'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
description: 'Optional: role the applicant requests (admin/editor/viewer);
default viewer'
required:
- invite_code
type: object
- types.SyncLog:
+ github_com_Tencent_WeKnora_internal_types.SyncLog:
properties:
created_at:
description: Creation timestamp (usually same as StartedAt)
@@ -2853,7 +2461,7 @@ definitions:
description: Last update timestamp
type: string
type: object
- types.TOSEngineConfig:
+ github_com_Tencent_WeKnora_internal_types.TOSEngineConfig:
properties:
access_key:
type: string
@@ -2868,11 +2476,11 @@ definitions:
secret_key:
type: string
type: object
- types.Tenant:
+ github_com_Tencent_WeKnora_internal_types.Tenant:
properties:
agent_config:
allOf:
- - $ref: '#/definitions/types.AgentConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.AgentConfig'
description: |-
Deprecated: AgentConfig is deprecated, use CustomAgent (builtin-smart-reasoning) config instead.
This field is kept for backward compatibility and will be removed in future versions.
@@ -2884,17 +2492,17 @@ definitions:
type: string
chat_history_config:
allOf:
- - $ref: '#/definitions/types.ChatHistoryConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ChatHistoryConfig'
description: 'Chat history config: knowledge base configuration for indexing
and searching chat messages via vector search'
context_config:
allOf:
- - $ref: '#/definitions/types.ContextConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ContextConfig'
description: Global Context configuration for this tenant (default for all
sessions)
conversation_config:
allOf:
- - $ref: '#/definitions/types.ConversationConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ConversationConfig'
description: |-
Deprecated: ConversationConfig is deprecated, use CustomAgent (builtin-quick-answer) config instead.
This field is kept for backward compatibility and will be removed in future versions.
@@ -2903,7 +2511,7 @@ definitions:
type: string
credentials:
allOf:
- - $ref: '#/definitions/types.CredentialsConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.CredentialsConfig'
description: 'Credentials config: third-party provider credentials (e.g. WeKnoraCloud
AppID/AppSecret)'
deleted_at:
@@ -2921,24 +2529,24 @@ definitions:
type: string
parser_engine_config:
allOf:
- - $ref: '#/definitions/types.ParserEngineConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineConfig'
description: Parser engine config overrides (MinerU endpoint, API key, etc.).
Used when parsing documents; overrides env.
retrieval_config:
allOf:
- - $ref: '#/definitions/types.RetrievalConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RetrievalConfig'
description: 'Retrieval config: global search/retrieval parameters shared
by knowledge search and message search'
retriever_engines:
allOf:
- - $ref: '#/definitions/types.RetrieverEngines'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngines'
description: Retriever engines
status:
description: Status
type: string
storage_engine_config:
allOf:
- - $ref: '#/definitions/types.StorageEngineConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.StorageEngineConfig'
description: 'Storage engine config: parameters for Local, MinIO, COS. Used
for document/file storage and docreader.'
storage_quota:
@@ -2953,10 +2561,10 @@ definitions:
type: string
web_search_config:
allOf:
- - $ref: '#/definitions/types.WebSearchConfig'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WebSearchConfig'
description: Global WebSearch configuration for this tenant
type: object
- types.ToolCall:
+ github_com_Tencent_WeKnora_internal_types.ToolCall:
properties:
args:
additionalProperties: true
@@ -2976,10 +2584,10 @@ definitions:
type: string
result:
allOf:
- - $ref: '#/definitions/types.ToolResult'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ToolResult'
description: Execution result (contains Output)
type: object
- types.ToolResult:
+ github_com_Tencent_WeKnora_internal_types.ToolResult:
properties:
data:
additionalProperties: true
@@ -3000,14 +2608,14 @@ definitions:
description: Whether the tool executed successfully
type: boolean
type: object
- types.UpdateMemberRoleRequest:
+ github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest:
properties:
role:
- $ref: '#/definitions/types.OrgMemberRole'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
required:
- role
type: object
- types.UpdateOrganizationRequest:
+ github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest:
properties:
avatar:
description: optional avatar URL
@@ -3032,14 +2640,14 @@ definitions:
description: open for search so others can discover and join
type: boolean
type: object
- types.UpdateSharePermissionRequest:
+ github_com_Tencent_WeKnora_internal_types.UpdateSharePermissionRequest:
properties:
permission:
- $ref: '#/definitions/types.OrgMemberRole'
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
required:
- permission
type: object
- types.User:
+ github_com_Tencent_WeKnora_internal_types.User:
properties:
avatar:
description: Avatar URL of the user
@@ -3065,7 +2673,7 @@ definitions:
type: boolean
tenant:
allOf:
- - $ref: '#/definitions/types.Tenant'
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant'
description: Association relationship, not stored in the database
tenant_id:
description: Tenant ID that the user belongs to
@@ -3077,7 +2685,7 @@ definitions:
description: Username of the user
type: string
type: object
- types.VLMConfig:
+ github_com_Tencent_WeKnora_internal_types.VLMConfig:
properties:
api_key:
description: API Key
@@ -3098,14 +2706,14 @@ definitions:
Model Name
type: string
type: object
- types.WeKnoraCloudCredentials:
+ github_com_Tencent_WeKnora_internal_types.WeKnoraCloudCredentials:
properties:
app_id:
type: string
app_secret:
type: string
type: object
- types.WebSearchConfig:
+ github_com_Tencent_WeKnora_internal_types.WebSearchConfig:
properties:
api_key:
description: 'Deprecated: Use WebSearchProviderEntity.Parameters.APIKey instead.'
@@ -3136,10 +2744,781 @@ definitions:
provider:
description: 'Deprecated: Use WebSearchProviderEntity.Parameters.APIKey instead.'
type: string
+ proxy_url:
+ description: Optional per-request proxy override; normally empty — use WebSearchProviderEntity.Parameters.proxy_url.
+ Merged at call time when set.
+ type: string
rerank_model_id:
description: 重排模型ID(用于RAG压缩)
type: string
type: object
+ github_com_Tencent_WeKnora_internal_types.WikiConfig:
+ properties:
+ extraction_granularity:
+ allOf:
+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiExtractionGranularity'
+ description: |-
+ ExtractionGranularity controls how many candidate slugs Pass 0 extracts
+ per document. Empty / unknown value is treated as WikiExtractionStandard.
+ max_pages_per_ingest:
+ description: MaxPagesPerIngest limits pages created/updated per ingest operation
+ (0 = no limit)
+ type: integer
+ synthesis_model_id:
+ description: SynthesisModelID is the LLM model ID used for wiki page generation
+ and updates
+ type: string
+ type: object
+ github_com_Tencent_WeKnora_internal_types.WikiExtractionGranularity:
+ enum:
+ - focused
+ - standard
+ - exhaustive
+ type: string
+ x-enum-varnames:
+ - WikiExtractionFocused
+ - WikiExtractionStandard
+ - WikiExtractionExhaustive
+ github_com_Tencent_WeKnora_internal_types.WikiGraphData:
+ properties:
+ edges:
+ items:
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiGraphEdge'
+ type: array
+ nodes:
+ items:
+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiGraphNode'
+ type: array
+ type: object
+ github_com_Tencent_WeKnora_internal_types.WikiGraphEdge:
+ properties:
+ source:
+ description: source slug
+ type: string
+ target:
+ description: target slug
+ type: string
+ type: object
+ github_com_Tencent_WeKnora_internal_types.WikiGraphNode:
+ properties:
+ link_count:
+ description: Number of inbound + outbound links
+ type: integer
+ page_type:
+ type: string
+ slug:
+ type: string
+ title:
+ type: string
+ type: object
+ github_com_Tencent_WeKnora_internal_types.WikiPage:
+ properties:
+ aliases:
+ description: Alternate names, abbreviations, acronyms or translated names
+ items:
+ type: string
+ type: array
+ chunk_refs:
+ description: |-
+ ChunkRefs records the specific source-document chunks this page was
+ built from — one UUID per cited chunk. Populated during ingest from
+ the chunk-citation pass; refreshed wholesale whenever the page is
+ re-materialized. Empty for summary pages (they are document-level
+ synopses and don't carry chunk-level citations). Use this when you
+ need to surface the underlying evidence for a wiki page, or to
+ retract citations when a source document is deleted.
+ items:
+ type: string
+ type: array
+ content:
+ description: Full markdown content
+ type: string
+ created_at:
+ description: Creation time
+ type: string
+ deleted_at:
+ allOf:
+ - $ref: '#/definitions/gorm.DeletedAt'
+ description: Soft delete
+ id:
+ description: Unique identifier (UUID)
+ type: string
+ in_links:
+ description: Slugs of pages that link TO this page (backlinks)
+ items:
+ type: string
+ type: array
+ knowledge_base_id:
+ description: Knowledge base this page belongs to
+ type: string
+ out_links:
+ description: Slugs of pages this page links to (outbound links)
+ items:
+ type: string
+ type: array
+ page_metadata:
+ description: Arbitrary metadata (tags, categories, dates, etc.)
+ items:
+ type: integer
+ type: array
+ page_type:
+ description: 'Page type: summary, entity, concept, index, log, synthesis,
+ comparison'
+ type: string
+ slug:
+ description: |-
+ URL-friendly slug for addressing, e.g. "entity/acme-corp", "concept/rag"
+ Unique within a knowledge base
+ type: string
+ source_refs:
+ description: |-
+ References to source knowledge IDs that contributed to this page.
+ Format matches the legacy "