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 @@ License - Version + Version

@@ -44,13 +44,27 @@ [**WeKnora**](https://weknora.weixin.qq.com) is an LLM-powered intelligent knowledge management and Q&A framework built for enterprise-grade document understanding and semantic retrieval. -WeKnora offers two Q&A modes — **Quick Q&A** and **Intelligent Reasoning**. Quick Q&A uses a **RAG (Retrieval-Augmented Generation)** pipeline to rapidly retrieve relevant chunks and generate answers, ideal for everyday knowledge queries. Intelligent Reasoning is powered by a **ReACT Agent** engine that employs a **progressive strategy** to autonomously orchestrate knowledge retrieval, MCP tools, and web search, iteratively reasoning and reflecting to arrive at a final conclusion — suited for multi-source synthesis and complex tasks. Custom agents are also supported, allowing flexible configuration of dedicated knowledge bases, tool sets, and system prompts. Choose the right mode for the task, balancing response speed with reasoning depth. +WeKnora offers two Q&A modes — **Quick Q&A** and **Intelligent Reasoning**, alongside an autonomous **Wiki Mode**. Quick Q&A uses a **RAG (Retrieval-Augmented Generation)** pipeline to rapidly retrieve relevant chunks and generate answers, ideal for everyday knowledge queries. Intelligent Reasoning is powered by a **ReACT Agent** engine that employs a **progressive strategy** to autonomously orchestrate knowledge retrieval, MCP tools, and web search, iteratively reasoning and reflecting to arrive at a final conclusion — suited for multi-source synthesis and complex tasks. The new **Wiki Mode** allows agents to autonomously generate and maintain a structured, interlinked markdown knowledge base from raw documents. Custom agents are also supported, allowing flexible configuration of dedicated knowledge bases, tool sets, and system prompts. Choose the right mode for the task, balancing response speed with reasoning depth. -The framework supports auto-syncing knowledge from Feishu (more data sources coming soon), handles 10+ document formats including PDF, Word, images, and Excel, and can serve Q&A directly through IM channels like WeCom, Feishu, Slack, and Telegram. It is compatible with major LLM providers including OpenAI, DeepSeek, Qwen (Alibaba Cloud), Zhipu, Hunyuan, Gemini, MiniMax, NVIDIA, and Ollama. Its fully modular design allows swapping LLMs, vector databases, and storage backends, with support for local and private cloud deployment ensuring complete data sovereignty. +The framework supports auto-syncing knowledge from Feishu, Notion, and Yuque (more data sources coming soon), handles 10+ document formats including PDF, Word, images, and Excel, and can serve Q&A directly through IM channels like WeCom, Feishu, Slack, and Telegram. It is compatible with major LLM providers including OpenAI, DeepSeek, Qwen (Alibaba Cloud), Zhipu, Hunyuan, Gemini, MiniMax, NVIDIA, and Ollama. Its fully modular design allows swapping LLMs, vector databases, and storage backends, with support for local and private cloud deployment ensuring complete data sovereignty. WeKnora also integrates with **Langfuse** for comprehensive observability into agent reasoning, token usage, and pipeline tracing. ## ✨ Latest Updates +**v0.5.0 Highlights:** + +- **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 and an interactive knowledge graph that visualizes references and relationships between pages, helping teams grow a structured, continuously evolving knowledge base from their own materials. +- **Observability**: Integrated Langfuse for agent ReAct loop, LLM token tracking, tool calls, and asynq pipeline tracing, providing deep visibility into agent reasoning and system performance. +- **Customizable Indexing Strategy**: Users can now independently configure and toggle Vector Search, Keyword Search (Hybrid), Wiki, and Knowledge Graph indexing per knowledge base. +- **Vector Store UI & Per-KB Binding**: Full frontend management for Vector Stores with connectivity testing, plus the ability to bind distinct vector databases to specific knowledge bases. +- **Yuque Connector**: Yuque data source integration with API client, full and incremental fetch, enabling seamless synchronization of Yuque documents. +- **Agent Capabilities**: Added `json_repair` tool for automatic JSON fixing, preloaded `OpenMAIC Classroom` skill, and DuckDB multi-sheet Excel data analysis. +- **Frontend & Debugging**: Added copy action for model cards in settings, and enhanced LLM request debugging and logging across all model providers. +- **Bug Fixes**: Fixed DuckDB access issues by materializing knowledge files to temp path, removed rerank model requirement for wiki-only agents, and whitelisted offline protoc zip packages in dockerignore. + +
+Earlier Releases + **v0.4.0 Highlights:** - **[Knowledge Assistant](https://weknora.weixin.qq.com/platform)**: Cloud-hosted knowledge assistant service for quick onboarding without local deployment @@ -175,6 +189,7 @@ Fully modular pipeline from document parsing, vectorization, and retrieval to LL |------------|---------| | Intelligent Reasoning | ReACT progressive multi-step reasoning, autonomously orchestrating knowledge retrieval, MCP tools, and web search; custom agent support | | Quick Q&A | RAG-based Q&A over knowledge bases for fast and accurate answers | +| Wiki Mode | Agent-driven auto-generation of structured, interlinked markdown Wiki pages from raw documents | | Tool Calling | Built-in tools, MCP tools, web search | | Conversation Strategy | Online Prompt editing, retrieval threshold tuning, multi-turn context awareness | | Suggested Questions | Auto-generated question suggestions based on knowledge base content | @@ -183,8 +198,8 @@ Fully modular pipeline from document parsing, vectorization, and retrieval to LL | Capability | Details | |------------|---------| -| Knowledge Base Types | FAQ / Document with folder import, URL import, tag management, and online entry | -| Data Source Import | Auto-sync from Feishu / Notion (more data sources coming soon); incremental and full sync | +| Knowledge Base Types | FAQ / Document / Wiki with folder import, URL import, tag management, and online entry | +| Data Source Import | Auto-sync from Feishu / Notion / Yuque (more data sources coming soon); incremental and full sync | | Document Formats | PDF / Word / Txt / Markdown / HTML / Images / CSV / Excel / PPT / JSON | | Retrieval Strategies | BM25 sparse / Dense retrieval / GraphRAG / parent-child chunking / multi-dimensional indexing | | E2E Testing | Full-pipeline visualization with recall hit rate, BLEU / ROUGE metric evaluation | @@ -206,6 +221,7 @@ Fully modular pipeline from document parsing, vectorization, and retrieval to LL |------------|---------| | Deployment | Local / Docker / Kubernetes (Helm) with private and offline support | | UI | Web UI / RESTful API / Chrome Extension | +| Observability | Integrated Langfuse for ReAct loops, token tracking, tool calls, and pipeline tracing | | Task Management | MQ async tasks, automatic database migration on version upgrade | | Model Management | Centralized config, per-knowledge-base model selection, multi-tenant built-in model sharing, WeKnora Cloud hosted models and parsing | @@ -276,7 +292,11 @@ Stop services: `docker compose down` Agent Mode Tool Call Process
Agent Mode Tool Call Process - + + Wiki Browser
Wiki Browser + Wiki Knowledge Graph
Wiki Knowledge Graph + + Knowledge Base Management
Knowledge Base Management Conversation Settings
Conversation Settings diff --git a/README_CN.md b/README_CN.md index 268405fa..3ed5deeb 100644 --- a/README_CN.md +++ b/README_CN.md @@ -22,7 +22,7 @@ License - 版本 + 版本

@@ -44,12 +44,26 @@ **[WeKnora(维娜拉)](https://weknora.weixin.qq.com)** 是一款基于大语言模型(LLM)的智能知识管理与问答框架,专为企业级文档理解与语义检索场景打造。 -WeKnora 提供**快速问答**与**智能推理**两种问答模式。快速问答基于 **RAG(Retrieval-Augmented Generation)** 流水线,快速召回相关片段并生成回答,适合日常知识查询。智能推理基于 **ReACT Agent** 引擎,采用**渐进式策略**自主编排知识检索、MCP 工具和网络搜索,经过多轮迭代与反思逐步推导最终结论,适合多源信息整合与复杂任务。同时支持自定义智能体,灵活配置专属的知识库、工具集与系统提示词。两种模式按需选用,兼顾响应速度与推理深度。 +WeKnora 提供**快速问答**与**智能推理**两种问答模式,并新增了支持自治化内容构建的 **Wiki 模式**。快速问答基于 **RAG(Retrieval-Augmented Generation)** 流水线,快速召回相关片段并生成回答,适合日常知识查询。智能推理基于 **ReACT Agent** 引擎,采用**渐进式策略**自主编排知识检索、MCP 工具和网络搜索,经过多轮迭代与反思逐步推导最终结论,适合多源信息整合与复杂任务。全新的 **Wiki 模式** 允许 Agent 从原始文档中自主生成并维护一套结构化、相互链接的 Markdown Wiki 知识库。同时支持自定义智能体,灵活配置专属的知识库、工具集与系统提示词。两种模式按需选用,兼顾响应速度与推理深度。 -框架支持从飞书等外部平台自动同步知识(更多数据源持续接入中),覆盖 PDF、Word、图片、Excel 等十余种文档格式,并可通过企业微信、飞书、Slack、Telegram 等 IM 频道直接提供问答服务。模型层面兼容 OpenAI、DeepSeek、Qwen(阿里云)、智谱、混元、Gemini、MiniMax、NVIDIA、Ollama 等主流厂商。全流程模块化设计,大模型、向量数据库、存储等组件均可灵活替换,支持本地与私有云部署,数据完全自主可控。 +框架支持从飞书、Notion 及语雀等外部平台自动同步知识(更多数据源持续接入中),覆盖 PDF、Word、图片、Excel 等十余种文档格式,并可通过企业微信、飞书、Slack、Telegram 等 IM 频道直接提供问答服务。模型层面兼容 OpenAI、DeepSeek、Qwen(阿里云)、智谱、混元、Gemini、MiniMax、NVIDIA、Ollama 等主流厂商。全流程模块化设计,大模型、向量数据库、存储等组件均可灵活替换,支持本地与私有云部署,数据完全自主可控。WeKnora 还无缝集成了 **Langfuse**,为 Agent 运行、Token 使用及任务流水线提供了全面的可观测性追踪。 ## ✨ 最新更新 +**v0.5.0 版本亮点:** + +- **Wiki 模式**:全新推出 Agent 驱动的 Wiki 知识体系,可从原始文档中自动梳理并生成相互关联的 Markdown 页面,内置独立的 Wiki 浏览器与可视化知识图谱,直观呈现页面之间的引用与关联关系,帮助团队沉淀结构化、可迭代演进的专属知识库 +- **可观测性**:集成 Langfuse 以深入跟踪 Agent ReAct 循环、LLM Token 消耗、工具调用以及 asynq 任务流水线,全面掌控 Agent 推理和系统性能 +- **自定义索引策略**:用户现在可以在知识库级别,独立开启或关闭 向量检索、关键词检索(混合检索)、Wiki 模式 以及 知识图谱 构建 +- **向量数据库 UI 与知识库绑定**:新增前端 Vector Store 管理界面与连通性测试功能,并支持为不同知识库绑定专属的向量数据库实例 +- **语雀数据源**:新增语雀连接器,提供完整的 API 客户端,支持文档的全量与增量同步,实现语雀知识的无缝接入 +- **Agent 能力增强**:新增 `json_repair` 工具以自动修复和解析异常 JSON 输出,预置了 `OpenMAIC Classroom` 智能体技能,并支持在 DuckDB 数据分析中加载 Excel 的所有工作表 +- **前端与调试优化**:设置页面模型卡片新增快速复制功能,全面增强了所有模型厂商的 LLM 请求调试(`llm_debug`)和日志记录机制 +- **问题修复**:修复 DuckDB 访问文件问题(将知识文件物化到临时目录)、移除纯 Wiki 模式 Agent 对 Rerank 模型的依赖,以及在 dockerignore 中将离线 protoc 压缩包加入白名单 + +
+更早版本 + **v0.4.0 版本亮点:** - **[知识助理](https://weknora.weixin.qq.com/platform)**:云端托管的知识助理服务,无需本地部署即可快速体验 @@ -173,6 +187,7 @@ WeKnora 提供**快速问答**与**智能推理**两种问答模式。快速问 |------|------| | 智能推理 | ReACT 渐进式多步推理,自主编排知识检索、MCP 工具与网络搜索,支持自定义智能体 | | 快速问答 | 基于知识库的 RAG 问答,快速准确地回答问题 | +| Wiki 模式 | Agent 驱动从原始文档中自动生成并维护结构化、相互链接的 Markdown Wiki 知识页面 | | 工具调用 | 内置工具、MCP 工具、网络搜索 | | 对话策略 | 在线 Prompt 编辑、检索阈值调节、多轮上下文感知 | | 推荐问题 | 基于知识库内容自动生成推荐问题 | @@ -181,8 +196,8 @@ WeKnora 提供**快速问答**与**智能推理**两种问答模式。快速问 | 能力 | 详情 | |------|------| -| 知识库类型 | FAQ / 文档,支持文件夹导入、URL 导入、标签管理、在线录入 | -| 数据源导入 | 飞书 / Notion 知识库自动同步(更多数据源开发中),支持增量与全量同步 | +| 知识库类型 | FAQ / 文档 / Wiki,支持文件夹导入、URL 导入、标签管理、在线录入 | +| 数据源导入 | 飞书 / Notion / 语雀 知识库自动同步(更多数据源开发中),支持增量与全量同步 | | 文档格式 | PDF / Word / Txt / Markdown / HTML / 图片 / CSV / Excel / PPT / JSON | | 检索策略 | BM25 稀疏召回 / Dense 稠密召回 / GraphRAG 图谱增强 / 父子分块 / 多维度索引 | | 端到端测试 | 检索+生成全链路可视化,评估召回命中率、BLEU / ROUGE 等指标 | @@ -204,6 +219,7 @@ WeKnora 提供**快速问答**与**智能推理**两种问答模式。快速问 |------|------| | 部署 | 本地 / Docker / Kubernetes (Helm),支持私有化离线部署 | | 界面 | Web UI / RESTful API / Chrome Extension| +| 可观测性 | 集成 Langfuse 以追踪 ReAct 循环、Token 消耗、工具调用和任务流水线 | | 任务管理 | MQ 异步任务,版本升级自动数据库迁移 | | 模型管理 | 集中配置,知识库级别模型选择,多租户共享内置模型,WeKnora Cloud 托管模型与文档解析 | @@ -274,6 +290,10 @@ docker compose up -d # 启动核心服务 Agent模式工具调用过程
Agent模式工具调用过程 + + Wiki 浏览器
Wiki 浏览器 + Wiki 知识图谱
Wiki 知识图谱 + 知识库管理
知识库管理 对话设置
对话设置 diff --git a/README_JA.md b/README_JA.md index 0704850b..64d05a2e 100644 --- a/README_JA.md +++ b/README_JA.md @@ -22,7 +22,7 @@ License - バージョン + バージョン

@@ -44,12 +44,26 @@ [**WeKnora(ウィーノラ)**](https://weknora.weixin.qq.com) は、大規模言語モデル(LLM)をベースとしたインテリジェントなナレッジ管理・Q&Aフレームワークで、エンタープライズ向けの文書理解と意味検索シナリオに特化して設計されています。 -WeKnora は**クイック Q&A** と**インテリジェント推論**の 2 つの Q&A モードを提供します。クイック Q&A は **RAG(Retrieval-Augmented Generation)** パイプラインで関連フラグメントを素早く検索・回答を生成し、日常的なナレッジ検索に最適です。インテリジェント推論は **ReACT Agent** エンジンにより、**プログレッシブ戦略**でナレッジ検索、MCP ツール、Web 検索を自律的にオーケストレーションし、反復推論とリフレクションで段階的に結論を導きます。複数情報源の統合や複雑なタスクに最適です。カスタムエージェントにも対応し、専用のナレッジベース、ツールセット、システムプロンプトを柔軟に設定できます。用途に応じてモードを選択し、応答速度と推論の深さを両立します。 +WeKnora は**クイック Q&A** と**インテリジェント推論**の 2 つの Q&A モードを提供し、さらに自律的なコンテンツ構築をサポートする**Wiki モード**を追加しました。クイック Q&A は **RAG(Retrieval-Augmented Generation)** パイプラインで関連フラグメントを素早く検索・回答を生成し、日常的なナレッジ検索に最適です。インテリジェント推論は **ReACT Agent** エンジンにより、**プログレッシブ戦略**でナレッジ検索、MCP ツール、Web 検索を自律的にオーケストレーションし、反復推論とリフレクションで段階的に結論を導きます。新しい**Wiki モード**により、Agent は生のドキュメントから構造化され、相互にリンクされたMarkdown Wikiナレッジベースを自律的に生成・維持できます。カスタムエージェントにも対応し、専用のナレッジベース、ツールセット、システムプロンプトを柔軟に設定できます。用途に応じてモードを選択し、応答速度と推論の深さを両立します。 -Feishuなどの外部プラットフォームからのナレッジ自動同期(他のデータソースも順次対応中)に対応し、PDF、Word、画像、Excelなど10以上の文書フォーマットをサポート。WeChat Work、Feishu、Slack、TelegramなどのIMチャネルから直接Q&Aサービスを提供できます。モデル層ではOpenAI、DeepSeek、Qwen(Alibaba Cloud)、Zhipu、Hunyuan、Gemini、MiniMax、NVIDIA、Ollamaなど主要プロバイダーに対応。全プロセスをモジュラー設計し、大規模モデル、ベクトルデータベース、ストレージなどのコンポーネントを柔軟に差し替え可能。ローカルおよびプライベートクラウドデプロイに対応し、データは完全に自己管理可能です。 +Feishu、Notion、Yuqueなどの外部プラットフォームからのナレッジ自動同期(他のデータソースも順次対応中)に対応し、PDF、Word、画像、Excelなど10以上の文書フォーマットをサポート。WeChat Work、Feishu、Slack、TelegramなどのIMチャネルから直接Q&Aサービスを提供できます。モデル層ではOpenAI、DeepSeek、Qwen(Alibaba Cloud)、Zhipu、Hunyuan、Gemini、MiniMax、NVIDIA、Ollamaなど主要プロバイダーに対応。全プロセスをモジュラー設計し、大規模モデル、ベクトルデータベース、ストレージなどのコンポーネントを柔軟に差し替え可能。ローカルおよびプライベートクラウドデプロイに対応し、データは完全に自己管理可能です。さらにWeKnoraは **Langfuse** とシームレスに統合され、Agentの推論、トークン消費、パイプラインに対する包括的な可観測性(オブザーバビリティ)を提供します。 ## ✨ 最新アップデート +**v0.5.0 バージョンのハイライト:** + +- **Wiki モード**:Agent 主導の Wiki ナレッジシステムを新たに提供。生のドキュメントから相互リンクされた Markdown ページを自動的に整理・生成し、専用の Wiki ブラウザに加えて、ページ間の参照や関連性を可視化するインタラクティブなナレッジグラフを備え、構造化され継続的に進化するチーム専用ナレッジベースの構築を支援します。 +- **可観測性**:Langfuseを統合し、AgentのReActループ、LLMトークントラッキング、ツール呼び出し、asynqパイプラインを詳細に追跡。Agentの推論とシステムパフォーマンスを包括的に把握できます。 +- **カスタマイズ可能なインデックス戦略**:ユーザーはナレッジベースごとに、ベクトル検索、キーワード検索(ハイブリッド)、Wiki、およびナレッジグラフのインデックス付けを個別に有効化/無効化できるようになりました。 +- **ベクトルデータベースUIとナレッジベースのバインド**:接続テストを含むVector Store管理用の完全なフロントエンドUIが追加され、特定のナレッジベースに専用のベクトルデータベースインスタンスをバインドする機能がサポートされました。 +- **Yuque コネクタ**:APIクライアントを通じたYuqueデータソース統合。フルおよび増分同期をサポートし、Yuqueドキュメントのシームレスな取り込みを実現します。 +- **Agent機能の強化**:不正なJSON出力を自動的に修正および解析する`json_repair`ツールが追加され、`OpenMAIC Classroom`スキルがプリロードされ、DuckDBデータ分析でExcelのすべてのシートを読み込むサポートが強化されました。 +- **フロントエンドとデバッグの最適化**:設定のモデルカードにクイックコピー機能が追加され、すべてのモデルプロバイダーにおいてLLMリクエストのデバッグ(`llm_debug`)およびログ記録メカニズムが包括的に強化されました。 +- **バグ修正**:DuckDBのアクセス問題(ナレッジファイルを一時パスに実体化)の修正、Wiki専用AgentのRerankモデル要件の削除、およびdockerignore内のオフラインprotoc zipパッケージのホワイトリスト化。 + +
+過去のリリース + **v0.4.0 バージョンのハイライト:** - **[知識アシスタント](https://weknora.weixin.qq.com/platform)**:クラウドホスティング型知識アシスタントサービス、ローカルデプロイ不要で即座に利用可能 @@ -175,6 +189,7 @@ Feishuなどの外部プラットフォームからのナレッジ自動同期 |------|------| | インテリジェント推論 | ReACT プログレッシブ・マルチステップ推論、ナレッジ検索・MCP ツール・Web 検索を自律的にオーケストレーション、カスタムエージェント対応 | | クイック Q&A | ナレッジベースベースの RAG Q&A、迅速かつ正確な回答 | +| Wiki モード | Agent主導で生のドキュメントから構造化された相互リンク済みMarkdown Wikiページを自動生成・保守 | | ツール呼び出し | 組み込みツール、MCP ツール、Web 検索 | | 対話戦略 | オンライン Prompt 編集、検索閾値チューニング、マルチターン文脈認識 | | 推奨質問 | ナレッジベースの内容に基づく質問の自動生成 | @@ -183,8 +198,8 @@ Feishuなどの外部プラットフォームからのナレッジ自動同期 | 機能 | 詳細 | |------|------| -| ナレッジベースタイプ | FAQ / ドキュメント、フォルダーインポート・URL インポート・タグ管理・オンライン入力 | -| データソースインポート | Feishu / Notion ナレッジベースの自動同期(他のデータソースも開発中)、増分・全量同期対応 | +| ナレッジベースタイプ | FAQ / ドキュメント / Wiki、フォルダーインポート・URL インポート・タグ管理・オンライン入力 | +| データソースインポート | Feishu / Notion / Yuque ナレッジベースの自動同期(他のデータソースも開発中)、増分・全量同期対応 | | 文書フォーマット | PDF / Word / Txt / Markdown / HTML / 画像 / CSV / Excel / PPT / JSON | | 検索戦略 | BM25 疎検索 / Dense 密検索 / GraphRAG グラフ強化 / 親子チャンキング / 多次元インデックス | | E2E テスト | 検索+生成の全パイプライン可視化、リコール的中率・BLEU / ROUGE 指標評価 | @@ -206,6 +221,7 @@ Feishuなどの外部プラットフォームからのナレッジ自動同期 |------|------| | デプロイ | ローカル / Docker / Kubernetes (Helm)、プライベート化・オフラインデプロイ対応 | | UI | Web UI / RESTful API / Chrome Extension | +| 可観測性 | ReActループ、トークン消費、ツール呼び出し、パイプライン追跡のためのLangfuse統合 | | タスク管理 | MQ 非同期タスク、バージョンアップ時の DB 自動マイグレーション | | モデル管理 | 集中設定、ナレッジベース単位のモデル選択、マルチテナント組み込みモデル共有、WeKnora Cloud ホスティングモデルとドキュメント解析 | @@ -275,7 +291,11 @@ docker compose up -d # コアサービスを起動 Agentモードツール呼び出しプロセス
Agentモードツール呼び出しプロセス - + + Wikiブラウザ
Wikiブラウザ + Wikiナレッジグラフ
Wikiナレッジグラフ + + ナレッジベース管理
ナレッジベース管理 対話設定
対話設定 diff --git a/README_KO.md b/README_KO.md index 32d4571d..d2c1e1ed 100644 --- a/README_KO.md +++ b/README_KO.md @@ -22,7 +22,7 @@ License - 버전 + 버전

@@ -44,12 +44,26 @@ [**WeKnora**](https://weknora.weixin.qq.com)는 엔터프라이즈급 문서 이해와 시맨틱 검색을 위해 설계된, LLM 기반의 지능형 지식 관리 및 Q&A 프레임워크입니다. -WeKnora는 **빠른 Q&A**와 **지능형 추론** 두 가지 Q&A 모드를 제공합니다. 빠른 Q&A는 **RAG(Retrieval-Augmented Generation)** 파이프라인으로 관련 조각을 빠르게 검색하여 답변을 생성하며, 일상적인 지식 검색에 적합합니다. 지능형 추론은 **ReACT Agent** 엔진이 **점진적 전략**으로 지식 검색, MCP 도구, 웹 검색을 자율적으로 오케스트레이션하며, 반복 추론과 리플렉션을 통해 단계적으로 결론을 도출합니다. 다중 소스 통합과 복잡한 작업에 적합합니다. 커스텀 에이전트도 지원하여 전용 지식베이스, 도구 세트, 시스템 프롬프트를 유연하게 구성할 수 있습니다. 용도에 맞게 모드를 선택하여 응답 속도와 추론 깊이를 동시에 달성합니다. +WeKnora는 **빠른 Q&A**와 **지능형 추론** 두 가지 Q&A 모드와 더불어, 자율적인 콘텐츠 구성을 지원하는 **Wiki 모드**를 제공합니다. 빠른 Q&A는 **RAG(Retrieval-Augmented Generation)** 파이프라인으로 관련 조각을 빠르게 검색하여 답변을 생성하며, 일상적인 지식 검색에 적합합니다. 지능형 추론은 **ReACT Agent** 엔진이 **점진적 전략**으로 지식 검색, MCP 도구, 웹 검색을 자율적으로 오케스트레이션하며, 반복 추론과 리플렉션을 통해 단계적으로 결론을 도출합니다. 새로운 **Wiki 모드**를 통해 Agent는 원본 문서에서 구조화되고 상호 연결된 마크다운 Wiki 지식베이스를 자율적으로 생성하고 유지할 수 있습니다. 커스텀 에이전트도 지원하여 전용 지식베이스, 도구 세트, 시스템 프롬프트를 유연하게 구성할 수 있습니다. 용도에 맞게 모드를 선택하여 응답 속도와 추론 깊이를 동시에 달성합니다. -Feishu 등 외부 플랫폼에서 지식 자동 동기화를 지원하며(추가 데이터 소스 개발 중), PDF, Word, 이미지, Excel 등 10가지 이상의 문서 포맷을 처리합니다. WeChat Work, Feishu, Slack, Telegram 등의 IM 채널을 통해 Q&A 서비스를 직접 제공할 수 있습니다. 모델 레이어에서 OpenAI, DeepSeek, Qwen(Alibaba Cloud), Zhipu, Hunyuan, Gemini, MiniMax, NVIDIA, Ollama 등 주요 프로바이더를 지원합니다. 전체 프로세스가 모듈화 설계되어 LLM, 벡터 DB, 스토리지 등 구성 요소를 유연하게 교체 가능하며, 로컬 및 프라이빗 클라우드 배포를 지원하여 데이터 완전 자체 관리가 가능합니다. +Feishu, Notion, Yuque 등 외부 플랫폼에서 지식 자동 동기화를 지원하며(추가 데이터 소스 개발 중), PDF, Word, 이미지, Excel 등 10가지 이상의 문서 포맷을 처리합니다. WeChat Work, Feishu, Slack, Telegram 등의 IM 채널을 통해 Q&A 서비스를 직접 제공할 수 있습니다. 모델 레이어에서 OpenAI, DeepSeek, Qwen(Alibaba Cloud), Zhipu, Hunyuan, Gemini, MiniMax, NVIDIA, Ollama 등 주요 프로바이더를 지원합니다. 전체 프로세스가 모듈화 설계되어 LLM, 벡터 DB, 스토리지 등 구성 요소를 유연하게 교체 가능하며, 로컬 및 프라이빗 클라우드 배포를 지원하여 데이터 완전 자체 관리가 가능합니다. 또한 WeKnora는 **Langfuse**와 원활하게 통합되어 Agent 추론, 토큰 사용량 및 파이프라인에 대한 포괄적인 관측 가능성(Observability)을 제공합니다. ## ✨ 최신 업데이트 +**v0.5.0 하이라이트:** + +- **Wiki 모드**: Agent 기반의 새로운 Wiki 지식 체계를 도입했습니다. 원본 문서에서 상호 연결된 마크다운 페이지를 자동으로 정리·생성하고, 전용 Wiki 브라우저와 함께 페이지 간 참조 및 연관 관계를 시각화하는 인터랙티브 지식 그래프를 제공하여, 팀 전용으로 구조화되고 지속적으로 진화하는 지식 베이스를 구축할 수 있도록 돕습니다. +- **관측 가능성(Observability)**: Langfuse를 통합하여 Agent의 ReAct 루프, LLM 토큰 추적, 도구 호출 및 asynq 파이프라인을 심층적으로 추적하여 Agent 추론 및 시스템 성능을 완벽하게 파악할 수 있습니다. +- **사용자 정의 인덱싱 전략**: 사용자는 이제 지식베이스 수준에서 벡터 검색, 키워드 검색(하이브리드), Wiki 및 지식 그래프(Knowledge Graph) 인덱싱을 독립적으로 설정하고 전환할 수 있습니다. +- **벡터 데이터베이스 UI 및 지식베이스 바인딩**: 연결 테스트가 포함된 벡터 데이터베이스 관리를 위한 프론트엔드 UI가 추가되었으며, 특정 지식베이스에 고유한 벡터 데이터베이스를 바인딩할 수 있는 기능이 지원됩니다. +- **Yuque 커넥터**: API 클라이언트를 통한 Yuque 데이터 소스 통합으로 전체 및 증분 동기화를 지원하여 Yuque 문서를 원활하게 가져옵니다. +- **Agent 기능 강화**: 잘못된 JSON 출력을 자동으로 수정하는 `json_repair` 도구가 추가되었으며, `OpenMAIC Classroom` 스킬이 사전 탑재되고, DuckDB 데이터 분석에서 Excel의 모든 시트를 로드하도록 지원이 강화되었습니다. +- **프론트엔드 및 디버깅**: 설정의 모델 카드에 복사 작업이 추가되었으며, 모든 모델 프로바이더에 걸쳐 LLM 요청 디버깅(`llm_debug`) 및 로깅 메커니즘이 크게 향상되었습니다. +- **버그 수정**: DuckDB 액세스 문제 수정(지식 파일을 임시 경로에 구체화), Wiki 전용 Agent의 Rerank 모델 요구 사항 제거, dockerignore에 오프라인 protoc zip 패키지 허용 목록 추가. + +
+이전 릴리스 + **v0.4.0 하이라이트:** - **[지식 어시스턴트](https://weknora.weixin.qq.com/platform)**: 클라우드 호스팅 지식 어시스턴트 서비스, 로컬 배포 없이 빠르게 시작 가능 @@ -184,6 +198,7 @@ Feishu 등 외부 플랫폼에서 지식 자동 동기화를 지원하며(추가 |------|------| | 지능형 추론 | ReACT 점진적 멀티스텝 추론, 지식 검색·MCP 도구·웹 검색을 자율 오케스트레이션, 커스텀 에이전트 지원 | | 빠른 Q&A | 지식베이스 기반 RAG Q&A, 빠르고 정확한 답변 | +| Wiki 모드 | Agent가 주도하여 원본 문서에서 구조화된 마크다운 Wiki 페이지를 자동 생성 및 유지 관리 | | 도구 호출 | 내장 도구, MCP 도구, 웹 검색 | | 대화 전략 | 온라인 프롬프트 편집, 검색 임계값 조정, 멀티턴 문맥 인식 | | 추천 질문 | 지식베이스 콘텐츠 기반 질문 자동 생성 | @@ -192,8 +207,8 @@ Feishu 등 외부 플랫폼에서 지식 자동 동기화를 지원하며(추가 | 기능 | 상세 | |------|------| -| 지식베이스 타입 | FAQ / 문서, 폴더 임포트·URL 임포트·태그 관리·온라인 입력 | -| 데이터 소스 임포트 | Feishu / Notion 지식베이스 자동 동기화(추가 데이터 소스 개발 중), 증분·전체 동기화 지원 | +| 지식베이스 타입 | FAQ / 문서 / Wiki, 폴더 임포트·URL 임포트·태그 관리·온라인 입력 | +| 데이터 소스 임포트 | Feishu / Notion / Yuque 지식베이스 자동 동기화(추가 데이터 소스 개발 중), 증분·전체 동기화 지원 | | 문서 포맷 | PDF / Word / Txt / Markdown / HTML / 이미지 / CSV / Excel / PPT / JSON | | 검색 전략 | BM25 희소 / Dense 밀집 / GraphRAG 그래프 강화 / 부모-자식 청킹 / 다차원 인덱싱 | | E2E 테스트 | 전체 파이프라인 시각화, 리콜 적중률·BLEU / ROUGE 지표 평가 | @@ -215,6 +230,7 @@ Feishu 등 외부 플랫폼에서 지식 자동 동기화를 지원하며(추가 |------|------| | 배포 | 로컬 / Docker / Kubernetes (Helm), 프라이빗/오프라인 배포 지원 | | UI | Web UI / RESTful API / Chrome Extension | +| 관측 가능성 | ReAct 루프, 토큰 소비, 도구 호출, 파이프라인 추적을 위한 Langfuse 통합 | | 작업 관리 | MQ 비동기 작업, 버전 업그레이드 시 자동 DB 마이그레이션 | | 모델 관리 | 중앙 설정, 지식베이스별 모델 선택, 멀티테넌트 내장 모델 공유, WeKnora Cloud 호스팅 모델 및 문서 파싱 | @@ -276,7 +292,7 @@ docker compose up -d # 코어 서비스 시작 | 백엔드 API | `http://localhost:8080` | | Jaeger 트레이싱 | `http://localhost:16686` | -## 📱 인터페이스 소개 +## 📱 기능 데모 @@ -285,6 +301,10 @@ docker compose up -d # 코어 서비스 시작 + + + + 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 "|" convention used + across the ingest pipeline, so retract / display code can split on `|` + to recover the title. Document-level granularity. + items: + type: string + type: array + 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 + (title, content, summary, page_type, status) actually changes; pure + bookkeeping writes (link maintenance, same-content re-ingest, status + sync from background jobs) leave it untouched so it can be used as a + real "the page was edited" signal. + type: integer + type: object + github_com_Tencent_WeKnora_internal_types.WikiPageIssue: + 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: + items: + type: string + type: array + tenant_id: + type: integer + updated_at: + type: string + type: object + github_com_Tencent_WeKnora_internal_types.WikiPageListResponse: + properties: + page: + type: integer + page_size: + type: integer + pages: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage' + type: array + total: + type: integer + total_pages: + type: integer + type: object + github_com_Tencent_WeKnora_internal_types.WikiStats: + 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: + additionalProperties: + format: int64 + type: integer + type: object + 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 + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage' + type: array + total_links: + type: integer + total_pages: + type: integer + type: object + gorm.DeletedAt: + properties: + time: + type: string + valid: + description: Valid is true if Time is not NULL + type: boolean + type: object + internal_handler.CopyKnowledgeBaseRequest: + properties: + source_id: + type: string + target_id: + type: string + task_id: + type: string + required: + - source_id + type: object + internal_handler.CreateAgentRequest: + properties: + avatar: + type: string + config: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.CustomAgentConfig' + description: + type: string + name: + type: string + required: + - name + type: object + internal_handler.CreateModelRequest: + 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' + required: + - name + - parameters + - source + - type + type: object + internal_handler.CreateStoreRequest: + 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 + required: + - connection_config + - engine_type + - name + type: object + internal_handler.DeleteTagRequest: + properties: + exclude_ids: + description: Chunk seq_ids to exclude from deletion + items: + type: integer + type: array + type: object + internal_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 + internal_handler.FabriTextRequest: + properties: + model_id: + type: string + tags: + items: + type: string + type: array + required: + - model_id + type: object + internal_handler.GetStorageEngineStatusResponse: + properties: + engines: + items: + $ref: '#/definitions/internal_handler.StorageEngineStatusItem' + type: array + minio_env_available: + type: boolean + type: object + internal_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 + internal_handler.KBModelConfigRequest: + properties: + asr_config: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ASRConfig' + documentSplitting: + description: 文档分块配置 + properties: + childChunkSize: + type: integer + chunkOverlap: + type: integer + chunkSize: + type: integer + enableParentChild: + type: boolean + parentChunkSize: + type: integer + parserEngineRules: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineRule' + type: array + separators: + items: + type: string + type: array + type: object + embeddingModelId: + description: optional when RAG indexing is disabled + type: string + llmModelId: + type: string + multimodal: + description: 多模态配置(仅模型相关;存储引擎在 storageProvider 中配置) + properties: + enabled: + type: boolean + type: object + nodeExtract: + description: 知识图谱配置 + properties: + enabled: + type: boolean + nodes: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.GraphNode' + type: array + relations: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_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/github_com_Tencent_WeKnora_internal_types.VLMConfig' + required: + - llmModelId + type: object + internal_handler.RemoteModelCheckRequest: + properties: + apiKey: + type: string + baseUrl: + type: string + customHeaders: + additionalProperties: + type: string + type: object + dimension: + type: integer + extraConfig: + additionalProperties: + type: string + type: object + interfaceType: + type: string + modelName: + type: string + provider: + type: string + source: + description: 为空时按需默认为 "remote" + type: string + required: + - modelName + type: object + internal_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 + internal_handler.StorageCheckRequest: + 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' + type: object + internal_handler.StorageCheckResponse: + properties: + bucket_created: + type: boolean + message: + type: string + ok: + type: boolean + type: object + internal_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 + internal_handler.TestStoreRequest: + properties: + connection_config: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ConnectionConfig' + engine_type: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineType' + required: + - connection_config + - engine_type + type: object + internal_handler.TextRelationExtractionRequest: + properties: + model_id: + type: string + tags: + items: + type: string + type: array + text: + type: string + required: + - model_id + - tags + - text + type: object + internal_handler.UpdateAgentRequest: + properties: + avatar: + type: string + config: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.CustomAgentConfig' + description: + type: string + name: + type: string + type: object + internal_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 + internal_handler.UpdateKnowledgeBaseRequest: + properties: + config: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseConfig' + description: + type: string + name: + type: string + required: + - name + type: object + internal_handler.UpdateModelRequest: + 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' + type: object + internal_handler.UpdateStoreRequest: + properties: + name: + type: string + required: + - name + type: object + internal_handler.addSimilarQuestionsRequest: + properties: + similar_questions: + items: + type: string + minItems: 1 + type: array + required: + - similar_questions + type: object + internal_handler.updateLastFAQImportResultDisplayStatusRequest: + properties: + display_status: + enum: + - open + - close + type: string + required: + - display_status + type: object + internal_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 + internal_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/internal_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/internal_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/internal_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 + internal_handler_session.CreateSessionRequest: + properties: + description: + description: Description for the session (optional) + type: string + title: + description: Title for the session (optional) + type: string + type: object + internal_handler_session.GenerateTitleRequest: + properties: + messages: + description: Messages to use as context for title generation + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Message' + type: array + required: + - messages + type: object + internal_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 + internal_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 + internal_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 + internal_handler_session.StopSessionRequest: + properties: + message_id: + type: string + required: + - message_id + type: object + internal_handler_session.batchDeleteRequest: + properties: + delete_all: + type: boolean + ids: + items: + type: string + type: array + type: object info: contact: name: WeKnora Github @@ -3165,7 +3544,7 @@ paths: "500": description: 服务器错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -3182,7 +3561,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.CreateAgentRequest' + $ref: '#/definitions/internal_handler.CreateAgentRequest' produces: - application/json responses: @@ -3194,7 +3573,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -3223,15 +3602,15 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -3259,11 +3638,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -3285,7 +3664,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.UpdateAgentRequest' + $ref: '#/definitions/internal_handler.UpdateAgentRequest' produces: - application/json responses: @@ -3297,11 +3676,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -3330,11 +3709,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -3375,11 +3754,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -3405,6 +3784,26 @@ paths: summary: 获取占位符定义 tags: - 智能体 + /agents/type-presets: + get: + consumes: + - application/json + description: 返回所有 smart-reasoning 下可用的智能体类型预设(RAG/Wiki/Hybrid/Custom),用于编辑器自动填充系统提示词、工具和 + KB 兼容性 + produces: + - application/json + responses: + "200": + description: 预设列表 + schema: + additionalProperties: true + type: object + security: + - Bearer: [] + - ApiKeyAuth: [] + summary: 获取智能体类型预设列表 + tags: + - 智能体 /api/v1/datasource: get: description: List all data sources for a specific knowledge base @@ -3421,7 +3820,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/types.DataSource' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource' type: array "400": description: Bad Request @@ -3442,14 +3841,14 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.DataSource' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource' produces: - application/json responses: "201": description: Created schema: - $ref: '#/definitions/types.DataSource' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource' "400": description: Bad Request schema: @@ -3494,7 +3893,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/types.DataSource' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource' "404": description: Not Found schema: @@ -3519,14 +3918,14 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.DataSource' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/types.DataSource' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource' "400": description: Bad Request schema: @@ -3560,7 +3959,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/types.SyncLog' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog' type: array "400": description: Bad Request @@ -3612,7 +4011,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/types.Resource' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Resource' type: array "400": description: Bad Request @@ -3661,7 +4060,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/types.SyncLog' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog' "400": description: Bad Request schema: @@ -3711,7 +4110,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/types.SyncLog' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog' "404": description: Not Found schema: @@ -3731,7 +4130,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/datasource.ConnectorMetadata' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_datasource.ConnectorMetadata' type: array summary: Get available connectors tags: @@ -3766,6 +4165,434 @@ paths: summary: Test connection with raw credentials (no persistence) tags: - DataSource + /api/v1/knowledgebase/{kb_id}/wiki/auto-fix: + post: + description: Automatically fix fixable wiki issues (broken links, etc.) + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + additionalProperties: true + type: object + security: + - Bearer: [] + summary: Auto-fix wiki issues + tags: + - Wiki + /api/v1/knowledgebase/{kb_id}/wiki/graph: + get: + description: Returns the wiki link graph data for visualization + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiGraphData' + security: + - Bearer: [] + summary: Get wiki link graph + tags: + - Wiki + /api/v1/knowledgebase/{kb_id}/wiki/index: + get: + description: Returns the wiki index page (creates default if not exists) + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage' + security: + - Bearer: [] + summary: Get wiki index page + tags: + - Wiki + /api/v1/knowledgebase/{kb_id}/wiki/issues: + get: + description: List issues flagged on wiki pages with optional filtering + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + - description: Filter by page slug + in: query + name: slug + type: string + - description: Filter by status (pending, ignored, resolved) + in: query + name: status + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPageIssue' + type: array + security: + - Bearer: [] + summary: List wiki page issues + tags: + - Wiki + /api/v1/knowledgebase/{kb_id}/wiki/issues/{issue_id}/status: + put: + consumes: + - application/json + description: Update the status of a flagged wiki page issue + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + - description: Issue ID + in: path + name: issue_id + required: true + type: string + - description: 'New status {''status'': ''ignored''}' + in: body + name: status + required: true + schema: + type: object + produces: + - application/json + responses: + "200": + description: OK + schema: + additionalProperties: + type: string + type: object + "400": + description: Bad Request + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + security: + - Bearer: [] + summary: Update wiki page issue status + tags: + - Wiki + /api/v1/knowledgebase/{kb_id}/wiki/lint: + get: + description: Perform a comprehensive health check on the wiki + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_application_service.WikiLintReport' + security: + - Bearer: [] + summary: Run wiki lint + tags: + - Wiki + /api/v1/knowledgebase/{kb_id}/wiki/log: + get: + description: Returns the wiki operation log page (creates default if not exists) + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage' + security: + - Bearer: [] + summary: Get wiki operation log + tags: + - Wiki + /api/v1/knowledgebase/{kb_id}/wiki/pages: + get: + description: List wiki pages with optional filtering and pagination + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + - description: Filter by page type + in: query + name: page_type + type: string + - description: Filter by status + in: query + name: status + type: string + - description: Full-text search + in: query + name: query + type: string + - description: Page number + in: query + name: page + type: integer + - description: Page size + in: query + name: page_size + type: integer + - description: Sort field + in: query + name: sort_by + type: string + - description: Sort order (asc/desc) + in: query + name: sort_order + type: string + produces: + - application/json + 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' + security: + - Bearer: [] + summary: List wiki pages + tags: + - Wiki + post: + consumes: + - application/json + description: Create a new wiki page in the knowledge base + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + - description: Wiki page data + in: body + name: page + required: true + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage' + produces: + - application/json + 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' + security: + - Bearer: [] + summary: Create a wiki page + tags: + - Wiki + /api/v1/knowledgebase/{kb_id}/wiki/pages/{slug}: + delete: + description: Soft-delete a wiki page by slug + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + - description: Page slug + in: path + name: slug + required: true + type: string + responses: + "204": + description: No Content + "404": + description: Not Found + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' + security: + - Bearer: [] + summary: Delete a wiki page + tags: + - Wiki + get: + description: Retrieve a wiki page by its slug + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + - description: Page slug + in: path + name: slug + required: true + type: string + produces: + - application/json + 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' + security: + - Bearer: [] + summary: Get a wiki page by slug + tags: + - Wiki + put: + consumes: + - application/json + description: Update an existing wiki page by slug + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + - description: Page slug + in: path + name: slug + required: true + type: string + - description: Updated wiki page data + in: body + name: page + required: true + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage' + produces: + - application/json + 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' + security: + - Bearer: [] + summary: Update a wiki page + tags: + - Wiki + /api/v1/knowledgebase/{kb_id}/wiki/rebuild-links: + post: + description: Re-parse all pages and rebuild bidirectional link references + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + responses: + "200": + description: OK + schema: + additionalProperties: + type: string + type: object + security: + - Bearer: [] + summary: Rebuild wiki links + tags: + - Wiki + /api/v1/knowledgebase/{kb_id}/wiki/search: + get: + description: Full-text search over wiki pages + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + - description: Search query + in: query + name: q + required: true + type: string + - description: Max results (default 10) + in: query + name: limit + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiPage' + type: array + security: + - Bearer: [] + summary: Search wiki pages + tags: + - Wiki + /api/v1/knowledgebase/{kb_id}/wiki/stats: + get: + description: Returns aggregate statistics about the wiki + parameters: + - description: Knowledge base ID + in: path + name: kb_id + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WikiStats' + security: + - Bearer: [] + summary: Get wiki statistics + tags: + - Wiki /auth/auto-setup: post: consumes: @@ -3777,11 +4604,11 @@ paths: "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' summary: 自动初始化(Lite 桌面版) tags: - 认证 @@ -3813,7 +4640,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] summary: 修改密码 @@ -3830,18 +4657,18 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.LoginRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.LoginRequest' produces: - application/json responses: "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' summary: 用户登录 tags: - 认证 @@ -3861,7 +4688,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] summary: 用户登出 @@ -3883,7 +4710,7 @@ paths: "401": description: 未授权 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] summary: 获取当前用户信息 @@ -3926,7 +4753,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/types.OIDCConfigResponse' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OIDCConfigResponse' summary: 获取OIDC登录配置 tags: - 认证 @@ -3947,15 +4774,15 @@ paths: "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' summary: 获取OIDC授权地址 tags: - 认证 @@ -3985,7 +4812,7 @@ paths: "401": description: 令牌无效 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' summary: 刷新令牌 tags: - 认证 @@ -4000,22 +4827,22 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.RegisterRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RegisterRequest' produces: - application/json responses: "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' summary: 用户注册 tags: - 认证 @@ -4035,7 +4862,7 @@ paths: "401": description: 令牌无效 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] summary: 验证令牌 @@ -4063,7 +4890,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4101,7 +4928,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4135,11 +4962,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -4166,7 +4993,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.UpdateChunkRequest' + $ref: '#/definitions/internal_handler.UpdateChunkRequest' produces: - application/json responses: @@ -4178,11 +5005,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -4211,11 +5038,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -4253,11 +5080,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -4286,7 +5113,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4303,7 +5130,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.EvaluationRequest' + $ref: '#/definitions/internal_handler.EvaluationRequest' produces: - application/json responses: @@ -4315,7 +5142,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4344,7 +5171,7 @@ paths: "404": description: 任务不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4362,7 +5189,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.TextRelationExtractionRequest' + $ref: '#/definitions/internal_handler.TextRelationExtractionRequest' produces: - application/json responses: @@ -4374,7 +5201,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4408,7 +5235,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.FabriTextRequest' + $ref: '#/definitions/internal_handler.FabriTextRequest' produces: - application/json responses: @@ -4420,7 +5247,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4455,7 +5282,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4484,7 +5311,7 @@ paths: "404": description: 知识库不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4506,7 +5333,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.KBModelConfigRequest' + $ref: '#/definitions/internal_handler.KBModelConfigRequest' produces: - application/json responses: @@ -4518,11 +5345,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -4552,7 +5379,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4582,7 +5409,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4600,7 +5427,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.RemoteModelCheckRequest' + $ref: '#/definitions/internal_handler.RemoteModelCheckRequest' produces: - application/json responses: @@ -4612,7 +5439,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4642,7 +5469,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4694,7 +5521,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4723,7 +5550,7 @@ paths: "404": description: 任务不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4765,7 +5592,7 @@ paths: "500": description: 服务器错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4800,7 +5627,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4833,7 +5660,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4877,7 +5704,7 @@ paths: "500": description: 服务器错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4894,7 +5721,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.KnowledgeBase' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBase' produces: - application/json responses: @@ -4906,7 +5733,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4935,7 +5762,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -4967,11 +5794,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -4993,7 +5820,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.UpdateKnowledgeBaseRequest' + $ref: '#/definitions/internal_handler.UpdateKnowledgeBaseRequest' produces: - application/json responses: @@ -5005,7 +5832,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5045,7 +5872,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5098,7 +5925,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5123,7 +5950,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.FAQBatchUpsertPayload' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQBatchUpsertPayload' produces: - application/json responses: @@ -5135,7 +5962,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5169,11 +5996,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -5200,7 +6027,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.FAQEntryPayload' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload' produces: - application/json responses: @@ -5212,7 +6039,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5240,7 +6067,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.addSimilarQuestionsRequest' + $ref: '#/definitions/internal_handler.addSimilarQuestionsRequest' produces: - application/json responses: @@ -5252,11 +6079,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -5284,7 +6111,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5307,7 +6134,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.FAQEntryFieldsBatchUpdate' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsBatchUpdate' produces: - application/json responses: @@ -5319,7 +6146,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5354,7 +6181,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5377,7 +6204,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.FAQEntryPayload' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload' produces: - application/json responses: @@ -5389,7 +6216,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5412,7 +6239,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.updateLastFAQImportResultDisplayStatusRequest' + $ref: '#/definitions/internal_handler.updateLastFAQImportResultDisplayStatusRequest' produces: - application/json responses: @@ -5424,11 +6251,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -5451,7 +6278,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.FAQSearchRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQSearchRequest' produces: - application/json responses: @@ -5463,7 +6290,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5486,7 +6313,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.SearchParams' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SearchParams' produces: - application/json responses: @@ -5498,7 +6325,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5527,11 +6354,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -5579,7 +6406,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5625,7 +6452,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' "409": description: 文件重复 schema: @@ -5653,7 +6480,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.ManualKnowledgePayload' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload' produces: - application/json responses: @@ -5665,7 +6492,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5713,7 +6540,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' "409": description: URL重复 schema: @@ -5747,7 +6574,7 @@ paths: "404": description: 知识库不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5769,7 +6596,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/types.ListSharesResponse' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse' security: - Bearer: [] summary: 获取知识库的共享列表 @@ -5790,7 +6617,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.ShareKnowledgeBaseRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ShareKnowledgeBaseRequest' produces: - application/json responses: @@ -5857,7 +6684,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.UpdateSharePermissionRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateSharePermissionRequest' produces: - application/json responses: @@ -5909,7 +6736,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5950,7 +6777,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -5985,7 +6812,7 @@ paths: in: body name: body schema: - $ref: '#/definitions/handler.DeleteTagRequest' + $ref: '#/definitions/internal_handler.DeleteTagRequest' produces: - application/json responses: @@ -5997,7 +6824,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6036,7 +6863,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6054,7 +6881,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.CopyKnowledgeBaseRequest' + $ref: '#/definitions/internal_handler.CopyKnowledgeBaseRequest' produces: - application/json responses: @@ -6066,7 +6893,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6095,7 +6922,7 @@ paths: "404": description: 任务不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6124,7 +6951,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6152,11 +6979,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -6178,7 +7005,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.Knowledge' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Knowledge' produces: - application/json responses: @@ -6190,7 +7017,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6218,7 +7045,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6249,7 +7076,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6278,11 +7105,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -6322,7 +7149,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6365,7 +7192,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6388,7 +7215,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.ManualKnowledgePayload' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload' produces: - application/json responses: @@ -6400,7 +7227,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6445,7 +7272,7 @@ paths: "400": description: Invalid request schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6475,7 +7302,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6498,7 +7325,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6515,7 +7342,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.MCPService' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPService' produces: - application/json responses: @@ -6527,7 +7354,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6556,7 +7383,7 @@ paths: "500": description: 服务器错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6584,7 +7411,7 @@ paths: "404": description: 服务不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6618,7 +7445,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6647,7 +7474,7 @@ paths: "500": description: 服务器错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6676,7 +7503,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6705,7 +7532,7 @@ paths: "500": description: 服务器错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6739,7 +7566,7 @@ paths: "500": description: 服务器错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6777,7 +7604,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6814,7 +7641,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.SearchMessagesRequest' + $ref: '#/definitions/internal_handler.SearchMessagesRequest' produces: - application/json responses: @@ -6826,7 +7653,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6849,7 +7676,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6866,7 +7693,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.CreateModelRequest' + $ref: '#/definitions/internal_handler.CreateModelRequest' produces: - application/json responses: @@ -6878,7 +7705,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6907,7 +7734,7 @@ paths: "404": description: 模型不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6935,7 +7762,7 @@ paths: "404": description: 模型不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -6957,7 +7784,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.UpdateModelRequest' + $ref: '#/definitions/internal_handler.UpdateModelRequest' produces: - application/json responses: @@ -6969,7 +7796,7 @@ paths: "404": description: 模型不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -7009,7 +7836,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/types.ListOrganizationsResponse' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse' security: - Bearer: [] summary: 获取我的组织列表 @@ -7025,7 +7852,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.CreateOrganizationRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest' produces: - application/json responses: @@ -7107,7 +7934,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.UpdateOrganizationRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest' produces: - application/json responses: @@ -7141,7 +7968,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.InviteMemberRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.InviteMemberRequest' produces: - application/json responses: @@ -7236,7 +8063,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.ReviewJoinRequestRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest' produces: - application/json responses: @@ -7293,7 +8120,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/types.ListMembersResponse' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ListMembersResponse' security: - Bearer: [] summary: 获取组织成员列表 @@ -7348,7 +8175,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.UpdateMemberRoleRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest' produces: - application/json responses: @@ -7382,7 +8209,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.RequestRoleUpgradeRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest' produces: - application/json responses: @@ -7495,7 +8322,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/types.ListSharesResponse' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse' security: - Bearer: [] summary: 获取组织的共享知识库列表 @@ -7512,7 +8339,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.JoinOrganizationRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest' produces: - application/json responses: @@ -7541,7 +8368,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.JoinByOrganizationIDRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest' produces: - application/json responses: @@ -7570,7 +8397,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.SubmitJoinRequestRequest' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest' produces: - application/json responses: @@ -7665,7 +8492,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -7682,7 +8509,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler_session.CreateSessionRequest' + $ref: '#/definitions/internal_handler_session.CreateSessionRequest' produces: - application/json responses: @@ -7694,7 +8521,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -7723,7 +8550,7 @@ paths: "404": description: 会话不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -7751,7 +8578,7 @@ paths: "404": description: 会话不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -7773,7 +8600,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.Session' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Session' produces: - application/json responses: @@ -7785,7 +8612,7 @@ paths: "404": description: 会话不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -7814,11 +8641,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -7841,7 +8668,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler_session.CreateKnowledgeQARequest' + $ref: '#/definitions/internal_handler_session.CreateKnowledgeQARequest' produces: - text/event-stream responses: @@ -7853,7 +8680,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -7887,7 +8714,7 @@ paths: "404": description: 会话或消息不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -7910,7 +8737,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler_session.CreateKnowledgeQARequest' + $ref: '#/definitions/internal_handler_session.CreateKnowledgeQARequest' produces: - text/event-stream responses: @@ -7922,7 +8749,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -7945,7 +8772,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler_session.StopSessionRequest' + $ref: '#/definitions/internal_handler_session.StopSessionRequest' produces: - application/json responses: @@ -7957,7 +8784,7 @@ paths: "404": description: 会话或消息不存在 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -7980,7 +8807,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler_session.GenerateTitleRequest' + $ref: '#/definitions/internal_handler_session.GenerateTitleRequest' produces: - application/json responses: @@ -7992,7 +8819,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8010,7 +8837,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler_session.batchDeleteRequest' + $ref: '#/definitions/internal_handler_session.batchDeleteRequest' produces: - application/json responses: @@ -8022,7 +8849,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8040,7 +8867,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler_session.SearchKnowledgeRequest' + $ref: '#/definitions/internal_handler_session.SearchKnowledgeRequest' produces: - application/json responses: @@ -8052,7 +8879,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8091,7 +8918,7 @@ paths: "500": description: 服务器错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8128,7 +8955,7 @@ paths: "200": description: 系统信息 schema: - $ref: '#/definitions/handler.GetSystemInfoResponse' + $ref: '#/definitions/internal_handler.GetSystemInfoResponse' summary: 获取系统信息 tags: - 系统 @@ -8175,14 +9002,14 @@ paths: name: body required: true schema: - $ref: '#/definitions/handler.StorageCheckRequest' + $ref: '#/definitions/internal_handler.StorageCheckRequest' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/handler.StorageCheckResponse' + $ref: '#/definitions/internal_handler.StorageCheckResponse' summary: 测试存储引擎连通性 tags: - 系统 @@ -8195,7 +9022,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/handler.GetStorageEngineStatusResponse' + $ref: '#/definitions/internal_handler.GetStorageEngineStatusResponse' summary: 获取存储引擎状态 tags: - 系统 @@ -8215,7 +9042,7 @@ paths: "500": description: 服务器错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] summary: 获取租户列表 @@ -8231,7 +9058,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.Tenant' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant' produces: - application/json responses: @@ -8243,7 +9070,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] summary: 创建租户 @@ -8271,7 +9098,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] summary: 删除租户 @@ -8298,11 +9125,11 @@ paths: "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' security: - Bearer: [] - ApiKeyAuth: [] @@ -8324,7 +9151,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/types.Tenant' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant' produces: - application/json responses: @@ -8336,7 +9163,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] summary: 更新租户 @@ -8358,7 +9185,7 @@ paths: "403": description: 权限不足 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] summary: 获取所有租户列表 @@ -8386,7 +9213,7 @@ paths: "400": description: 不支持的键 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8420,7 +9247,7 @@ paths: "400": description: 不支持的键 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8443,7 +9270,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8466,7 +9293,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8489,7 +9316,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8512,7 +9339,7 @@ paths: "400": description: 请求参数错误 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8554,7 +9381,7 @@ paths: "403": description: 权限不足 schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8594,7 +9421,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.CreateStoreRequest' + $ref: '#/definitions/internal_handler.CreateStoreRequest' produces: - application/json responses: @@ -8606,7 +9433,7 @@ paths: "400": description: Invalid request or validation error schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' "401": description: Unauthorized schema: @@ -8615,7 +9442,7 @@ paths: "409": description: Duplicate endpoint and index schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' security: - Bearer: [] - ApiKeyAuth: [] @@ -8709,7 +9536,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.UpdateStoreRequest' + $ref: '#/definitions/internal_handler.UpdateStoreRequest' produces: - application/json responses: @@ -8785,7 +9612,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handler.TestStoreRequest' + $ref: '#/definitions/internal_handler.TestStoreRequest' produces: - application/json responses: @@ -8797,7 +9624,7 @@ paths: "400": description: Invalid request schema: - $ref: '#/definitions/errors.AppError' + $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError' "401": description: Unauthorized schema: diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f6f33385..0daaa624 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "knowledage-base", - "version": "0.4.0", + "version": "0.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "knowledage-base", - "version": "0.4.0", + "version": "0.5.0", "dependencies": { "@microsoft/fetch-event-source": "^2.0.1", "@types/dompurify": "^3.0.5", diff --git a/frontend/package.json b/frontend/package.json index baaab436..55722a4f 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "knowledage-base", - "version": "0.4.0", + "version": "0.5.0", "private": true, "type": "module", "scripts": { diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 787444cc..086e3653 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -5,7 +5,7 @@ description: | with document parsing, vector search, and LLM integration. type: application version: 0.1.0 -appVersion: "v0.4.0" +appVersion: "v0.5.0" kubeVersion: ">=1.25.0-0" home: https://github.com/Tencent/WeKnora icon: https://raw.githubusercontent.com/Tencent/WeKnora/main/docs/images/logo.png
Agent 모드 도구 호출 과정
Agent 모드 도구 호출 과정
Wiki 브라우저
Wiki 브라우저
Wiki 지식 그래프
Wiki 지식 그래프
지식베이스 관리
지식베이스 관리
대화 설정
대화 설정