2025-12-16 08:40:13 +00:00
// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
const docTemplate = ` {
"schemes" : { { marshal . Schemes } } ,
"swagger" : "2.0" ,
"info" : {
"description" : "{{escape .Description}}" ,
"title" : "{{.Title}}" ,
"termsOfService" : "http://swagger.io/terms/" ,
"contact" : {
"name" : "WeKnora Github" ,
"url" : "https://github.com/Tencent/WeKnora"
} ,
"version" : "{{.Version}}"
} ,
"host" : "{{.Host}}" ,
"basePath" : "{{.BasePath}}" ,
"paths" : {
2026-02-26 12:59:52 +00:00
"/agents" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2026-02-26 12:59:52 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取当前租户的所有智能体(包括内置智能体)" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"智能体"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取智能体列表" ,
2025-12-16 08:40:13 +00:00
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "智能体列表" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"500" : {
"description" : "服务器错误" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
2025-12-16 08:40:13 +00:00
"post" : {
2026-02-26 12:59:52 +00:00
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "创建新的自定义智能体" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"智能体"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "创建智能体" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"description" : "智能体信息" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/internal_handler.CreateAgentRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
2026-02-26 12:59:52 +00:00
"201" : {
"description" : "创建的智能体" ,
2025-12-16 08:40:13 +00:00
"schema" : {
2026-02-26 12:59:52 +00:00
"type" : "object" ,
"additionalProperties" : true
2025-12-16 08:40:13 +00:00
}
} ,
2026-02-26 12:59:52 +00:00
"400" : {
"description" : "请求参数错误" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/agents/placeholders" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2026-02-26 12:59:52 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取所有可用的提示词占位符定义,按字段类型分组" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"智能体"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取占位符定义" ,
2025-12-16 08:40:13 +00:00
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "占位符定义" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/agents/{id}" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
2026-02-26 12:59:52 +00:00
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
2026-02-26 12:59:52 +00:00
] ,
"description" : "根据ID获取智能体详情" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"智能体"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取智能体详情" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "智能体ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "智能体详情" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"404" : {
"description" : "智能体不存在" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
"put" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "更新智能体的名称、描述和配置" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"智能体"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新智能体" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "智能体ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "更新请求" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/internal_handler.UpdateAgentRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
2026-02-26 12:59:52 +00:00
"200" : {
"description" : "更新后的智能体" ,
2025-12-16 08:40:13 +00:00
"schema" : {
2026-02-26 12:59:52 +00:00
"type" : "object" ,
"additionalProperties" : true
2025-12-16 08:40:13 +00:00
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
2025-12-24 07:45:42 +00:00
} ,
"403" : {
2026-02-26 12:59:52 +00:00
"description" : "无法修改内置智能体" ,
2025-12-24 07:45:42 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
2025-12-16 08:40:13 +00:00
}
}
2026-02-26 12:59:52 +00:00
} ,
"delete" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2026-02-26 12:59:52 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "删除指定的智能体" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"智能体"
] ,
"summary" : "删除智能体" ,
"parameters" : [
{
"type" : "string" ,
"description" : "智能体ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
2025-12-16 08:40:13 +00:00
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "删除成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"403" : {
"description" : "无法删除内置智能体" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"404" : {
"description" : "智能体不存在" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/agents/{id}/copy" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "复制指定的智能体" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"智能体"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "复制智能体" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "智能体ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
2026-02-26 12:59:52 +00:00
"201" : {
"description" : "复制成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"404" : {
2026-02-26 12:59:52 +00:00
"description" : "智能体不存在" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/auth/change-password" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "修改当前用户的登录密码" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"认证"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "修改密码" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"description" : "密码修改请求" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
2026-02-26 12:59:52 +00:00
"new_password" : {
"type" : "string"
} ,
"old_password" : {
2025-12-16 08:40:13 +00:00
"type" : "string"
}
}
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "修改成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/auth/login" : {
"post" : {
"description" : "用户登录并获取访问令牌" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"认证"
] ,
"summary" : "用户登录" ,
"parameters" : [
{
"description" : "登录请求参数" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.LoginRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.LoginResponse"
}
} ,
"401" : {
"description" : "认证失败" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/auth/logout" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
"description" : "撤销当前访问令牌并登出" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"认证"
] ,
"summary" : "用户登出" ,
"responses" : {
"200" : {
"description" : "登出成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/auth/me" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
"description" : "获取当前登录用户的详细信息" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"认证"
] ,
"summary" : "获取当前用户信息" ,
"responses" : {
"200" : {
"description" : "用户信息" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"401" : {
"description" : "未授权" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/auth/refresh" : {
"post" : {
"description" : "使用刷新令牌获取新的访问令牌" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"认证"
] ,
"summary" : "刷新令牌" ,
"parameters" : [
{
"description" : "刷新令牌" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
"refreshToken" : {
"type" : "string"
}
}
}
}
] ,
"responses" : {
"200" : {
"description" : "新令牌" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"401" : {
"description" : "令牌无效" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/auth/register" : {
"post" : {
"description" : "注册新用户账号" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"认证"
] ,
"summary" : "用户注册" ,
"parameters" : [
{
"description" : "注册请求参数" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.RegisterRequest"
}
}
] ,
"responses" : {
"201" : {
"description" : "Created" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.RegisterResponse"
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"403" : {
"description" : "注册功能已禁用" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/auth/validate" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
"description" : "验证访问令牌是否有效" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"认证"
] ,
"summary" : "验证令牌" ,
"responses" : {
"200" : {
"description" : "令牌有效" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"401" : {
"description" : "令牌无效" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/chunks/by-id/{id}" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "仅通过分块ID获取分块详情( 不需要knowledge_id) ; 支持共享知识库下的分块访问" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"分块管理"
] ,
"summary" : "通过ID获取分块" ,
"parameters" : [
{
"type" : "string" ,
"description" : "分块ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "分块详情" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"404" : {
"description" : "分块不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/chunks/by-id/{id}/questions" : {
"delete" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "删除分块中生成的问题" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"分块管理"
] ,
"summary" : "删除生成的问题" ,
"parameters" : [
{
"type" : "string" ,
"description" : "分块ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "问题ID" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
"question_id" : {
"type" : "string"
}
}
}
}
] ,
"responses" : {
"200" : {
"description" : "删除成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"404" : {
"description" : "分块不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/chunks/{knowledge_id}" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "获取指定知识下的所有分块列表,支持分页" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"分块管理"
] ,
"summary" : "获取知识分块列表" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识ID" ,
"name" : "knowledge_id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "integer" ,
"default" : 1 ,
"description" : "页码" ,
"name" : "page" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"default" : 10 ,
"description" : "每页数量" ,
"name" : "page_size" ,
"in" : "query"
}
] ,
"responses" : {
"200" : {
"description" : "分块列表" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"delete" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "删除指定知识下的所有分块" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"分块管理"
] ,
"summary" : "删除知识下所有分块" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识ID" ,
"name" : "knowledge_id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "删除成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/chunks/{knowledge_id}/{id}" : {
"put" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "更新指定分块的内容和属性" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"分块管理"
] ,
"summary" : "更新分块" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识ID" ,
"name" : "knowledge_id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "分块ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "更新请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler.UpdateChunkRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "更新后的分块" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"404" : {
"description" : "分块不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"delete" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "删除指定的分块" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"分块管理"
] ,
"summary" : "删除分块" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识ID" ,
"name" : "knowledge_id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "分块ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "删除成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"404" : {
"description" : "分块不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/evaluation/" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "根据任务ID获取评估结果" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"评估"
] ,
"summary" : "获取评估结果" ,
"parameters" : [
{
"type" : "string" ,
"description" : "评估任务ID" ,
"name" : "task_id" ,
"in" : "query" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "评估结果" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "对知识库进行评估测试" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"评估"
] ,
"summary" : "执行评估" ,
"parameters" : [
{
"description" : "评估请求参数" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler.EvaluationRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "评估任务" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/faq/import/progress/{task_id}" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "获取FAQ导入任务的进度" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"FAQ管理"
] ,
"summary" : "获取FAQ导入进度" ,
"parameters" : [
{
"type" : "string" ,
"description" : "任务ID" ,
"name" : "task_id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "导入进度" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"404" : {
"description" : "任务不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/extract/relations" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "从文本中提取实体和关系" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "提取文本关系" ,
"parameters" : [
{
"description" : "提取请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler.TextRelationExtractionRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "提取结果" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/fabri/tag" : {
"get" : {
"description" : "随机生成一组标签" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "生成随机标签" ,
"responses" : {
"200" : {
"description" : "生成的标签" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
} ,
"/initialization/fabri/text" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "根据标签生成示例文本" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "生成示例文本" ,
"parameters" : [
{
"description" : "生成请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler.FabriTextRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "生成的文本" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/kb/{kbId}" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "根据知识库ID执行完整配置更新" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "初始化知识库配置" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "kbId" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "初始化请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object"
}
}
] ,
"responses" : {
"200" : {
"description" : "初始化成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/kb/{kbId}/config" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "根据知识库ID获取当前配置信息" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "获取知识库配置" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "kbId" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "配置信息" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"404" : {
"description" : "知识库不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"put" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "根据知识库ID更新模型和分块配置" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "更新知识库配置" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "kbId" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "配置请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler.KBModelConfigRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "更新成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"404" : {
"description" : "知识库不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/models/embedding/test" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "测试Embedding接口是否可用并返回向量维度" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "测试Embedding模型" ,
"parameters" : [
{
"description" : "Embedding测试请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object"
}
}
] ,
"responses" : {
"200" : {
"description" : "测试结果" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/models/remote/check" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "检查远程API模型连接是否正常" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "检查远程模型" ,
"parameters" : [
{
"description" : "模型检查请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler.RemoteModelCheckRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "检查结果" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/models/rerank/check" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "检查Rerank模型连接和功能是否正常" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "检查Rerank模型" ,
"parameters" : [
{
"description" : "Rerank检查请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object"
}
}
] ,
"responses" : {
"200" : {
"description" : "检查结果" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/multimodal/test" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "上传图片测试多模态处理功能" ,
"consumes" : [
"multipart/form-data"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "测试多模态功能" ,
"parameters" : [
{
"type" : "file" ,
"description" : "测试图片" ,
"name" : "image" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "VLM模型名称" ,
"name" : "vlm_model" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "VLM Base URL" ,
"name" : "vlm_base_url" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "VLM API Key" ,
"name" : "vlm_api_key" ,
"in" : "formData"
} ,
{
"type" : "string" ,
"description" : "VLM接口类型" ,
"name" : "vlm_interface_type" ,
"in" : "formData"
} ,
{
"type" : "string" ,
"description" : "存储类型(cos/minio)" ,
"name" : "storage_type" ,
"in" : "formData" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "测试结果" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/ollama/download/tasks" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "列出所有Ollama模型下载任务" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "列出下载任务" ,
"responses" : {
"200" : {
"description" : "任务列表" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
} ,
"/initialization/ollama/download/{taskId}" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "获取Ollama模型下载任务的进度" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "获取下载进度" ,
"parameters" : [
{
"type" : "string" ,
"description" : "任务ID" ,
"name" : "taskId" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "下载进度" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"404" : {
"description" : "任务不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/ollama/models" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "列出已安装的Ollama模型" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "列出Ollama模型" ,
"responses" : {
"200" : {
"description" : "模型列表" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"500" : {
"description" : "服务器错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/ollama/models/check" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "检查指定的Ollama模型是否已安装" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "检查Ollama模型状态" ,
"parameters" : [
{
"description" : "模型名称列表" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
"models" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
}
}
}
] ,
"responses" : {
"200" : {
"description" : "模型状态" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/ollama/models/download" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "异步下载指定的Ollama模型" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "下载Ollama模型" ,
"parameters" : [
{
"description" : "模型名称" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
"modelName" : {
"type" : "string"
}
}
}
}
] ,
"responses" : {
"200" : {
"description" : "下载任务信息" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/initialization/ollama/status" : {
"get" : {
"description" : "检查Ollama服务是否可用" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"初始化"
] ,
"summary" : "检查Ollama服务状态" ,
"responses" : {
"200" : {
"description" : "Ollama状态" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
} ,
"/knowledge-bases" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "获取当前租户的所有知识库;或当传入 agent_id( 共享智能体) 时, 校验权限后返回该智能体配置的知识库范围( 用于 @ 提及)" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"知识库"
] ,
"summary" : "获取知识库列表" ,
"parameters" : [
{
"type" : "string" ,
"description" : "共享智能体 ID( 传入时返回该智能体可用的知识库) " ,
"name" : "agent_id" ,
"in" : "query"
}
] ,
"responses" : {
"200" : {
"description" : "知识库列表" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"500" : {
"description" : "服务器错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "创建新的知识库" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"知识库"
] ,
"summary" : "创建知识库" ,
"parameters" : [
{
"description" : "知识库信息" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBase"
}
}
] ,
"responses" : {
"201" : {
"description" : "创建的知识库" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/knowledge-bases/copy" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "将一个知识库的内容复制到另一个知识库(异步任务)" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"知识库"
] ,
"summary" : "复制知识库" ,
"parameters" : [
{
"description" : "复制请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler.CopyKnowledgeBaseRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "任务ID" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/knowledge-bases/copy/progress/{task_id}" : {
"get" : {
"security" : [
2025-12-16 08:40:13 +00:00
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取知识库复制任务的进度" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识库"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取知识库复制进度" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "任务ID" ,
"name" : "task_id" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
2026-02-26 12:59:52 +00:00
}
] ,
"responses" : {
"200" : {
"description" : "进度信息" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"404" : {
"description" : "任务不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/knowledge-bases/{id}" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-16 08:40:13 +00:00
} ,
{
2026-02-26 12:59:52 +00:00
"ApiKeyAuth" : [ ]
}
] ,
"description" : "根据ID获取知识库详情。当使用共享智能体时, 可传 agent_id 以校验该智能体是否有权访问该知识库。" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"知识库"
] ,
"summary" : "获取知识库详情" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
2025-12-16 08:40:13 +00:00
} ,
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "共享智能体 ID( 用于校验智能体是否有权访问该知识库) " ,
"name" : "agent_id" ,
2025-12-16 08:40:13 +00:00
"in" : "query"
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "知识库详情" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"404" : {
"description" : "知识库不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"put" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "更新知识库的名称、描述和配置" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"知识库"
] ,
"summary" : "更新知识库" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "更新请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler.UpdateKnowledgeBaseRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "更新后的知识库" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"delete" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
2026-02-26 12:59:52 +00:00
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "删除指定的知识库及其所有内容" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"知识库"
] ,
"summary" : "删除知识库" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "删除成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/knowledge-bases/{id}/faq/entries" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "获取知识库下的FAQ条目列表, 支持分页和筛选" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"FAQ管理"
] ,
"summary" : "获取FAQ条目列表" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "integer" ,
"description" : "页码" ,
"name" : "page" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"description" : "每页数量" ,
"name" : "page_size" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"description" : "标签ID筛选(seq_id)" ,
"name" : "tag_id" ,
"in" : "query"
} ,
{
"type" : "string" ,
"description" : "关键词搜索" ,
"name" : "keyword" ,
"in" : "query"
} ,
{
"type" : "string" ,
"description" : "搜索字段: standard_question(标准问题), similar_questions(相似问法), answers(答案), 默认搜索全部" ,
"name" : "search_field" ,
"in" : "query"
} ,
2025-12-16 08:40:13 +00:00
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "排序方式: asc(按更新时间正序), 默认按更新时间倒序" ,
"name" : "sort_order" ,
"in" : "query"
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "FAQ列表" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "异步批量更新或插入FAQ条目。支持 dry_run 模式(设置 dry_run=true) , 异步验证不实际导入。\ndry_run 模式是异步操作,返回 task_id, 通过 /faq/import/progress/{task_id} 查询进度和结果。\n验证内容包括: 1) 条目基本格式 2) 重复问题(批次内和知识库已有) 3) 内容安全检查。" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"FAQ管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "批量更新/插入FAQ条目" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识库ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
2026-02-26 12:59:52 +00:00
"description" : "批量操作请求" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQBatchUpsertPayload"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "任务ID" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"delete" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "批量删除指定的FAQ条目" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"FAQ管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "批量删除FAQ条目" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识库ID" ,
"name" : "id" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
} ,
{
2026-02-26 12:59:52 +00:00
"description" : "要删除的FAQ ID列表(seq_id)" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
"ids" : {
"type" : "array" ,
"items" : {
"type" : "integer"
}
}
}
}
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
"description" : "删除成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/faq/entries/export" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "将所有FAQ条目导出为CSV文件" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
2026-02-26 12:59:52 +00:00
"text/csv"
2025-12-16 08:40:13 +00:00
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"FAQ管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "导出FAQ条目" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
2025-12-16 08:40:13 +00:00
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "CSV文件" ,
2025-12-16 08:40:13 +00:00
"schema" : {
2026-02-26 12:59:52 +00:00
"type" : "file"
2025-12-16 08:40:13 +00:00
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/knowledge-bases/{id}/faq/entries/fields" : {
"put" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "批量更新FAQ条目的多个字段( is_enabled, is_recommended, tag_id) " ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"FAQ管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "批量更新FAQ字段" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "字段更新请求" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsBatchUpdate"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "更新成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/faq/entries/tags" : {
"put" : {
2025-12-22 06:36:29 +00:00
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "批量更新FAQ条目的标签" ,
2025-12-22 06:36:29 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"FAQ管理"
] ,
2026-02-26 12:59:52 +00:00
"summary" : "批量更新FAQ标签" ,
2025-12-22 06:36:29 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识库ID" ,
"name" : "id" ,
2025-12-22 06:36:29 +00:00
"in" : "path" ,
"required" : true
2026-02-26 12:59:52 +00:00
} ,
{
"description" : "标签更新请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object"
}
2025-12-22 06:36:29 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "更新成功" ,
2025-12-22 06:36:29 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"400" : {
"description" : "请求参数错误" ,
2025-12-22 06:36:29 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/faq/entries/{entry_id}" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "根据ID获取单个FAQ条目的详情" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"FAQ管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取FAQ条目详情" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "integer" ,
"description" : "FAQ条目ID(seq_id)" ,
"name" : "entry_id" ,
"in" : "path" ,
"required" : true
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "FAQ条目详情" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
2026-02-26 12:59:52 +00:00
} ,
"404" : {
"description" : "条目不存在" ,
2025-12-16 08:40:13 +00:00
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
2025-12-16 08:40:13 +00:00
}
}
}
2026-02-26 12:59:52 +00:00
} ,
"put" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "更新指定的FAQ条目" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"FAQ管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新FAQ条目" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "integer" ,
"description" : "FAQ条目ID(seq_id)" ,
"name" : "entry_id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "FAQ条目" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "更新成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/faq/entries/{entry_id}/similar-questions" : {
2025-12-16 08:40:13 +00:00
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "向指定的FAQ条目添加相似问题" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"FAQ管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "添加相似问" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
2026-02-26 12:59:52 +00:00
"name" : "id" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
} ,
{
2026-02-26 12:59:52 +00:00
"type" : "integer" ,
"description" : "FAQ条目ID(seq_id)" ,
"name" : "entry_id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "相似问列表" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/internal_handler.addSimilarQuestionsRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "更新后的FAQ条目" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
2026-02-26 12:59:52 +00:00
} ,
"404" : {
"description" : "条目不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
2025-12-16 08:40:13 +00:00
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/faq/entry" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "同步创建单个FAQ条目" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"FAQ管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "创建单个FAQ条目" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
2026-02-26 12:59:52 +00:00
"name" : "id" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
2026-02-26 12:59:52 +00:00
} ,
{
"description" : "FAQ条目" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload"
}
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "创建的FAQ条目" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"400" : {
"description" : "请求参数错误" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/knowledge-bases/{id}/faq/import/last-result/display" : {
2025-12-16 08:40:13 +00:00
"put" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "更新FAQ知识库导入结果统计卡片的显示或隐藏状态" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"FAQ管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新FAQ最后一次导入结果显示状态" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
2026-02-26 12:59:52 +00:00
"name" : "id" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
} ,
{
2026-02-26 12:59:52 +00:00
"description" : "状态更新请求" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/internal_handler.updateLastFAQImportResultDisplayStatusRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
"description" : "更新成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"404" : {
2026-02-26 12:59:52 +00:00
"description" : "知识库不存在或无导入记录" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/faq/search" : {
2025-12-16 08:40:13 +00:00
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "使用混合搜索在FAQ中搜索, 支持两级优先级标签召回: first_priority_tag_ids优先级最高, second_priority_tag_ids次之" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"FAQ管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "搜索FAQ" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "搜索请求" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQSearchRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "搜索结果" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/hybrid-search" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "在知识库中执行向量和关键词混合搜索" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识库"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "混合搜索" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "搜索参数" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.SearchParams"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "搜索结果" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/knowledge" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取知识库下的知识列表,支持分页和筛选" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取知识列表" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "integer" ,
"description" : "页码" ,
"name" : "page" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"description" : "每页数量" ,
"name" : "page_size" ,
"in" : "query"
} ,
{
"type" : "string" ,
"description" : "标签ID筛选" ,
"name" : "tag_id" ,
"in" : "query"
} ,
{
"type" : "string" ,
"description" : "关键词搜索" ,
"name" : "keyword" ,
"in" : "query"
} ,
{
"type" : "string" ,
"description" : "文件类型筛选" ,
"name" : "file_type" ,
"in" : "query"
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "知识列表" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/knowledge/file" : {
2025-12-16 08:40:13 +00:00
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "上传文件并创建知识条目" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"multipart/form-data"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "从文件创建知识" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
2025-12-16 08:40:13 +00:00
"required" : true
} ,
{
2026-02-26 12:59:52 +00:00
"type" : "file" ,
"description" : "上传的文件" ,
"name" : "file" ,
2025-12-16 08:40:13 +00:00
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "自定义文件名" ,
"name" : "fileName" ,
2025-12-16 08:40:13 +00:00
"in" : "formData"
} ,
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "元数据JSON" ,
"name" : "metadata" ,
2025-12-16 08:40:13 +00:00
"in" : "formData"
} ,
{
2026-02-26 12:59:52 +00:00
"type" : "boolean" ,
"description" : "启用多模态处理" ,
"name" : "enable_multimodel" ,
"in" : "formData"
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "创建的知识" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
2026-02-26 12:59:52 +00:00
} ,
"409" : {
"description" : "文件重复" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
2025-12-16 08:40:13 +00:00
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/knowledge/manual" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "手工录入Markdown格式的知识内容" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
] ,
"summary" : "手工创建知识" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "手工知识内容" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload"
}
}
2025-12-16 08:40:13 +00:00
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "创建的知识" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
2026-02-26 12:59:52 +00:00
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
2025-12-16 08:40:13 +00:00
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/knowledge/url" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "从指定URL抓取内容并创建知识条目。当提供 file_name/file_type 或 URL 路径含已知文件扩展名时,自动切换为文件下载模式" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "从URL创建知识" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识库ID" ,
"name" : "id" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
2026-02-26 12:59:52 +00:00
} ,
{
"description" : "URL请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object" ,
"properties" : {
"enable_multimodel" : {
"type" : "boolean"
} ,
"file_name" : {
"type" : "string"
} ,
"file_type" : {
"type" : "string"
} ,
"tag_id" : {
"type" : "string"
} ,
"title" : {
"type" : "string"
} ,
"url" : {
"type" : "string"
}
}
}
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
2026-02-26 12:59:52 +00:00
"201" : {
"description" : "创建的知识" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"400" : {
"description" : "请求参数错误" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
2026-02-26 12:59:52 +00:00
} ,
"409" : {
"description" : "URL重复" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
2025-12-16 08:40:13 +00:00
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/shares" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取知识库的所有共享记录" ,
2025-12-16 08:40:13 +00:00
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识库共享"
] ,
"summary" : "获取知识库的共享列表" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
2025-12-16 08:40:13 +00:00
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse"
2025-12-16 08:40:13 +00:00
}
}
}
2026-02-26 12:59:52 +00:00
} ,
2025-12-16 08:40:13 +00:00
"post" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "将知识库共享到指定组织" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识库共享"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "共享知识库到组织" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "共享信息" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ShareKnowledgeBaseRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
2026-02-26 12:59:52 +00:00
"201" : {
"description" : "Created" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/shares/{share_id}" : {
"put" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "更新知识库共享的权限级别" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识库共享"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新共享权限" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "共享记录ID" ,
"name" : "share_id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "权限信息" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateSharePermissionRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
"delete" : {
"security" : [
{
"Bearer" : [ ]
}
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"description" : "取消知识库的共享" ,
2025-12-16 08:40:13 +00:00
"tags" : [
2026-02-26 12:59:52 +00:00
"知识库共享"
] ,
"summary" : "取消共享" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "共享记录ID" ,
"name" : "share_id" ,
"in" : "path" ,
"required" : true
}
2025-12-16 08:40:13 +00:00
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
2026-02-26 12:59:52 +00:00
} ,
"403" : {
"description" : "Forbidden" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
2025-12-16 08:40:13 +00:00
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/tags" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取知识库下的所有标签及统计信息" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"标签管理"
] ,
"summary" : "获取标签列表" ,
"parameters" : [
{
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "integer" ,
"description" : "页码" ,
"name" : "page" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"description" : "每页数量" ,
"name" : "page_size" ,
"in" : "query"
} ,
{
"type" : "string" ,
"description" : "关键词搜索" ,
"name" : "keyword" ,
"in" : "query"
}
2025-12-16 08:40:13 +00:00
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "标签列表" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"400" : {
"description" : "请求参数错误" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "在知识库下创建新标签" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"标签管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "创建标签" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "标签信息" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"type" : "object" ,
"properties" : {
"color" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"sort_order" : {
"type" : "integer"
}
}
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
2026-02-26 12:59:52 +00:00
"200" : {
"description" : "创建的标签" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge-bases/{id}/tags/{tag_id}" : {
"put" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "更新标签信息" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"标签管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新标签" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "标签ID (UUID或seq_id)" ,
"name" : "tag_id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "标签更新信息" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"type" : "object"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "更新后的标签" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
"delete" : {
2025-12-22 06:36:29 +00:00
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "删除标签, 可使用force=true强制删除被引用的标签, content_only=true仅删除标签下的内容而保留标签本身" ,
2025-12-22 06:36:29 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"标签管理"
2025-12-22 06:36:29 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "删除标签" ,
2025-12-22 06:36:29 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识库ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "标签ID (UUID或seq_id)" ,
"name" : "tag_id" ,
2025-12-22 06:36:29 +00:00
"in" : "path" ,
"required" : true
2026-02-26 12:59:52 +00:00
} ,
{
"type" : "boolean" ,
"description" : "强制删除" ,
"name" : "force" ,
"in" : "query"
} ,
{
"type" : "boolean" ,
"description" : "仅删除内容,保留标签" ,
"name" : "content_only" ,
"in" : "query"
} ,
{
"description" : "删除选项" ,
"name" : "body" ,
"in" : "body" ,
"schema" : {
"$ref" : "#/definitions/internal_handler.DeleteTagRequest"
}
2025-12-22 06:36:29 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "删除成功" ,
2025-12-22 06:36:29 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"400" : {
"description" : "请求参数错误" ,
2025-12-22 06:36:29 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge/batch" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "根据ID列表批量获取知识条目。可选 kb_id: 指定时按该知识库校验权限并用于共享知识库的租户解析; 可选 agent_id: 使用共享智能体时传此参数, 后端按智能体所属租户查询( 用于刷新后恢复共享知识库下的文件) " ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "批量获取知识" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"collectionFormat" : "csv" ,
"description" : "知识ID列表" ,
"name" : "ids" ,
"in" : "query" ,
2025-12-16 08:40:13 +00:00
"required" : true
2026-02-26 12:59:52 +00:00
} ,
{
"type" : "string" ,
"description" : "可选, 知识库ID( 用于共享知识库时指定范围) " ,
"name" : "kb_id" ,
"in" : "query"
} ,
{
"type" : "string" ,
"description" : "可选, 共享智能体ID( 用于按智能体租户批量拉取文件详情) " ,
"name" : "agent_id" ,
"in" : "query"
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "知识列表" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/knowledge/image/{id}/{chunk_id}" : {
2025-12-16 08:40:13 +00:00
"put" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "更新知识分块的图像信息" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新图像信息" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "分块ID" ,
"name" : "chunk_id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "图像信息" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"type" : "object" ,
"properties" : {
"image_info" : {
"type" : "string"
}
}
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "更新成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/knowledge/manual/{id}" : {
"put" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "更新手工录入的Markdown知识内容" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新手工知识" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
2026-02-26 12:59:52 +00:00
} ,
{
"description" : "手工知识内容" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload"
}
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "更新后的知识" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge/search" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "Search knowledge files by keyword. When agent_id is set (shared agent), scope is the agent's configured knowledge bases." ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"Knowledge"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "Search knowledge" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "Keyword to search" ,
"name" : "keyword" ,
2025-12-16 08:40:13 +00:00
"in" : "query"
} ,
{
"type" : "integer" ,
2026-02-26 12:59:52 +00:00
"description" : "Offset for pagination" ,
"name" : "offset" ,
2025-12-16 08:40:13 +00:00
"in" : "query"
} ,
{
2026-02-26 12:59:52 +00:00
"type" : "integer" ,
"description" : "Limit for pagination (default 20)" ,
"name" : "limit" ,
2025-12-16 08:40:13 +00:00
"in" : "query"
2025-12-24 07:45:42 +00:00
} ,
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "Comma-separated file extensions to filter (e.g., csv,xlsx)" ,
"name" : "file_types" ,
2025-12-24 07:45:42 +00:00
"in" : "query"
} ,
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "Shared agent ID (search within agent's KB scope)" ,
"name" : "agent_id" ,
2025-12-24 07:45:42 +00:00
"in" : "query"
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "Search results" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
2026-02-26 12:59:52 +00:00
"description" : "Invalid request" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/knowledge/tags" : {
"put" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "批量更新知识条目的标签。可选 kb_id: 指定时按该知识库校验编辑权限并用于共享知识库的租户解析" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "批量更新知识标签" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"description" : "标签更新请求( updates 必填, kb_id 可选)" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"type" : "object"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "更新成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/knowledge/{id}" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "根据ID获取知识条目详情" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取知识详情" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "知识详情" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
2026-02-26 12:59:52 +00:00
} ,
"404" : {
"description" : "知识不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
2025-12-16 08:40:13 +00:00
}
}
2026-02-26 12:59:52 +00:00
} ,
"put" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "更新知识条目信息" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
2026-02-26 12:59:52 +00:00
"application/json"
2025-12-16 08:40:13 +00:00
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新知识" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
2026-02-26 12:59:52 +00:00
} ,
{
"description" : "知识信息" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.Knowledge"
}
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "更新成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
2026-02-26 12:59:52 +00:00
"type" : "object" ,
"additionalProperties" : true
2025-12-16 08:40:13 +00:00
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
"delete" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "根据ID删除知识条目" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "删除知识" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "删除成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge/{id}/download" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "下载知识条目关联的原始文件" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
2026-02-26 12:59:52 +00:00
"application/octet-stream"
2025-12-16 08:40:13 +00:00
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "下载知识文件" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "文件内容" ,
2025-12-16 08:40:13 +00:00
"schema" : {
2026-02-26 12:59:52 +00:00
"type" : "file"
2025-12-16 08:40:13 +00:00
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/knowledge/{id}/reparse" : {
"post" : {
2025-12-24 07:45:42 +00:00
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "删除知识中现有的文档内容并重新解析,使用异步任务方式处理" ,
2025-12-24 07:45:42 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"知识管理"
2025-12-24 07:45:42 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "重新解析知识" ,
2025-12-24 07:45:42 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "知识ID" ,
2025-12-24 07:45:42 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "重新解析任务已提交" ,
2025-12-24 07:45:42 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "权限不足" ,
2025-12-24 07:45:42 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/mcp-services" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取当前租户的所有MCP服务" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"MCP服务"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取MCP服务列表" ,
2025-12-16 08:40:13 +00:00
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "MCP服务列表" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
2025-12-16 08:40:13 +00:00
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "创建新的MCP服务配置" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"MCP服务"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "创建MCP服务" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"description" : "MCP服务配置" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPService"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "创建的MCP服务" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/mcp-services/{id}" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "根据ID获取MCP服务详情" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"MCP服务"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取MCP服务详情" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "MCP服务ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "MCP服务详情" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"404" : {
"description" : "服务不存在" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
"put" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "更新MCP服务配置" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"MCP服务"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新MCP服务" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "MCP服务ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
2026-02-26 12:59:52 +00:00
"description" : "更新字段" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"type" : "object"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "更新后的MCP服务" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
"delete" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "删除指定的MCP服务" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"MCP服务"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "删除MCP服务" ,
"parameters" : [
2025-12-16 08:40:13 +00:00
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "MCP服务ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "删除成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"500" : {
"description" : "服务器错误" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/mcp-services/{id}/resources" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取MCP服务提供的资源列表" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
2026-02-26 12:59:52 +00:00
"application/json"
2025-12-16 08:40:13 +00:00
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"MCP服务"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取MCP服务资源列表" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "MCP服务ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "资源列表" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"500" : {
"description" : "服务器错误" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/mcp-services/{id}/test" : {
2025-12-16 08:40:13 +00:00
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "测试MCP服务是否可以正常连接" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"MCP服务"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "测试MCP服务连接" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "MCP服务ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "测试结果" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/mcp-services/{id}/tools" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取MCP服务提供的工具列表" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"MCP服务"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取MCP服务工具列表" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "MCP服务ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
2026-02-26 12:59:52 +00:00
"200" : {
"description" : "工具列表" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"500" : {
"description" : "服务器错误" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/messages/{session_id}/load" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "加载会话的消息历史,支持分页和时间筛选" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"消息"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "加载消息历史" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "会话ID" ,
"name" : "session_id" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
} ,
{
"type" : "integer" ,
2026-02-26 12:59:52 +00:00
"default" : 20 ,
"description" : "返回数量" ,
"name" : "limit" ,
2025-12-16 08:40:13 +00:00
"in" : "query"
} ,
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "在此时间之前的消息( RFC3339Nano格式) " ,
"name" : "before_time" ,
2025-12-16 08:40:13 +00:00
"in" : "query"
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "消息列表" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/messages/{session_id}/{id}" : {
"delete" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "从会话中删除指定消息" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"消息"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "删除消息" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "会话ID" ,
"name" : "session_id" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
} ,
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "消息ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "删除成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"500" : {
"description" : "服务器错误" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/models" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取当前租户的所有模型" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"模型管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取模型列表" ,
"responses" : {
"200" : {
"description" : "模型列表" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
2025-12-16 08:40:13 +00:00
} ,
2026-02-26 12:59:52 +00:00
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"post" : {
"security" : [
2025-12-16 08:40:13 +00:00
{
2026-02-26 12:59:52 +00:00
"Bearer" : [ ]
2025-12-16 08:40:13 +00:00
} ,
{
2026-02-26 12:59:52 +00:00
"ApiKeyAuth" : [ ]
}
] ,
"description" : "创建新的模型配置" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"模型管理"
] ,
"summary" : "创建模型" ,
"parameters" : [
{
"description" : "模型信息" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/internal_handler.CreateModelRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
2026-02-26 12:59:52 +00:00
"201" : {
"description" : "创建的模型" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/models/providers" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "根据模型类型获取支持的厂商列表及配置信息" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"模型管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取模型厂商列表" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "模型类型 (chat, embedding, rerank, vllm)" ,
"name" : "model_type" ,
2025-12-24 07:45:42 +00:00
"in" : "query"
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "厂商列表" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/models/{id}" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "根据ID获取模型详情" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"模型管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取模型详情" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "模型ID" ,
"name" : "id" ,
"in" : "path" ,
2025-12-16 08:40:13 +00:00
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "模型详情" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"404" : {
"description" : "模型不存在" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
2025-12-16 08:40:13 +00:00
"put" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "更新模型配置信息" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"模型管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新模型" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "模型ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
2026-02-26 12:59:52 +00:00
"description" : "更新信息" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/internal_handler.UpdateModelRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "更新后的模型" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"404" : {
"description" : "模型不存在" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
"delete" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "删除指定的模型" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"模型管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "删除模型" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "模型ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "删除成功" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"404" : {
"description" : "模型不存在" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/organizations" : {
2025-12-22 06:36:29 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
2026-02-26 12:59:52 +00:00
}
] ,
"description" : "获取当前用户所属的所有组织,并附带各空间内知识库/智能体数量" ,
"produces" : [
"application/json"
] ,
"tags" : [
"组织管理"
] ,
"summary" : "获取我的组织列表" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse"
}
}
}
} ,
"post" : {
"security" : [
2025-12-22 06:36:29 +00:00
{
2026-02-26 12:59:52 +00:00
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "创建新的组织,创建者自动成为管理员" ,
2025-12-22 06:36:29 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-22 06:36:29 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "创建组织" ,
2025-12-22 06:36:29 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"description" : "组织信息" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest"
}
2025-12-22 06:36:29 +00:00
}
] ,
"responses" : {
2026-02-26 12:59:52 +00:00
"201" : {
"description" : "Created" ,
2025-12-22 06:36:29 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
2026-02-26 12:59:52 +00:00
"description" : "Bad Request" ,
2025-12-22 06:36:29 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/organizations/join" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "使用邀请码加入组织" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "通过邀请码加入组织" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"description" : "邀请码" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"404" : {
"description" : "Not Found" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/organizations/join-by-id" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "加入已开放可被搜索的空间,无需邀请码" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "通过空间 ID 加入(可搜索空间)" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"description" : "空间 ID" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest"
}
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/organizations/join-request" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "对需要审核的组织提交加入申请" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "提交加入申请" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"description" : "申请信息" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
2026-02-26 12:59:52 +00:00
"description" : "Bad Request" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/organizations/preview/{code}" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "通过邀请码获取组织基本信息(不加入)" ,
2025-12-16 08:40:13 +00:00
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "通过邀请码预览组织" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "邀请码" ,
"name" : "code" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"404" : {
"description" : "Not Found" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/organizations/search" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "搜索已开放可被搜索的空间,用于发现并加入" ,
2025-12-16 08:40:13 +00:00
"produces" : [
2026-02-26 12:59:52 +00:00
"application/json"
2025-12-16 08:40:13 +00:00
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "搜索可加入的空间" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "搜索关键词(空间名称或描述)" ,
"name" : "q" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"default" : 20 ,
"description" : "返回数量限制" ,
"name" : "limit" ,
"in" : "query"
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
2026-02-26 12:59:52 +00:00
"type" : "object" ,
"additionalProperties" : true
2025-12-16 08:40:13 +00:00
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/organizations/{id}" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "根据ID获取组织详情" ,
2025-12-16 08:40:13 +00:00
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
] ,
"summary" : "获取组织详情" ,
"parameters" : [
{
"type" : "string" ,
"description" : "组织ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
2025-12-16 08:40:13 +00:00
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"404" : {
"description" : "Not Found" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"put" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "更新组织信息(需要管理员权限)" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新组织" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "组织ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "更新信息" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
"delete" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "删除组织(仅组织创建者可操作)" ,
2025-12-16 08:40:13 +00:00
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "删除组织" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "组织ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/organizations/{id}/invite" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "管理员直接添加用户为组织成员" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "邀请成员" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "组织ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
2026-02-26 12:59:52 +00:00
"description" : "邀请信息" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.InviteMemberRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
2026-02-26 12:59:52 +00:00
"description" : "Bad Request" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/organizations/{id}/invite-code" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "生成新的组织邀请码(需要管理员权限)" ,
2025-12-16 08:40:13 +00:00
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "生成邀请码" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "组织ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/organizations/{id}/join-requests" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取组织的待审核加入申请(仅管理员)" ,
2025-12-16 08:40:13 +00:00
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取待审核加入申请列表" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "组织ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/organizations/{id}/join-requests/{request_id}/review" : {
"put" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "通过或拒绝加入申请(仅管理员)" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "审核加入申请" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "组织ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
2026-02-26 12:59:52 +00:00
} ,
{
"type" : "string" ,
"description" : "申请ID" ,
"name" : "request_id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "审核结果" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest"
}
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/organizations/{id}/leave" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "退出指定组织" ,
2025-12-16 08:40:13 +00:00
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "退出组织" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "组织ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/organizations/{id}/members" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
"description" : "获取组织的所有成员" ,
"produces" : [
"application/json"
] ,
"tags" : [
"组织管理"
] ,
"summary" : "获取组织成员列表" ,
"parameters" : [
{
"type" : "string" ,
"description" : "组织ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ListMembersResponse"
2025-12-16 08:40:13 +00:00
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/organizations/{id}/members/{user_id}" : {
"put" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "更新组织成员的角色(需要管理员权限)" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "更新成员角色" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "组织ID" ,
"name" : "id" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
} ,
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "用户ID" ,
"name" : "user_id" ,
"in" : "path" ,
"required" : true
2025-12-16 08:40:13 +00:00
} ,
{
2026-02-26 12:59:52 +00:00
"description" : "角色信息" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest"
}
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
} ,
2025-12-16 08:40:13 +00:00
"delete" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "从组织中移除成员(需要管理员权限)" ,
2025-12-16 08:40:13 +00:00
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "移除成员" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "组织ID" ,
"name" : "id" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "用户ID" ,
"name" : "user_id" ,
2025-12-16 08:40:13 +00:00
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/organizations/{id}/request-upgrade" : {
"post" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "现有成员申请更高权限" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
] ,
"summary" : "申请权限升级" ,
"parameters" : [
{
"type" : "string" ,
"description" : "组织ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "申请信息" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest"
}
}
2025-12-16 08:40:13 +00:00
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
2026-02-26 12:59:52 +00:00
"description" : "Bad Request" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/organizations/{id}/search-users" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "搜索用户(排除已有成员)用于邀请加入组织" ,
2025-12-16 08:40:13 +00:00
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "搜索可邀请的用户" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"type" : "string" ,
"description" : "组织ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "搜索关键词(用户名或邮箱)" ,
"name" : "q" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "integer" ,
"default" : 10 ,
"description" : "返回数量限制" ,
"name" : "limit" ,
"in" : "query"
2025-12-16 08:40:13 +00:00
}
] ,
"responses" : {
2026-02-26 12:59:52 +00:00
"200" : {
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
2026-02-26 12:59:52 +00:00
"403" : {
"description" : "Forbidden" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/organizations/{id}/shared-agents" : {
2025-12-16 08:40:13 +00:00
"get" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取指定空间下所有共享智能体,包含他人共享的与我共享的,用于列表页空间视角" ,
2025-12-16 08:40:13 +00:00
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取空间内全部智能体(含我共享的)" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "组织ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/organizations/{id}/shared-knowledge-bases" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取指定空间下所有共享知识库,包含直接共享的与通过共享智能体可见的,用于列表页空间视角" ,
2025-12-16 08:40:13 +00:00
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取空间内全部知识库(含我共享的、含智能体携带的)" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "组织ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
2026-02-26 12:59:52 +00:00
}
} ,
"/organizations/{id}/shares" : {
"get" : {
2025-12-16 08:40:13 +00:00
"security" : [
{
"Bearer" : [ ]
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "获取共享到指定组织的所有知识库" ,
2025-12-16 08:40:13 +00:00
"produces" : [
"application/json"
] ,
"tags" : [
2026-02-26 12:59:52 +00:00
"组织管理"
2025-12-16 08:40:13 +00:00
] ,
2026-02-26 12:59:52 +00:00
"summary" : "获取组织的共享知识库列表" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
"type" : "string" ,
2026-02-26 12:59:52 +00:00
"description" : "组织ID" ,
2025-12-16 08:40:13 +00:00
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
2026-02-26 12:59:52 +00:00
"description" : "OK" ,
2025-12-16 08:40:13 +00:00
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse"
2025-12-16 08:40:13 +00:00
}
}
}
}
} ,
"/sessions" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "获取当前租户的会话列表,支持分页" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"会话"
] ,
"summary" : "获取会话列表" ,
"parameters" : [
{
"type" : "integer" ,
"description" : "页码" ,
"name" : "page" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"description" : "每页数量" ,
"name" : "page_size" ,
"in" : "query"
}
] ,
"responses" : {
"200" : {
"description" : "会话列表" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
2026-02-26 12:59:52 +00:00
"description" : "创建新的对话会话" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"会话"
] ,
"summary" : "创建会话" ,
"parameters" : [
{
"description" : "会话创建请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler_session.CreateSessionRequest"
}
}
] ,
"responses" : {
"201" : {
"description" : "创建的会话" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/sessions/batch" : {
"delete" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "根据ID列表批量删除对话会话" ,
2025-12-16 08:40:13 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"会话"
] ,
2026-02-26 12:59:52 +00:00
"summary" : "批量删除会话" ,
2025-12-16 08:40:13 +00:00
"parameters" : [
{
2026-02-26 12:59:52 +00:00
"description" : "批量删除请求" ,
2025-12-16 08:40:13 +00:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/internal_handler_session.batchDeleteRequest"
2025-12-16 08:40:13 +00:00
}
}
] ,
"responses" : {
2026-02-26 12:59:52 +00:00
"200" : {
"description" : "删除结果" ,
2025-12-16 08:40:13 +00:00
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/sessions/search" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "在知识库中搜索( 不使用LLM总结) " ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"问答"
] ,
"summary" : "知识搜索" ,
"parameters" : [
{
"description" : "搜索请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler_session.SearchKnowledgeRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "搜索结果" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/sessions/{id}" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "根据ID获取会话详情" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"会话"
] ,
"summary" : "获取会话详情" ,
"parameters" : [
{
"type" : "string" ,
"description" : "会话ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "会话详情" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"404" : {
"description" : "会话不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"put" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "更新会话属性" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"会话"
] ,
"summary" : "更新会话" ,
"parameters" : [
{
"type" : "string" ,
"description" : "会话ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "会话信息" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.Session"
}
}
] ,
"responses" : {
"200" : {
"description" : "更新后的会话" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"404" : {
"description" : "会话不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"delete" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "删除指定的会话" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"会话"
] ,
"summary" : "删除会话" ,
"parameters" : [
{
"type" : "string" ,
"description" : "会话ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "删除成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"404" : {
"description" : "会话不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/sessions/{session_id}/agent-qa" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "基于Agent的智能问答, 支持多轮对话和SSE流式响应" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"text/event-stream"
] ,
"tags" : [
"问答"
] ,
"summary" : "Agent问答" ,
"parameters" : [
{
"type" : "string" ,
"description" : "会话ID" ,
"name" : "session_id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "问答请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler_session.CreateKnowledgeQARequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "问答结果( SSE流) " ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/sessions/{session_id}/continue" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "继续获取正在进行的流式响应" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"text/event-stream"
] ,
"tags" : [
"问答"
] ,
"summary" : "继续流式响应" ,
"parameters" : [
{
"type" : "string" ,
"description" : "会话ID" ,
"name" : "session_id" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "消息ID" ,
"name" : "message_id" ,
"in" : "query" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "流式响应" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"404" : {
"description" : "会话或消息不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/sessions/{session_id}/knowledge-qa" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "基于知识库的问答( 使用LLM总结) , 支持SSE流式响应" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"text/event-stream"
] ,
"tags" : [
"问答"
] ,
"summary" : "知识问答" ,
"parameters" : [
{
"type" : "string" ,
"description" : "会话ID" ,
"name" : "session_id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "问答请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler_session.CreateKnowledgeQARequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "问答结果( SSE流) " ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/sessions/{session_id}/stop" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "停止当前正在进行的生成任务" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"问答"
] ,
"summary" : "停止生成" ,
"parameters" : [
{
"type" : "string" ,
"description" : "会话ID" ,
"name" : "session_id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "停止请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler_session.StopSessionRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "停止成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"404" : {
"description" : "会话或消息不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/sessions/{session_id}/title" : {
"post" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "根据消息内容自动生成会话标题" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"会话"
] ,
"summary" : "生成会话标题" ,
"parameters" : [
{
"type" : "string" ,
"description" : "会话ID" ,
"name" : "session_id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "生成请求" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/internal_handler_session.GenerateTitleRequest"
}
}
] ,
"responses" : {
"200" : {
"description" : "生成的标题" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/shared-knowledge-bases" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
"description" : "获取通过组织共享给当前用户的所有知识库" ,
"produces" : [
"application/json"
] ,
"tags" : [
"知识库共享"
] ,
"summary" : "获取共享给我的知识库列表" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
} ,
"/skills" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "获取所有预装的Agent Skills元数据" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Skills"
] ,
"summary" : "获取预装Skills列表" ,
"responses" : {
"200" : {
"description" : "Skills列表" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"500" : {
"description" : "服务器错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2025-12-16 08:40:13 +00:00
"/system/info" : {
"get" : {
"description" : "获取系统版本、构建信息和引擎配置" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"系统"
] ,
"summary" : "获取系统信息" ,
"responses" : {
"200" : {
"description" : "系统信息" ,
"schema" : {
"$ref" : "#/definitions/internal_handler.GetSystemInfoResponse"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/system/minio/buckets" : {
"get" : {
"description" : "获取所有 MinIO 存储桶及其访问权限" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"系统"
] ,
"summary" : "列出 MinIO 存储桶" ,
"responses" : {
"200" : {
"description" : "存储桶列表" ,
"schema" : {
"$ref" : "#/definitions/internal_handler.ListMinioBucketsResponse"
}
} ,
"400" : {
"description" : "MinIO 未启用" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"500" : {
"description" : "服务器错误" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
} ,
2025-12-16 08:40:13 +00:00
"/tenants" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
"description" : "获取当前用户可访问的租户列表" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "获取租户列表" ,
"responses" : {
"200" : {
"description" : "租户列表" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"500" : {
"description" : "服务器错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"post" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
"description" : "创建新的租户" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "创建租户" ,
"parameters" : [
{
"description" : "租户信息" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
}
}
] ,
"responses" : {
"201" : {
"description" : "创建的租户" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/tenants/all" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
"description" : "获取系统中所有租户(需要跨租户访问权限)" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "获取所有租户列表" ,
"responses" : {
"200" : {
"description" : "所有租户列表" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"403" : {
"description" : "权限不足" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/tenants/kv/agent-config" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "获取租户的全局Agent配置( 默认应用于所有会话) " ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "获取租户Agent配置" ,
"responses" : {
"200" : {
"description" : "Agent配置" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/tenants/kv/conversation-config" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "获取租户的全局对话配置(默认应用于普通模式会话)" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "获取租户对话配置" ,
"responses" : {
"200" : {
"description" : "对话配置" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2026-02-26 12:59:52 +00:00
"/tenants/kv/prompt-templates" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "获取系统配置的提示词模板列表" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "获取提示词模板" ,
"responses" : {
"200" : {
"description" : "提示词模板配置" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
2025-12-16 08:40:13 +00:00
"/tenants/kv/web-search-config" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "获取租户的网络搜索配置" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "获取租户网络搜索配置" ,
"responses" : {
"200" : {
"description" : "网络搜索配置" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/tenants/kv/{key}" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "获取租户级别的KV配置( 支持agent-config、web-search-config、conversation-config) " ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "获取租户KV配置" ,
"parameters" : [
{
"type" : "string" ,
"description" : "配置键名" ,
"name" : "key" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "配置值" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "不支持的键" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"put" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "更新租户级别的KV配置( 支持agent-config、web-search-config、conversation-config) " ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "更新租户KV配置" ,
"parameters" : [
{
"type" : "string" ,
"description" : "配置键名" ,
"name" : "key" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "配置值" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "object"
}
}
] ,
"responses" : {
"200" : {
"description" : "更新成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "不支持的键" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/tenants/search" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "分页搜索租户(需要跨租户访问权限)" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "搜索租户" ,
"parameters" : [
{
"type" : "string" ,
"description" : "搜索关键词" ,
"name" : "keyword" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"description" : "租户ID筛选" ,
"name" : "tenant_id" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"default" : 1 ,
"description" : "页码" ,
"name" : "page" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"default" : 20 ,
"description" : "每页数量" ,
"name" : "page_size" ,
"in" : "query"
}
] ,
"responses" : {
"200" : {
"description" : "搜索结果" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"403" : {
"description" : "权限不足" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
} ,
"/tenants/{id}" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
2025-12-22 06:36:29 +00:00
} ,
{
"ApiKeyAuth" : [ ]
2025-12-16 08:40:13 +00:00
}
] ,
"description" : "根据ID获取租户详情" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "获取租户详情" ,
"parameters" : [
{
"type" : "integer" ,
"description" : "租户ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "租户详情" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
} ,
"404" : {
"description" : "租户不存在" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"put" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
"description" : "更新租户信息" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "更新租户" ,
"parameters" : [
{
"type" : "integer" ,
"description" : "租户ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "租户信息" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
}
}
] ,
"responses" : {
"200" : {
"description" : "更新后的租户" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
} ,
"delete" : {
"security" : [
{
"Bearer" : [ ]
}
] ,
"description" : "删除指定的租户" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"租户管理"
] ,
"summary" : "删除租户" ,
"parameters" : [
{
"type" : "integer" ,
"description" : "租户ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "删除成功" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
} ,
"400" : {
"description" : "请求参数错误" ,
"schema" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
2025-12-22 06:36:29 +00:00
} ,
"/web-search/providers" : {
"get" : {
"security" : [
{
"Bearer" : [ ]
} ,
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "Returns the list of available web search providers from configuration" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"web-search"
] ,
"summary" : "Get available web search providers" ,
"responses" : {
"200" : {
"description" : "List of providers" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
2025-12-16 08:40:13 +00:00
}
} ,
"definitions" : {
"github_com_Tencent_WeKnora_internal_errors.AppError" : {
"type" : "object" ,
"properties" : {
"code" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_errors.ErrorCode"
} ,
"details" : { } ,
"message" : {
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_errors.ErrorCode" : {
"type" : "integer" ,
"enum" : [
1000 ,
1001 ,
1002 ,
1003 ,
1004 ,
1005 ,
1006 ,
1007 ,
1008 ,
1009 ,
1010 ,
2000 ,
2001 ,
2002 ,
2003 ,
2004 ,
2100 ,
2101 ,
2102 ,
2103
] ,
"x-enum-varnames" : [
"ErrBadRequest" ,
"ErrUnauthorized" ,
"ErrForbidden" ,
"ErrNotFound" ,
"ErrMethodNotAllowed" ,
"ErrConflict" ,
"ErrTooManyRequests" ,
"ErrInternalServer" ,
"ErrServiceUnavailable" ,
"ErrTimeout" ,
"ErrValidation" ,
"ErrTenantNotFound" ,
"ErrTenantAlreadyExists" ,
"ErrTenantInactive" ,
"ErrTenantNameRequired" ,
"ErrTenantInvalidStatus" ,
"ErrAgentMissingThinkingModel" ,
"ErrAgentMissingAllowedTools" ,
"ErrAgentInvalidMaxIterations" ,
"ErrAgentInvalidTemperature"
]
} ,
"github_com_Tencent_WeKnora_internal_types.AgentConfig" : {
"type" : "object" ,
"properties" : {
2026-02-26 12:59:52 +00:00
"allowed_skills" : {
"description" : "Skill names whitelist (empty = allow all)" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2025-12-16 08:40:13 +00:00
"allowed_tools" : {
"description" : "List of allowed tool names" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2026-02-26 12:59:52 +00:00
"history_turns" : {
"description" : "Number of history turns to keep in context" ,
"type" : "integer"
} ,
2025-12-16 08:40:13 +00:00
"knowledge_bases" : {
"description" : "Accessible knowledge base IDs" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2025-12-22 06:36:29 +00:00
"knowledge_ids" : {
"description" : "Accessible knowledge IDs (individual documents)" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2025-12-16 08:40:13 +00:00
"max_iterations" : {
"description" : "Maximum number of ReAct iterations" ,
"type" : "integer"
} ,
2026-02-26 12:59:52 +00:00
"mcp_selection_mode" : {
"description" : "MCP service selection" ,
"type" : "string"
} ,
"mcp_services" : {
"description" : "Selected MCP service IDs (when mode is \"selected\")" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"multi_turn_enabled" : {
"description" : "Whether multi-turn conversation is enabled" ,
"type" : "boolean"
} ,
2025-12-16 08:40:13 +00:00
"reflection_enabled" : {
"description" : "Whether to enable reflection" ,
"type" : "boolean"
} ,
2026-02-26 12:59:52 +00:00
"retrieve_kb_only_when_mentioned" : {
"description" : "Whether to retrieve knowledge base only when explicitly mentioned with @ (default: false)" ,
"type" : "boolean"
} ,
"skill_dirs" : {
"description" : "Directories to search for skills" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"skills_enabled" : {
"description" : "Skills configuration (Progressive Disclosure pattern)" ,
"type" : "boolean"
} ,
"system_prompt" : {
"description" : "Unified system prompt (uses web_search_status placeholder for dynamic behavior)" ,
"type" : "string"
} ,
2025-12-16 08:40:13 +00:00
"system_prompt_web_disabled" : {
2026-02-26 12:59:52 +00:00
"description" : "Deprecated: Custom prompt when web search is disabled" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
"system_prompt_web_enabled" : {
2026-02-26 12:59:52 +00:00
"description" : "Deprecated: Use SystemPrompt instead. Kept for backward compatibility during migration." ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
"temperature" : {
"description" : "LLM temperature for agent" ,
"type" : "number"
} ,
2026-02-26 12:59:52 +00:00
"thinking" : {
"description" : "Whether to enable thinking mode (for models that support extended thinking)" ,
"type" : "boolean"
} ,
2025-12-16 08:40:13 +00:00
"use_custom_system_prompt" : {
"description" : "Whether to use custom system prompt instead of default" ,
"type" : "boolean"
} ,
"web_search_enabled" : {
"description" : "Whether web search tool is enabled" ,
"type" : "boolean"
} ,
"web_search_max_results" : {
"description" : "Maximum number of web search results (default: 5)" ,
"type" : "integer"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.AgentStep" : {
"type" : "object" ,
"properties" : {
"iteration" : {
"description" : "Iteration number (0-indexed)" ,
"type" : "integer"
} ,
"thought" : {
"description" : "LLM's reasoning/thinking (Think phase)" ,
"type" : "string"
} ,
"timestamp" : {
"description" : "When this step occurred" ,
"type" : "string"
} ,
"tool_calls" : {
"description" : "Tools called in this step (Act phase)" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ToolCall"
}
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.AnswerStrategy" : {
"type" : "string" ,
"enum" : [
"all" ,
"random"
] ,
"x-enum-varnames" : [
"AnswerStrategyAll" ,
"AnswerStrategyRandom"
]
} ,
"github_com_Tencent_WeKnora_internal_types.ChunkingConfig" : {
"type" : "object" ,
"properties" : {
"chunk_overlap" : {
"description" : "Chunk overlap" ,
"type" : "integer"
} ,
"chunk_size" : {
"description" : "Chunk size" ,
"type" : "integer"
} ,
"enable_multimodal" : {
"description" : "EnableMultimodal (deprecated, kept for backward compatibility with old data)" ,
"type" : "boolean"
} ,
"separators" : {
"description" : "Separators" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.ContextCompressionStrategy" : {
"type" : "string" ,
"enum" : [
"sliding_window" ,
"smart"
] ,
"x-enum-varnames" : [
"ContextCompressionSlidingWindow" ,
"ContextCompressionSmart"
]
} ,
"github_com_Tencent_WeKnora_internal_types.ContextConfig" : {
"type" : "object" ,
"properties" : {
2026-02-26 12:59:52 +00:00
"compression_strategy" : {
"description" : "Compression strategy: \"sliding_window\" or \"smart\"" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ContextCompressionStrategy"
}
]
} ,
"max_tokens" : {
"description" : "Maximum tokens allowed in LLM context" ,
"type" : "integer"
} ,
"recent_message_count" : {
"description" : "For sliding_window: number of messages to keep\nFor smart: number of recent messages to keep uncompressed" ,
"type" : "integer"
} ,
"summarize_threshold" : {
"description" : "Summarize threshold: number of messages before summarization" ,
"type" : "integer"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.ConversationConfig" : {
"type" : "object" ,
"properties" : {
"context_template" : {
"description" : "ContextTemplate is the prompt template for summarizing retrieval results" ,
"type" : "string"
} ,
"embedding_top_k" : {
"type" : "integer"
} ,
"enable_query_expansion" : {
"type" : "boolean"
} ,
"enable_rewrite" : {
"type" : "boolean"
} ,
"fallback_prompt" : {
"type" : "string"
} ,
"fallback_response" : {
"type" : "string"
} ,
"fallback_strategy" : {
"description" : "Fallback strategy" ,
"type" : "string"
} ,
"keyword_threshold" : {
"type" : "number"
} ,
"max_completion_tokens" : {
"description" : "MaxTokens is the maximum number of tokens to generate" ,
"type" : "integer"
} ,
"max_rounds" : {
"description" : "Retrieval \u0026 strategy parameters" ,
"type" : "integer"
} ,
"prompt" : {
"description" : "Prompt is the system prompt for normal mode" ,
"type" : "string"
} ,
"rerank_model_id" : {
"type" : "string"
} ,
"rerank_threshold" : {
"type" : "number"
} ,
"rerank_top_k" : {
"type" : "integer"
} ,
"rewrite_prompt_system" : {
"description" : "Rewrite prompts" ,
"type" : "string"
} ,
"rewrite_prompt_user" : {
"type" : "string"
} ,
"summary_model_id" : {
"description" : "Model configuration" ,
"type" : "string"
} ,
"temperature" : {
"description" : "Temperature controls the randomness of the model output" ,
"type" : "number"
} ,
"vector_threshold" : {
"type" : "number"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest" : {
"type" : "object" ,
"required" : [
"name"
] ,
"properties" : {
"avatar" : {
"description" : "optional avatar URL" ,
"type" : "string" ,
"maxLength" : 512
2025-12-16 08:40:13 +00:00
} ,
2026-02-26 12:59:52 +00:00
"description" : {
"type" : "string" ,
"maxLength" : 1000
2025-12-16 08:40:13 +00:00
} ,
2026-02-26 12:59:52 +00:00
"invite_code_validity_days" : {
"description" : "optional: 0=never, 1, 7, 30; default 7" ,
2025-12-16 08:40:13 +00:00
"type" : "integer"
} ,
2026-02-26 12:59:52 +00:00
"member_limit" : {
"description" : "optional: max members; 0=unlimited; default 50" ,
2025-12-16 08:40:13 +00:00
"type" : "integer"
2026-02-26 12:59:52 +00:00
} ,
"name" : {
"type" : "string" ,
"maxLength" : 255 ,
"minLength" : 1
2025-12-16 08:40:13 +00:00
}
}
} ,
2026-02-26 12:59:52 +00:00
"github_com_Tencent_WeKnora_internal_types.CustomAgentConfig" : {
2025-12-16 08:40:13 +00:00
"type" : "object" ,
"properties" : {
2026-02-26 12:59:52 +00:00
"agent_mode" : {
"description" : "===== Basic Settings =====\nAgent mode: \"quick-answer\" for RAG mode, \"smart-reasoning\" for ReAct agent mode" ,
"type" : "string"
} ,
"allowed_tools" : {
"description" : "Allowed tools (only for agent type)" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2025-12-16 08:40:13 +00:00
"context_template" : {
2026-02-26 12:59:52 +00:00
"description" : "Context template for normal mode (how to format retrieved chunks)" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
"embedding_top_k" : {
2026-02-26 12:59:52 +00:00
"description" : "===== Retrieval Strategy Settings (for both modes) =====\nEmbedding/Vector retrieval top K" ,
2025-12-16 08:40:13 +00:00
"type" : "integer"
} ,
"enable_query_expansion" : {
2026-02-26 12:59:52 +00:00
"description" : "===== Advanced Settings (mainly for normal mode) =====\nWhether to enable query expansion" ,
2025-12-16 08:40:13 +00:00
"type" : "boolean"
} ,
"enable_rewrite" : {
2026-02-26 12:59:52 +00:00
"description" : "Whether to enable query rewrite for multi-turn conversations" ,
2025-12-16 08:40:13 +00:00
"type" : "boolean"
} ,
"fallback_prompt" : {
2026-02-26 12:59:52 +00:00
"description" : "Fallback prompt (when FallbackStrategy is \"model\")" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
"fallback_response" : {
2026-02-26 12:59:52 +00:00
"description" : "Fixed fallback response (when FallbackStrategy is \"fixed\")" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
"fallback_strategy" : {
2026-02-26 12:59:52 +00:00
"description" : "Fallback strategy: \"fixed\" for fixed response, \"model\" for model generation" ,
"type" : "string"
} ,
"faq_direct_answer_threshold" : {
"description" : "FAQ direct answer threshold - if similarity \u003e this value, use FAQ answer directly" ,
"type" : "number"
} ,
"faq_priority_enabled" : {
"description" : "===== FAQ Strategy Settings =====\nWhether FAQ priority strategy is enabled (FAQ answers prioritized over document chunks)" ,
"type" : "boolean"
} ,
"faq_score_boost" : {
"description" : "FAQ score boost multiplier - FAQ results score multiplied by this factor" ,
"type" : "number"
} ,
"history_turns" : {
"description" : "Number of history turns to keep in context" ,
"type" : "integer"
} ,
"kb_selection_mode" : {
"description" : "===== Knowledge Base Settings =====\nKnowledge base selection mode: \"all\" = all KBs, \"selected\" = specific KBs, \"none\" = no KB" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
"keyword_threshold" : {
2026-02-26 12:59:52 +00:00
"description" : "Keyword retrieval threshold" ,
2025-12-16 08:40:13 +00:00
"type" : "number"
} ,
2026-02-26 12:59:52 +00:00
"knowledge_bases" : {
"description" : "Associated knowledge base IDs (only used when KBSelectionMode is \"selected\")" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2025-12-16 08:40:13 +00:00
"max_completion_tokens" : {
2026-02-26 12:59:52 +00:00
"description" : "Maximum completion tokens (only for normal mode)" ,
2025-12-16 08:40:13 +00:00
"type" : "integer"
} ,
2026-02-26 12:59:52 +00:00
"max_iterations" : {
"description" : "===== Agent Mode Settings =====\nMaximum iterations for ReAct loop (only for agent type)" ,
2025-12-16 08:40:13 +00:00
"type" : "integer"
} ,
2026-02-26 12:59:52 +00:00
"mcp_selection_mode" : {
"description" : "MCP service selection mode: \"all\" = all enabled MCP services, \"selected\" = specific services, \"none\" = no MCP" ,
"type" : "string"
} ,
"mcp_services" : {
"description" : "Selected MCP service IDs (only used when MCPSelectionMode is \"selected\")" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"model_id" : {
"description" : "===== Model Settings =====\nModel ID to use for conversations" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
2026-02-26 12:59:52 +00:00
"multi_turn_enabled" : {
"description" : "===== Multi-turn Conversation Settings =====\nWhether multi-turn conversation is enabled" ,
"type" : "boolean"
} ,
"reflection_enabled" : {
"description" : "Whether reflection is enabled (only for agent type)" ,
"type" : "boolean"
} ,
2025-12-16 08:40:13 +00:00
"rerank_model_id" : {
2026-02-26 12:59:52 +00:00
"description" : "ReRank model ID for retrieval" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
"rerank_threshold" : {
2026-02-26 12:59:52 +00:00
"description" : "Rerank threshold" ,
2025-12-16 08:40:13 +00:00
"type" : "number"
} ,
"rerank_top_k" : {
2026-02-26 12:59:52 +00:00
"description" : "Rerank top K" ,
2025-12-16 08:40:13 +00:00
"type" : "integer"
} ,
2026-02-26 12:59:52 +00:00
"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"
} ,
2025-12-16 08:40:13 +00:00
"rewrite_prompt_system" : {
2026-02-26 12:59:52 +00:00
"description" : "Rewrite prompt system message" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
"rewrite_prompt_user" : {
2026-02-26 12:59:52 +00:00
"description" : "Rewrite prompt user message template" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
2026-02-26 12:59:52 +00:00
"selected_skills" : {
"description" : "Selected skill names (only used when SkillsSelectionMode is \"selected\")" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"skills_selection_mode" : {
"description" : "===== Skills Settings (only for smart-reasoning mode) =====\nSkills selection mode: \"all\" = all preloaded skills, \"selected\" = specific skills, \"none\" = no skills" ,
"type" : "string"
} ,
"supported_file_types" : {
"description" : "===== File Type Restriction Settings =====\nSupported file types for this agent (e.g., [\"csv\", \"xlsx\", \"xls\"])\nEmpty means all file types are supported\nWhen set, only files with matching extensions can be used with this agent" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"system_prompt" : {
"description" : "System prompt for the agent (unified prompt, uses web_search_status placeholder for dynamic behavior)" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
"temperature" : {
2026-02-26 12:59:52 +00:00
"description" : "Temperature for LLM (0-1)" ,
2025-12-16 08:40:13 +00:00
"type" : "number"
} ,
2026-02-26 12:59:52 +00:00
"thinking" : {
"description" : "Whether to enable thinking mode (for models that support extended thinking)" ,
2025-12-16 08:40:13 +00:00
"type" : "boolean"
} ,
"vector_threshold" : {
2026-02-26 12:59:52 +00:00
"description" : "Vector retrieval threshold" ,
2025-12-16 08:40:13 +00:00
"type" : "number"
2026-02-26 12:59:52 +00:00
} ,
"web_search_enabled" : {
"description" : "===== Web Search Settings =====\nWhether web search is enabled" ,
"type" : "boolean"
} ,
"web_search_max_results" : {
"description" : "Maximum web search results" ,
"type" : "integer"
2025-12-16 08:40:13 +00:00
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.EmbeddingParameters" : {
"type" : "object" ,
"properties" : {
"dimension" : {
"type" : "integer"
} ,
"truncate_prompt_tokens" : {
"type" : "integer"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.ExtractConfig" : {
"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"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.FAQBatchUpsertPayload" : {
"type" : "object" ,
"required" : [
"entries"
] ,
"properties" : {
2026-02-26 12:59:52 +00:00
"dry_run" : {
"description" : "仅验证,不实际导入" ,
"type" : "boolean"
} ,
2025-12-16 08:40:13 +00:00
"entries" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload"
}
} ,
"knowledge_id" : {
"type" : "string"
} ,
"mode" : {
"type" : "string" ,
"enum" : [
"append" ,
"replace"
]
2026-02-26 12:59:52 +00:00
} ,
"task_id" : {
"description" : "可选, 如果不传则自动生成UUID" ,
"type" : "string"
2025-12-16 08:40:13 +00:00
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.FAQConfig" : {
"type" : "object" ,
"properties" : {
"index_mode" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQIndexMode"
} ,
"question_index_mode" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQQuestionIndexMode"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsBatchUpdate" : {
"type" : "object" ,
"properties" : {
"by_id" : {
2026-02-26 12:59:52 +00:00
"description" : "ByID 按条目ID更新, key为条目ID (seq_id)" ,
2025-12-16 08:40:13 +00:00
"type" : "object" ,
"additionalProperties" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate"
}
} ,
"by_tag" : {
2026-02-26 12:59:52 +00:00
"description" : "ByTag 按Tag批量更新, key为TagID (seq_id)" ,
2025-12-16 08:40:13 +00:00
"type" : "object" ,
"additionalProperties" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate"
}
2026-02-26 12:59:52 +00:00
} ,
"exclude_ids" : {
"description" : "ExcludeIDs 在ByTag操作中需要排除的ID列表 (seq_id)" ,
"type" : "array" ,
"items" : {
"type" : "integer"
}
2025-12-16 08:40:13 +00:00
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate" : {
"type" : "object" ,
"properties" : {
"is_enabled" : {
"type" : "boolean"
} ,
"is_recommended" : {
"type" : "boolean"
} ,
"tag_id" : {
2026-02-26 12:59:52 +00:00
"type" : "integer"
2025-12-16 08:40:13 +00:00
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.FAQEntryPayload" : {
"type" : "object" ,
"required" : [
"answers" ,
"standard_question"
] ,
"properties" : {
"answer_strategy" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.AnswerStrategy"
} ,
"answers" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2026-02-26 12:59:52 +00:00
"id" : {
"description" : "ID 可选,用于数据迁移时指定 seq_id( 必须小于自增起始值 100000000) " ,
"type" : "integer"
} ,
2025-12-16 08:40:13 +00:00
"is_enabled" : {
"type" : "boolean"
} ,
"is_recommended" : {
"type" : "boolean"
} ,
"negative_questions" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"similar_questions" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"standard_question" : {
"type" : "string"
} ,
"tag_id" : {
2026-02-26 12:59:52 +00:00
"type" : "integer"
2025-12-16 08:40:13 +00:00
} ,
"tag_name" : {
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.FAQIndexMode" : {
"type" : "string" ,
"enum" : [
"question_only" ,
"question_answer"
] ,
"x-enum-varnames" : [
"FAQIndexModeQuestionOnly" ,
"FAQIndexModeQuestionAnswer"
]
} ,
"github_com_Tencent_WeKnora_internal_types.FAQQuestionIndexMode" : {
"type" : "string" ,
"enum" : [
"combined" ,
"separate"
] ,
"x-enum-varnames" : [
"FAQQuestionIndexModeCombined" ,
"FAQQuestionIndexModeSeparate"
]
} ,
"github_com_Tencent_WeKnora_internal_types.FAQSearchRequest" : {
"type" : "object" ,
"required" : [
"query_text"
] ,
"properties" : {
2026-02-26 12:59:52 +00:00
"first_priority_tag_ids" : {
"description" : "第一优先级标签ID列表, 限定命中范围, 优先级最高" ,
"type" : "array" ,
"items" : {
"type" : "integer"
}
} ,
2025-12-16 08:40:13 +00:00
"match_count" : {
"type" : "integer"
} ,
2026-02-26 12:59:52 +00:00
"only_recommended" : {
"description" : "是否仅返回推荐的条目" ,
"type" : "boolean"
} ,
2025-12-16 08:40:13 +00:00
"query_text" : {
"type" : "string"
} ,
2026-02-26 12:59:52 +00:00
"second_priority_tag_ids" : {
"description" : "第二优先级标签ID列表, 限定命中范围, 优先级低于第一优先级" ,
"type" : "array" ,
"items" : {
"type" : "integer"
}
} ,
2025-12-16 08:40:13 +00:00
"vector_threshold" : {
"type" : "number"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.GraphNode" : {
"type" : "object" ,
"properties" : {
"attributes" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"chunks" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"name" : {
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.GraphRelation" : {
"type" : "object" ,
"properties" : {
"node1" : {
"type" : "string"
} ,
"node2" : {
"type" : "string"
} ,
"type" : {
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig" : {
"type" : "object" ,
"properties" : {
"model_id" : {
"description" : "Model ID" ,
"type" : "string"
}
}
} ,
2026-02-26 12:59:52 +00:00
"github_com_Tencent_WeKnora_internal_types.InviteMemberRequest" : {
"type" : "object" ,
"required" : [
"role" ,
"user_id"
] ,
"properties" : {
"role" : {
"description" : "Role to assign: admin/editor/viewer" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
} ,
"user_id" : {
"description" : "User ID to invite" ,
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest" : {
"type" : "object" ,
"required" : [
"organization_id"
] ,
"properties" : {
"message" : {
"description" : "Optional message for join request" ,
"type" : "string" ,
"maxLength" : 500
} ,
"organization_id" : {
"type" : "string"
} ,
"role" : {
"description" : "Optional: requested role (admin/editor/viewer); default viewer" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest" : {
"type" : "object" ,
"required" : [
"invite_code"
] ,
"properties" : {
"invite_code" : {
"type" : "string" ,
"maxLength" : 32 ,
"minLength" : 8
}
}
} ,
2025-12-16 08:40:13 +00:00
"github_com_Tencent_WeKnora_internal_types.Knowledge" : {
"type" : "object" ,
"properties" : {
"created_at" : {
"description" : "Creation time of the knowledge" ,
"type" : "string"
} ,
"deleted_at" : {
"description" : "Deletion time of the knowledge" ,
"allOf" : [
{
"$ref" : "#/definitions/gorm.DeletedAt"
}
]
} ,
"description" : {
"description" : "Description of the knowledge" ,
"type" : "string"
} ,
"embedding_model_id" : {
"description" : "ID of the embedding model" ,
"type" : "string"
} ,
"enable_status" : {
"description" : "Enable status of the knowledge" ,
"type" : "string"
} ,
"error_message" : {
"description" : "Error message of the knowledge" ,
"type" : "string"
} ,
"file_hash" : {
"description" : "File hash of the knowledge" ,
"type" : "string"
} ,
"file_name" : {
"description" : "File name of the knowledge" ,
"type" : "string"
} ,
"file_path" : {
"description" : "File path of the knowledge" ,
"type" : "string"
} ,
"file_size" : {
"description" : "File size of the knowledge" ,
"type" : "integer"
} ,
"file_type" : {
"description" : "File type of the knowledge" ,
"type" : "string"
} ,
"id" : {
"description" : "Unique identifier of the knowledge" ,
"type" : "string"
} ,
"knowledge_base_id" : {
"description" : "ID of the knowledge base" ,
"type" : "string"
} ,
2025-12-22 06:36:29 +00:00
"knowledge_base_name" : {
"description" : "Knowledge base name (not stored in database, populated on query)" ,
"type" : "string"
} ,
2026-02-26 12:59:52 +00:00
"last_faq_import_result" : {
"description" : "Last FAQ import result (for FAQ type knowledge only)" ,
"type" : "array" ,
"items" : {
"type" : "integer"
}
} ,
2025-12-16 08:40:13 +00:00
"metadata" : {
"description" : "Metadata of the knowledge" ,
"type" : "array" ,
"items" : {
"type" : "integer"
}
} ,
"parse_status" : {
"description" : "Parse status of the knowledge" ,
"type" : "string"
} ,
"processed_at" : {
"description" : "Processed time of the knowledge" ,
"type" : "string"
} ,
"source" : {
"description" : "Source of the knowledge" ,
"type" : "string"
} ,
"storage_size" : {
"description" : "Storage size of the knowledge" ,
"type" : "integer"
} ,
"summary_status" : {
"description" : "Summary status for async summary generation" ,
"type" : "string"
} ,
"tag_id" : {
"description" : "Optional tag ID for categorization within a knowledge base" ,
"type" : "string"
} ,
"tenant_id" : {
"description" : "Tenant ID" ,
"type" : "integer"
} ,
"title" : {
"description" : "Title of the knowledge" ,
"type" : "string"
} ,
"type" : {
"description" : "Type of the knowledge" ,
"type" : "string"
} ,
"updated_at" : {
"description" : "Last updated time of the knowledge" ,
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.KnowledgeBase" : {
"type" : "object" ,
"properties" : {
"chunk_count" : {
"description" : "Chunk count (not stored in database, calculated on query)" ,
"type" : "integer"
} ,
"chunking_config" : {
"description" : "Chunking configuration" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ChunkingConfig"
}
]
} ,
"cos_config" : {
"description" : "Storage config" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.StorageConfig"
}
]
} ,
"created_at" : {
"description" : "Creation time of the knowledge base" ,
"type" : "string"
} ,
"deleted_at" : {
"description" : "Deletion time of the knowledge base" ,
"allOf" : [
{
"$ref" : "#/definitions/gorm.DeletedAt"
}
]
} ,
"description" : {
"description" : "Description of the knowledge base" ,
"type" : "string"
} ,
"embedding_model_id" : {
"description" : "ID of the embedding model" ,
"type" : "string"
} ,
"extract_config" : {
"description" : "Extract config" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ExtractConfig"
}
]
} ,
"faq_config" : {
"description" : "FAQConfig stores FAQ specific configuration such as indexing strategy" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQConfig"
}
]
} ,
"id" : {
"description" : "Unique identifier of the knowledge base" ,
"type" : "string"
} ,
"image_processing_config" : {
"description" : "Image processing configuration" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig"
}
]
} ,
"is_processing" : {
"description" : "IsProcessing indicates if there is a processing import task (for FAQ type knowledge bases)" ,
"type" : "boolean"
} ,
"is_temporary" : {
"description" : "Whether this knowledge base is temporary (ephemeral) and should be hidden from UI" ,
"type" : "boolean"
} ,
"knowledge_count" : {
"description" : "Knowledge count (not stored in database, calculated on query)" ,
"type" : "integer"
} ,
"name" : {
"description" : "Name of the knowledge base" ,
"type" : "string"
} ,
"processing_count" : {
"description" : "ProcessingCount indicates the number of knowledge items being processed (for document type knowledge bases)" ,
"type" : "integer"
} ,
"question_generation_config" : {
"description" : "QuestionGenerationConfig stores question generation configuration for document knowledge bases" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig"
}
]
} ,
2026-02-26 12:59:52 +00:00
"share_count" : {
"description" : "ShareCount indicates the number of organizations this knowledge base is shared with (not stored in database)" ,
"type" : "integer"
} ,
2025-12-16 08:40:13 +00:00
"summary_model_id" : {
"description" : "Summary model ID" ,
"type" : "string"
} ,
"tenant_id" : {
"description" : "Tenant ID" ,
"type" : "integer"
} ,
"type" : {
"description" : "Type of the knowledge base (document, faq, etc.)" ,
"type" : "string"
} ,
"updated_at" : {
"description" : "Last updated time of the knowledge base" ,
"type" : "string"
} ,
2026-02-26 12:59:52 +00:00
"vlm_config" : {
"description" : "VLM config" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig"
}
]
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.KnowledgeBaseConfig" : {
"type" : "object" ,
"properties" : {
"chunking_config" : {
"description" : "Chunking configuration" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ChunkingConfig"
}
]
} ,
"faq_config" : {
"description" : "FAQ configuration (only for FAQ type knowledge bases)" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.FAQConfig"
}
]
} ,
"image_processing_config" : {
"description" : "Image processing configuration" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig"
}
]
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse" : {
"type" : "object" ,
"properties" : {
"chunk_count" : {
"type" : "integer"
} ,
"created_at" : {
"type" : "string"
} ,
"id" : {
"type" : "string"
} ,
"knowledge_base_id" : {
"type" : "string"
} ,
"knowledge_base_name" : {
"type" : "string"
} ,
"knowledge_base_type" : {
"type" : "string"
} ,
"knowledge_count" : {
"type" : "integer"
} ,
"my_permission" : {
"description" : "Effective permission for current user = min(Permission, MyRoleInOrg)" ,
"type" : "string"
} ,
"my_role_in_org" : {
"description" : "Current user's role in this organization (admin/editor/viewer)" ,
"type" : "string"
} ,
"organization_id" : {
"type" : "string"
} ,
"organization_name" : {
"type" : "string"
} ,
"permission" : {
"description" : "Share permission (what the space was granted: viewer/editor)" ,
"type" : "string"
} ,
"require_approval" : {
"type" : "boolean"
} ,
"shared_by_user_id" : {
"type" : "string"
} ,
"shared_by_username" : {
"type" : "string"
} ,
"source_tenant_id" : {
"type" : "integer"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.ListMembersResponse" : {
"type" : "object" ,
"properties" : {
"members" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.OrganizationMemberResponse"
}
} ,
"total" : {
"type" : "integer"
2025-12-16 08:40:13 +00:00
}
}
} ,
2026-02-26 12:59:52 +00:00
"github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse" : {
2025-12-16 08:40:13 +00:00
"type" : "object" ,
"properties" : {
2026-02-26 12:59:52 +00:00
"organizations" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.OrganizationResponse"
}
2025-12-16 08:40:13 +00:00
} ,
2026-02-26 12:59:52 +00:00
"resource_counts" : {
"description" : "各空间内知识库/智能体数量,供列表侧栏展示" ,
2025-12-16 08:40:13 +00:00
"allOf" : [
{
2026-02-26 12:59:52 +00:00
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ResourceCountsByOrgResponse"
2025-12-16 08:40:13 +00:00
}
]
} ,
2026-02-26 12:59:52 +00:00
"total" : {
"type" : "integer"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.ListSharesResponse" : {
"type" : "object" ,
"properties" : {
"shares" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse"
}
} ,
"total" : {
"type" : "integer"
2025-12-16 08:40:13 +00:00
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.LoginRequest" : {
"type" : "object" ,
"required" : [
"email" ,
"password"
] ,
"properties" : {
"email" : {
"type" : "string"
} ,
"password" : {
"type" : "string" ,
"minLength" : 6
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.LoginResponse" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
} ,
"refresh_token" : {
"type" : "string"
} ,
"success" : {
"type" : "boolean"
} ,
"tenant" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
} ,
"token" : {
"type" : "string"
} ,
"user" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.User"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.MCPAdvancedConfig" : {
"type" : "object" ,
"properties" : {
"retry_count" : {
"description" : "Number of retries, default: 3" ,
"type" : "integer"
} ,
"retry_delay" : {
"description" : "Delay between retries in seconds, default: 1" ,
"type" : "integer"
} ,
"timeout" : {
"description" : "Timeout in seconds, default: 30" ,
"type" : "integer"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.MCPAuthConfig" : {
"type" : "object" ,
"properties" : {
"api_key" : {
"type" : "string"
} ,
"custom_headers" : {
"type" : "object" ,
"additionalProperties" : {
"type" : "string"
}
} ,
"token" : {
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.MCPEnvVars" : {
"type" : "object" ,
"additionalProperties" : {
"type" : "string"
}
} ,
"github_com_Tencent_WeKnora_internal_types.MCPHeaders" : {
"type" : "object" ,
"additionalProperties" : {
"type" : "string"
}
} ,
"github_com_Tencent_WeKnora_internal_types.MCPService" : {
"type" : "object" ,
"properties" : {
"advanced_config" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPAdvancedConfig"
} ,
"auth_config" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPAuthConfig"
} ,
"created_at" : {
"type" : "string"
} ,
"deleted_at" : {
"$ref" : "#/definitions/gorm.DeletedAt"
} ,
"description" : {
"type" : "string"
} ,
"enabled" : {
"type" : "boolean"
} ,
"env_vars" : {
"description" : "Environment variables for stdio" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPEnvVars"
}
]
} ,
"headers" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPHeaders"
} ,
"id" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"stdio_config" : {
"description" : "Required for stdio transport" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPStdioConfig"
}
]
} ,
"tenant_id" : {
"type" : "integer"
} ,
"transport_type" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.MCPTransportType"
} ,
"updated_at" : {
"type" : "string"
} ,
"url" : {
"description" : "Optional: required for SSE/HTTP Streamable" ,
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.MCPStdioConfig" : {
"type" : "object" ,
"properties" : {
"args" : {
"description" : "Command arguments array" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"command" : {
"description" : "Command: \"uvx\" or \"npx\"" ,
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.MCPTransportType" : {
"type" : "string" ,
"enum" : [
"sse" ,
"http-streamable" ,
"stdio"
] ,
"x-enum-comments" : {
"MCPTransportHTTPStreamable" : "HTTP Streamable" ,
"MCPTransportSSE" : "Server-Sent Events" ,
"MCPTransportStdio" : "Stdio (Standard Input/Output)"
} ,
"x-enum-descriptions" : [
"Server-Sent Events" ,
"HTTP Streamable" ,
"Stdio (Standard Input/Output)"
] ,
"x-enum-varnames" : [
"MCPTransportSSE" ,
"MCPTransportHTTPStreamable" ,
"MCPTransportStdio"
]
} ,
"github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload" : {
"type" : "object" ,
"properties" : {
"content" : {
"type" : "string"
} ,
"status" : {
"type" : "string"
} ,
2026-02-26 12:59:52 +00:00
"tag_id" : {
"type" : "string"
} ,
2025-12-16 08:40:13 +00:00
"title" : {
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.MatchType" : {
"type" : "integer" ,
"enum" : [
0 ,
1 ,
2 ,
3 ,
4 ,
5 ,
6 ,
2025-12-22 06:36:29 +00:00
7 ,
2026-02-26 12:59:52 +00:00
8 ,
9
2025-12-16 08:40:13 +00:00
] ,
"x-enum-comments" : {
2026-02-26 12:59:52 +00:00
"MatchTypeDataAnalysis" : "数据分析匹配类型" ,
2025-12-22 06:36:29 +00:00
"MatchTypeDirectLoad" : "直接加载匹配类型" ,
2025-12-16 08:40:13 +00:00
"MatchTypeParentChunk" : "父Chunk匹配类型" ,
"MatchTypeRelationChunk" : "关系Chunk匹配类型" ,
"MatchTypeWebSearch" : "网络搜索匹配类型"
} ,
"x-enum-descriptions" : [
"" ,
"" ,
"" ,
"" ,
"父Chunk匹配类型" ,
"关系Chunk匹配类型" ,
"" ,
2025-12-22 06:36:29 +00:00
"网络搜索匹配类型" ,
2026-02-26 12:59:52 +00:00
"直接加载匹配类型" ,
"数据分析匹配类型"
2025-12-16 08:40:13 +00:00
] ,
"x-enum-varnames" : [
"MatchTypeEmbedding" ,
"MatchTypeKeywords" ,
"MatchTypeNearByChunk" ,
"MatchTypeHistory" ,
"MatchTypeParentChunk" ,
"MatchTypeRelationChunk" ,
"MatchTypeGraph" ,
2025-12-22 06:36:29 +00:00
"MatchTypeWebSearch" ,
2026-02-26 12:59:52 +00:00
"MatchTypeDirectLoad" ,
"MatchTypeDataAnalysis"
2025-12-16 08:40:13 +00:00
]
} ,
2025-12-22 06:36:29 +00:00
"github_com_Tencent_WeKnora_internal_types.MentionedItem" : {
"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"
}
}
} ,
2025-12-16 08:40:13 +00:00
"github_com_Tencent_WeKnora_internal_types.Message" : {
"type" : "object" ,
"properties" : {
"agent_steps" : {
"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/github_com_Tencent_WeKnora_internal_types.AgentStep"
}
} ,
"content" : {
"description" : "Message text content" ,
"type" : "string"
} ,
"created_at" : {
"description" : "Message creation timestamp" ,
"type" : "string"
} ,
"deleted_at" : {
"description" : "Soft delete timestamp" ,
"allOf" : [
{
"$ref" : "#/definitions/gorm.DeletedAt"
}
]
} ,
"id" : {
"description" : "Unique identifier for the message" ,
"type" : "string"
} ,
"is_completed" : {
"description" : "Whether message generation is complete" ,
"type" : "boolean"
} ,
"knowledge_references" : {
"description" : "References to knowledge chunks used in the response" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.SearchResult"
}
} ,
2025-12-22 06:36:29 +00:00
"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/github_com_Tencent_WeKnora_internal_types.MentionedItem"
}
} ,
2025-12-16 08:40:13 +00:00
"request_id" : {
"description" : "Request identifier for tracking API requests" ,
"type" : "string"
} ,
"role" : {
"description" : "Message role: \"user\", \"assistant\", \"system\"" ,
"type" : "string"
} ,
"session_id" : {
"description" : "ID of the session this message belongs to" ,
"type" : "string"
} ,
"updated_at" : {
"description" : "Last update timestamp" ,
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.ModelParameters" : {
"type" : "object" ,
"properties" : {
"api_key" : {
"type" : "string"
} ,
"base_url" : {
"type" : "string"
} ,
"embedding_parameters" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.EmbeddingParameters"
} ,
2026-02-26 12:59:52 +00:00
"extra_config" : {
"description" : "Provider-specific configuration" ,
"type" : "object" ,
"additionalProperties" : {
"type" : "string"
}
} ,
2025-12-16 08:40:13 +00:00
"interface_type" : {
"type" : "string"
} ,
"parameter_size" : {
"description" : "Ollama model parameter size (e.g., \"7B\", \"13B\", \"70B\")" ,
"type" : "string"
2026-02-26 12:59:52 +00:00
} ,
"provider" : {
"description" : "Provider identifier: openai, aliyun, zhipu, generic" ,
"type" : "string"
2025-12-16 08:40:13 +00:00
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.ModelSource" : {
"type" : "string" ,
"enum" : [
"local" ,
"remote" ,
2026-02-26 12:59:52 +00:00
"aliyun" ,
"zhipu" ,
"volcengine" ,
"deepseek" ,
"hunyuan" ,
"minimax" ,
"openai" ,
"gemini" ,
"mimo" ,
"siliconflow" ,
"jina" ,
"openrouter"
2025-12-16 08:40:13 +00:00
] ,
"x-enum-comments" : {
"ModelSourceAliyun" : "Aliyun DashScope model" ,
2026-02-26 12:59:52 +00:00
"ModelSourceDeepseek" : "Deepseek model" ,
"ModelSourceGemini" : "Gemini model" ,
"ModelSourceHunyuan" : "Hunyuan model" ,
"ModelSourceJina" : "Jina AI model" ,
2025-12-16 08:40:13 +00:00
"ModelSourceLocal" : "Local model" ,
2026-02-26 12:59:52 +00:00
"ModelSourceMimo" : "Mimo model" ,
"ModelSourceMinimax" : "Minimax mode" ,
"ModelSourceOpenAI" : "OpenAI model" ,
"ModelSourceOpenRouter" : "OpenRouter model" ,
"ModelSourceRemote" : "Remote model" ,
"ModelSourceSiliconFlow" : "SiliconFlow model" ,
"ModelSourceVolcengine" : "Volcengine model" ,
"ModelSourceZhipu" : "Zhipu model"
2025-12-16 08:40:13 +00:00
} ,
"x-enum-descriptions" : [
"Local model" ,
"Remote model" ,
2026-02-26 12:59:52 +00:00
"Aliyun DashScope model" ,
"Zhipu model" ,
"Volcengine model" ,
"Deepseek model" ,
"Hunyuan model" ,
"Minimax mode" ,
"OpenAI model" ,
"Gemini model" ,
"Mimo model" ,
"SiliconFlow model" ,
"Jina AI model" ,
"OpenRouter model"
2025-12-16 08:40:13 +00:00
] ,
"x-enum-varnames" : [
"ModelSourceLocal" ,
"ModelSourceRemote" ,
2026-02-26 12:59:52 +00:00
"ModelSourceAliyun" ,
"ModelSourceZhipu" ,
"ModelSourceVolcengine" ,
"ModelSourceDeepseek" ,
"ModelSourceHunyuan" ,
"ModelSourceMinimax" ,
"ModelSourceOpenAI" ,
"ModelSourceGemini" ,
"ModelSourceMimo" ,
"ModelSourceSiliconFlow" ,
"ModelSourceJina" ,
"ModelSourceOpenRouter"
2025-12-16 08:40:13 +00:00
]
} ,
"github_com_Tencent_WeKnora_internal_types.ModelType" : {
"type" : "string" ,
"enum" : [
"Embedding" ,
"Rerank" ,
"KnowledgeQA" ,
"VLLM"
] ,
"x-enum-comments" : {
"ModelTypeEmbedding" : "Embedding model" ,
"ModelTypeKnowledgeQA" : "KnowledgeQA model" ,
"ModelTypeRerank" : "Rerank model" ,
"ModelTypeVLLM" : "VLLM model"
} ,
"x-enum-descriptions" : [
"Embedding model" ,
"Rerank model" ,
"KnowledgeQA model" ,
"VLLM model"
] ,
"x-enum-varnames" : [
"ModelTypeEmbedding" ,
"ModelTypeRerank" ,
"ModelTypeKnowledgeQA" ,
"ModelTypeVLLM"
]
} ,
2026-02-26 12:59:52 +00:00
"github_com_Tencent_WeKnora_internal_types.OrgMemberRole" : {
"type" : "string" ,
"enum" : [
"admin" ,
"editor" ,
"viewer"
] ,
"x-enum-varnames" : [
"OrgRoleAdmin" ,
"OrgRoleEditor" ,
"OrgRoleViewer"
]
} ,
"github_com_Tencent_WeKnora_internal_types.OrganizationMemberResponse" : {
"type" : "object" ,
"properties" : {
"avatar" : {
"type" : "string"
} ,
"email" : {
"type" : "string"
} ,
"id" : {
"type" : "string"
} ,
"joined_at" : {
"type" : "string"
} ,
"role" : {
"type" : "string"
} ,
"tenant_id" : {
"type" : "integer"
} ,
"user_id" : {
"type" : "string"
} ,
"username" : {
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.OrganizationResponse" : {
"type" : "object" ,
"properties" : {
"agent_share_count" : {
"description" : "共享到该组织的智能体数量" ,
"type" : "integer"
} ,
"avatar" : {
"type" : "string"
} ,
"created_at" : {
"type" : "string"
} ,
"description" : {
"type" : "string"
} ,
"has_pending_upgrade" : {
"description" : "当前用户是否有待处理的权限升级申请" ,
"type" : "boolean"
} ,
"id" : {
"type" : "string"
} ,
"invite_code" : {
"type" : "string"
} ,
"invite_code_expires_at" : {
"type" : "string"
} ,
"invite_code_validity_days" : {
"type" : "integer"
} ,
"is_owner" : {
"type" : "boolean"
} ,
"member_count" : {
"type" : "integer"
} ,
"member_limit" : {
"description" : "0 = unlimited" ,
"type" : "integer"
} ,
"my_role" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"owner_id" : {
"type" : "string"
} ,
"pending_join_request_count" : {
"description" : "待审批加入申请数(仅管理员可见)" ,
"type" : "integer"
} ,
"require_approval" : {
"type" : "boolean"
} ,
"searchable" : {
"type" : "boolean"
} ,
"share_count" : {
"description" : "共享到该组织的知识库数量" ,
"type" : "integer"
} ,
"updated_at" : {
"type" : "string"
}
}
} ,
2025-12-16 08:40:13 +00:00
"github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig" : {
"type" : "object" ,
"properties" : {
"enabled" : {
"type" : "boolean"
} ,
"question_count" : {
"description" : "Number of questions to generate per chunk (default: 3, max: 10)" ,
"type" : "integer"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.RegisterRequest" : {
"type" : "object" ,
"required" : [
"email" ,
"password" ,
"username"
] ,
"properties" : {
"email" : {
"type" : "string"
} ,
"password" : {
"type" : "string" ,
"minLength" : 6
} ,
"username" : {
"type" : "string" ,
"maxLength" : 50 ,
"minLength" : 3
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.RegisterResponse" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
} ,
"success" : {
"type" : "boolean"
} ,
"tenant" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
} ,
"user" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.User"
}
}
} ,
2026-02-26 12:59:52 +00:00
"github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest" : {
"type" : "object" ,
"required" : [
"requested_role"
] ,
"properties" : {
"message" : {
"description" : "Optional message explaining the reason" ,
"type" : "string" ,
"maxLength" : 500
} ,
"requested_role" : {
"description" : "The role user wants to upgrade to" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.ResourceCountsByOrgResponse" : {
"type" : "object" ,
"properties" : {
"agents" : {
"type" : "object" ,
"properties" : {
"by_organization" : {
"type" : "object" ,
"additionalProperties" : {
"type" : "integer"
}
}
}
} ,
"knowledge_bases" : {
"type" : "object" ,
"properties" : {
"by_organization" : {
"type" : "object" ,
"additionalProperties" : {
"type" : "integer"
}
}
}
}
}
} ,
2025-12-16 08:40:13 +00:00
"github_com_Tencent_WeKnora_internal_types.RetrieverEngineParams" : {
"type" : "object" ,
"properties" : {
"retriever_engine_type" : {
"description" : "Retriever engine type" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineType"
}
]
} ,
"retriever_type" : {
"description" : "Retriever type" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverType"
}
]
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.RetrieverEngineType" : {
"type" : "string" ,
"enum" : [
"postgres" ,
"elasticsearch" ,
"infinity" ,
"elasticfaiss" ,
"qdrant"
] ,
"x-enum-varnames" : [
"PostgresRetrieverEngineType" ,
"ElasticsearchRetrieverEngineType" ,
"InfinityRetrieverEngineType" ,
"ElasticFaissRetrieverEngineType" ,
"QdrantRetrieverEngineType"
]
} ,
"github_com_Tencent_WeKnora_internal_types.RetrieverEngines" : {
"type" : "object" ,
"properties" : {
"engines" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineParams"
}
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.RetrieverType" : {
"type" : "string" ,
"enum" : [
"keywords" ,
"vector" ,
"websearch"
] ,
"x-enum-comments" : {
"KeywordsRetrieverType" : "Keywords retriever" ,
"VectorRetrieverType" : "Vector retriever" ,
"WebSearchRetrieverType" : "Web search retriever"
} ,
"x-enum-descriptions" : [
"Keywords retriever" ,
"Vector retriever" ,
"Web search retriever"
] ,
"x-enum-varnames" : [
"KeywordsRetrieverType" ,
"VectorRetrieverType" ,
"WebSearchRetrieverType"
]
} ,
2026-02-26 12:59:52 +00:00
"github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest" : {
"type" : "object" ,
"properties" : {
"approved" : {
"type" : "boolean"
} ,
"message" : {
"type" : "string" ,
"maxLength" : 500
} ,
"role" : {
"description" : "Optional: role to assign when approving; overrides applicant's requested role" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
}
}
} ,
2025-12-16 08:40:13 +00:00
"github_com_Tencent_WeKnora_internal_types.SearchParams" : {
"type" : "object" ,
"properties" : {
"disable_keywords_match" : {
"type" : "boolean"
} ,
"disable_vector_match" : {
"type" : "boolean"
} ,
"keyword_threshold" : {
"type" : "number"
} ,
2025-12-22 06:36:29 +00:00
"knowledge_ids" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2025-12-16 08:40:13 +00:00
"match_count" : {
"type" : "integer"
} ,
2026-02-26 12:59:52 +00:00
"only_recommended" : {
"type" : "boolean"
} ,
2025-12-16 08:40:13 +00:00
"query_text" : {
"type" : "string"
} ,
2026-02-26 12:59:52 +00:00
"tag_ids" : {
"description" : "Tag IDs for filtering (used for FAQ priority filtering)" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2025-12-16 08:40:13 +00:00
"vector_threshold" : {
"type" : "number"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.SearchResult" : {
"type" : "object" ,
"properties" : {
"chunk_index" : {
"description" : "Chunk index" ,
"type" : "integer"
} ,
"chunk_metadata" : {
"description" : "ChunkMetadata stores chunk-level metadata (e.g., generated questions)" ,
"type" : "array" ,
"items" : {
"type" : "integer"
}
} ,
"chunk_type" : {
"description" : "Chunk 类型" ,
"type" : "string"
} ,
"content" : {
"description" : "Content" ,
"type" : "string"
} ,
"end_at" : {
"description" : "End at" ,
"type" : "integer"
} ,
"id" : {
"description" : "ID" ,
"type" : "string"
} ,
"image_info" : {
"description" : "图片信息 (JSON 格式)" ,
"type" : "string"
} ,
"knowledge_filename" : {
"description" : "Knowledge file name\nUsed for file type knowledge, contains the original file name" ,
"type" : "string"
} ,
"knowledge_id" : {
"description" : "Knowledge ID" ,
"type" : "string"
} ,
"knowledge_source" : {
"description" : "Knowledge source\nUsed to indicate the source of the knowledge, such as \"url\"" ,
"type" : "string"
} ,
"knowledge_title" : {
"description" : "Knowledge title" ,
"type" : "string"
} ,
"match_type" : {
"description" : "Match type" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.MatchType"
}
]
} ,
2026-02-26 12:59:52 +00:00
"matched_content" : {
"description" : "MatchedContent is the actual content that was matched in vector search\nFor FAQ: this is the matched question text (standard or similar question)" ,
"type" : "string"
} ,
2025-12-16 08:40:13 +00:00
"metadata" : {
"description" : "Metadata" ,
"type" : "object" ,
"additionalProperties" : {
"type" : "string"
}
} ,
"parent_chunk_id" : {
"description" : "父 Chunk ID" ,
"type" : "string"
} ,
"score" : {
"description" : "Score" ,
"type" : "number"
} ,
"seq" : {
"description" : "Seq" ,
"type" : "integer"
} ,
"start_at" : {
"description" : "Start at" ,
"type" : "integer"
} ,
"sub_chunk_id" : {
"description" : "SubChunkIndex" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.Session" : {
"type" : "object" ,
"properties" : {
"created_at" : {
"type" : "string"
} ,
"deleted_at" : {
"$ref" : "#/definitions/gorm.DeletedAt"
} ,
"description" : {
"description" : "Description" ,
"type" : "string"
} ,
2026-02-26 12:59:52 +00:00
"id" : {
"description" : "ID" ,
"type" : "string"
2025-12-16 08:40:13 +00:00
} ,
"tenant_id" : {
"description" : "Tenant ID" ,
"type" : "integer"
} ,
"title" : {
"description" : "Title" ,
"type" : "string"
} ,
"updated_at" : {
"type" : "string"
}
}
} ,
2026-02-26 12:59:52 +00:00
"github_com_Tencent_WeKnora_internal_types.ShareKnowledgeBaseRequest" : {
2025-12-16 08:40:13 +00:00
"type" : "object" ,
2026-02-26 12:59:52 +00:00
"required" : [
"organization_id" ,
"permission"
] ,
2025-12-16 08:40:13 +00:00
"properties" : {
2026-02-26 12:59:52 +00:00
"organization_id" : {
"type" : "string"
2025-12-22 06:36:29 +00:00
} ,
2026-02-26 12:59:52 +00:00
"permission" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
2025-12-16 08:40:13 +00:00
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.StorageConfig" : {
"type" : "object" ,
"properties" : {
"app_id" : {
"description" : "App ID" ,
"type" : "string"
} ,
"bucket_name" : {
"description" : "Bucket Name" ,
"type" : "string"
} ,
"path_prefix" : {
"description" : "Path Prefix" ,
"type" : "string"
} ,
"provider" : {
"description" : "Provider" ,
"type" : "string"
} ,
"region" : {
"description" : "Region" ,
"type" : "string"
} ,
"secret_id" : {
"description" : "Secret ID" ,
"type" : "string"
} ,
"secret_key" : {
"description" : "Secret Key" ,
"type" : "string"
}
}
} ,
2026-02-26 12:59:52 +00:00
"github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest" : {
2025-12-16 08:40:13 +00:00
"type" : "object" ,
2026-02-26 12:59:52 +00:00
"required" : [
"invite_code"
] ,
2025-12-16 08:40:13 +00:00
"properties" : {
2026-02-26 12:59:52 +00:00
"invite_code" : {
"type" : "string" ,
"maxLength" : 32 ,
"minLength" : 8
2025-12-16 08:40:13 +00:00
} ,
2026-02-26 12:59:52 +00:00
"message" : {
"type" : "string" ,
"maxLength" : 500
2025-12-16 08:40:13 +00:00
} ,
2026-02-26 12:59:52 +00:00
"role" : {
"description" : "Optional: role the applicant requests (admin/editor/viewer); default viewer" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
]
2025-12-16 08:40:13 +00:00
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.Tenant" : {
"type" : "object" ,
"properties" : {
"agent_config" : {
2026-02-26 12:59:52 +00:00
"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." ,
2025-12-16 08:40:13 +00:00
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.AgentConfig"
}
]
} ,
"api_key" : {
"description" : "API key" ,
"type" : "string"
} ,
"business" : {
"description" : "Business" ,
"type" : "string"
} ,
"context_config" : {
"description" : "Global Context configuration for this tenant (default for all sessions)" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ContextConfig"
}
]
} ,
"conversation_config" : {
2026-02-26 12:59:52 +00:00
"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." ,
2025-12-16 08:40:13 +00:00
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ConversationConfig"
}
]
} ,
"created_at" : {
"description" : "Creation time" ,
"type" : "string"
} ,
"deleted_at" : {
"description" : "Deletion time" ,
"allOf" : [
{
"$ref" : "#/definitions/gorm.DeletedAt"
}
]
} ,
"description" : {
"description" : "Description" ,
"type" : "string"
} ,
"id" : {
"description" : "ID" ,
"type" : "integer"
} ,
"name" : {
"description" : "Name" ,
"type" : "string"
} ,
"retriever_engines" : {
"description" : "Retriever engines" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngines"
}
]
} ,
"status" : {
"description" : "Status" ,
"type" : "string"
} ,
"storage_quota" : {
"description" : "Storage quota (Bytes), default is 10GB, including vector, original file, text, index, etc." ,
"type" : "integer"
} ,
"storage_used" : {
"description" : "Storage used (Bytes)" ,
"type" : "integer"
} ,
"updated_at" : {
"description" : "Last updated time" ,
"type" : "string"
} ,
"web_search_config" : {
"description" : "Global WebSearch configuration for this tenant" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.WebSearchConfig"
}
]
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.ToolCall" : {
"type" : "object" ,
"properties" : {
"args" : {
"description" : "Tool arguments" ,
"type" : "object" ,
"additionalProperties" : true
} ,
"duration" : {
"description" : "Execution time in milliseconds" ,
"type" : "integer"
} ,
"id" : {
"description" : "Function call ID from LLM" ,
"type" : "string"
} ,
"name" : {
"description" : "Tool name" ,
"type" : "string"
} ,
"reflection" : {
"description" : "Agent's reflection on this tool call result (if enabled)" ,
"type" : "string"
} ,
"result" : {
"description" : "Execution result (contains Output)" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.ToolResult"
}
]
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.ToolResult" : {
"type" : "object" ,
"properties" : {
"data" : {
"description" : "Structured data for programmatic use" ,
"type" : "object" ,
"additionalProperties" : true
} ,
"error" : {
"description" : "Error message if execution failed" ,
"type" : "string"
} ,
"output" : {
"description" : "Human-readable output" ,
"type" : "string"
} ,
"success" : {
"description" : "Whether the tool executed successfully" ,
"type" : "boolean"
}
}
} ,
2026-02-26 12:59:52 +00:00
"github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest" : {
"type" : "object" ,
"required" : [
"role"
] ,
"properties" : {
"role" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest" : {
"type" : "object" ,
"properties" : {
"avatar" : {
"description" : "optional avatar URL" ,
"type" : "string" ,
"maxLength" : 512
} ,
"description" : {
"type" : "string" ,
"maxLength" : 1000
} ,
"invite_code_validity_days" : {
"description" : "0=never, 1, 7, 30" ,
"type" : "integer"
} ,
"member_limit" : {
"description" : "max members; 0=unlimited" ,
"type" : "integer"
} ,
"name" : {
"type" : "string" ,
"maxLength" : 255 ,
"minLength" : 1
} ,
"require_approval" : {
"type" : "boolean"
} ,
"searchable" : {
"description" : "open for search so others can discover and join" ,
"type" : "boolean"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.UpdateSharePermissionRequest" : {
"type" : "object" ,
"required" : [
"permission"
] ,
"properties" : {
"permission" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"
}
}
} ,
2025-12-16 08:40:13 +00:00
"github_com_Tencent_WeKnora_internal_types.User" : {
"type" : "object" ,
"properties" : {
"avatar" : {
"description" : "Avatar URL of the user" ,
"type" : "string"
} ,
"can_access_all_tenants" : {
"description" : "Whether the user can access all tenants (cross-tenant access)" ,
"type" : "boolean"
} ,
"created_at" : {
"description" : "Creation time of the user" ,
"type" : "string"
} ,
"deleted_at" : {
"description" : "Deletion time of the user" ,
"allOf" : [
{
"$ref" : "#/definitions/gorm.DeletedAt"
}
]
} ,
"email" : {
"description" : "Email address of the user" ,
"type" : "string"
} ,
"id" : {
"description" : "Unique identifier of the user" ,
"type" : "string"
} ,
"is_active" : {
"description" : "Whether the user is active" ,
"type" : "boolean"
} ,
"tenant" : {
"description" : "Association relationship, not stored in the database" ,
"allOf" : [
{
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant"
}
]
} ,
"tenant_id" : {
"description" : "Tenant ID that the user belongs to" ,
"type" : "integer"
} ,
"updated_at" : {
"description" : "Last updated time of the user" ,
"type" : "string"
} ,
"username" : {
"description" : "Username of the user" ,
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.VLMConfig" : {
"type" : "object" ,
"properties" : {
"api_key" : {
"description" : "API Key" ,
"type" : "string"
} ,
"base_url" : {
"description" : "Base URL" ,
"type" : "string"
} ,
"enabled" : {
"type" : "boolean"
} ,
"interface_type" : {
"description" : "Interface Type: \"ollama\" or \"openai\"" ,
"type" : "string"
} ,
"model_id" : {
"type" : "string"
} ,
"model_name" : {
"description" : "兼容老版本\nModel Name" ,
"type" : "string"
}
}
} ,
"github_com_Tencent_WeKnora_internal_types.WebSearchConfig" : {
"type" : "object" ,
"properties" : {
"api_key" : {
"description" : "API密钥( 如果需要) " ,
"type" : "string"
} ,
"blacklist" : {
"description" : "黑名单规则列表" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"compression_method" : {
"description" : "压缩方法: none, summary, extract, rag" ,
"type" : "string"
} ,
"document_fragments" : {
"description" : "文档片段数量( 用于RAG压缩) " ,
"type" : "integer"
} ,
"embedding_dimension" : {
"description" : "嵌入维度( 用于RAG压缩) " ,
"type" : "integer"
} ,
"embedding_model_id" : {
"description" : "RAG压缩相关配置" ,
"type" : "string"
} ,
"include_date" : {
"description" : "是否包含日期" ,
"type" : "boolean"
} ,
"max_results" : {
"description" : "最大搜索结果数" ,
"type" : "integer"
} ,
"provider" : {
"description" : "搜索引擎提供商ID" ,
"type" : "string"
} ,
"rerank_model_id" : {
"description" : "重排模型ID( 用于RAG压缩) " ,
"type" : "string"
}
}
} ,
"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"
2026-02-26 12:59:52 +00:00
} ,
"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"
2025-12-16 08:40:13 +00:00
}
}
} ,
"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"
}
}
} ,
2026-02-26 12:59:52 +00:00
"internal_handler.DeleteTagRequest" : {
"type" : "object" ,
"properties" : {
"exclude_ids" : {
"description" : "Chunk seq_ids to exclude from deletion" ,
"type" : "array" ,
"items" : {
"type" : "integer"
}
}
}
} ,
2025-12-16 08:40:13 +00:00
"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" ,
"properties" : {
"llm_config" : {
"$ref" : "#/definitions/internal_handler.LLMConfig"
} ,
"tags" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
}
} ,
"internal_handler.GetSystemInfoResponse" : {
"type" : "object" ,
"properties" : {
"build_time" : {
"type" : "string"
} ,
"commit_id" : {
"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" : [
"embeddingModelId" ,
"llmModelId"
] ,
"properties" : {
"documentSplitting" : {
"description" : "文档分块配置" ,
"type" : "object" ,
"properties" : {
"chunkOverlap" : {
"type" : "integer"
} ,
"chunkSize" : {
"type" : "integer"
} ,
"separators" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
}
} ,
"embeddingModelId" : {
"type" : "string"
} ,
"llmModelId" : {
"type" : "string"
} ,
"multimodal" : {
"description" : "多模态配置" ,
"type" : "object" ,
"properties" : {
"cos" : {
"type" : "object" ,
"properties" : {
"appId" : {
"type" : "string"
} ,
"bucketName" : {
"type" : "string"
} ,
"pathPrefix" : {
"type" : "string"
} ,
"region" : {
"type" : "string"
} ,
"secretId" : {
"type" : "string"
} ,
"secretKey" : {
"type" : "string"
}
}
} ,
"enabled" : {
"type" : "boolean"
} ,
"minio" : {
"type" : "object" ,
"properties" : {
"bucketName" : {
"type" : "string"
} ,
"pathPrefix" : {
"type" : "string"
} ,
"useSSL" : {
"type" : "boolean"
}
}
} ,
"storageType" : {
"description" : "\"cos\" or \"minio\"" ,
"type" : "string"
}
}
} ,
"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"
}
}
} ,
"vlm_config" : {
"$ref" : "#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig"
}
}
} ,
"internal_handler.LLMConfig" : {
"type" : "object" ,
"properties" : {
"api_key" : {
"type" : "string"
} ,
"base_url" : {
"type" : "string"
} ,
"model_name" : {
"type" : "string"
} ,
"source" : {
"type" : "string"
}
}
} ,
2026-02-26 12:59:52 +00:00
"internal_handler.ListMinioBucketsResponse" : {
"type" : "object" ,
"properties" : {
"buckets" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/internal_handler.MinioBucketInfo"
}
}
}
} ,
"internal_handler.MinioBucketInfo" : {
"type" : "object" ,
"properties" : {
"created_at" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"policy" : {
"description" : "\"public\", \"private\", \"custom\"" ,
"type" : "string"
}
}
} ,
2025-12-16 08:40:13 +00:00
"internal_handler.RemoteModelCheckRequest" : {
"type" : "object" ,
"required" : [
"baseUrl" ,
"modelName"
] ,
"properties" : {
"apiKey" : {
"type" : "string"
} ,
"baseUrl" : {
"type" : "string"
} ,
"modelName" : {
"type" : "string"
}
}
} ,
"internal_handler.TextRelationExtractionRequest" : {
"type" : "object" ,
"required" : [
"tags" ,
"text"
] ,
"properties" : {
"llm_config" : {
"$ref" : "#/definitions/internal_handler.LLMConfig"
} ,
"tags" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"text" : {
"type" : "string"
}
}
} ,
2026-02-26 12:59:52 +00:00
"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"
}
}
} ,
2025-12-16 08:40:13 +00:00
"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" : [
"config" ,
"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"
}
}
} ,
2026-02-26 12:59:52 +00:00
"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"
]
}
}
} ,
2025-12-16 08:40:13 +00:00
"internal_handler_session.CreateKnowledgeQARequest" : {
"type" : "object" ,
"required" : [
"query"
] ,
"properties" : {
"agent_enabled" : {
"description" : "Whether agent mode is enabled for this request" ,
"type" : "boolean"
} ,
2026-02-26 12:59:52 +00:00
"agent_id" : {
"description" : "Selected custom agent ID (backend resolves shared agent and its tenant from share relation)" ,
"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"
} ,
2025-12-16 08:40:13 +00:00
"knowledge_base_ids" : {
"description" : "Selected knowledge base ID for this request" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2025-12-22 06:36:29 +00:00
"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"
}
} ,
2025-12-16 08:40:13 +00:00
"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" : {
2026-02-26 12:59:52 +00:00
"description" : {
"description" : "Description for the session (optional)" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
2026-02-26 12:59:52 +00:00
"title" : {
"description" : "Title for the session (optional)" ,
"type" : "string"
2025-12-16 08:40:13 +00:00
}
}
} ,
"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"
}
}
}
} ,
2025-12-22 06:36:29 +00:00
"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"
}
}
} ,
2025-12-16 08:40:13 +00:00
"internal_handler_session.SearchKnowledgeRequest" : {
"type" : "object" ,
"required" : [
"query"
] ,
"properties" : {
"knowledge_base_id" : {
2025-12-24 07:45:42 +00:00
"description" : "Single knowledge base ID (for backward compatibility)" ,
2025-12-16 08:40:13 +00:00
"type" : "string"
} ,
2025-12-24 07:45:42 +00:00
"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"
}
} ,
2025-12-16 08:40:13 +00:00
"query" : {
"description" : "Query text to search for" ,
"type" : "string"
}
}
} ,
2026-02-26 12:59:52 +00:00
"internal_handler_session.StopSessionRequest" : {
2025-12-16 08:40:13 +00:00
"type" : "object" ,
2026-02-26 12:59:52 +00:00
"required" : [
"message_id"
] ,
2025-12-16 08:40:13 +00:00
"properties" : {
2026-02-26 12:59:52 +00:00
"message_id" : {
2025-12-16 08:40:13 +00:00
"type" : "string"
}
}
} ,
2026-02-26 12:59:52 +00:00
"internal_handler_session.batchDeleteRequest" : {
2025-12-16 08:40:13 +00:00
"type" : "object" ,
"required" : [
2026-02-26 12:59:52 +00:00
"ids"
2025-12-16 08:40:13 +00:00
] ,
"properties" : {
2026-02-26 12:59:52 +00:00
"ids" : {
"type" : "array" ,
"minItems" : 1 ,
"items" : {
"type" : "string"
}
2025-12-16 08:40:13 +00:00
}
}
}
} ,
"securityDefinitions" : {
2025-12-22 06:36:29 +00:00
"ApiKeyAuth" : {
"description" : "租户身份认证:输入 sk- 开头的 API Key" ,
"type" : "apiKey" ,
"name" : "X-API-Key" ,
"in" : "header"
} ,
2025-12-16 08:40:13 +00:00
"Bearer" : {
2025-12-22 06:36:29 +00:00
"description" : "用户登录认证:输入 Bearer {token} 格式的 JWT 令牌" ,
2025-12-16 08:40:13 +00:00
"type" : "apiKey" ,
"name" : "Authorization" ,
"in" : "header"
}
}
} `
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = & swag . Spec {
Version : "1.0" ,
2025-12-24 07:45:42 +00:00
Host : "" ,
2025-12-16 08:40:13 +00:00
BasePath : "/api/v1" ,
Schemes : [ ] string { } ,
Title : "WeKnora API" ,
Description : "WeKnora 知识库管理系统 API 文档" ,
InfoInstanceName : "swagger" ,
SwaggerTemplate : docTemplate ,
LeftDelim : "{{" ,
RightDelim : "}}" ,
}
func init ( ) {
swag . Register ( SwaggerInfo . InstanceName ( ) , SwaggerInfo )
}