2026-03-11 14:25:55 +08:00
|
|
|
|
definitions:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
handler.ChatRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_id:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
message:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
session_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
use_xbot:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
required:
|
|
|
|
|
|
- agent_id
|
|
|
|
|
|
- message
|
|
|
|
|
|
type: object
|
|
|
|
|
|
handler.ChatResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_id:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
duration_ms:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
metadata: {}
|
|
|
|
|
|
reply:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
session_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tokens_used:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
tools_used:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
|
|
|
|
|
handler.CreateAgentRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
avatar:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge:
|
|
|
|
|
|
description: 知识库
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model_provider:
|
|
|
|
|
|
description: 模型配置
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
prompt:
|
|
|
|
|
|
description: 自定义提示词
|
|
|
|
|
|
type: string
|
|
|
|
|
|
skills:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
skills_mode:
|
|
|
|
|
|
description: 技能配置
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- name
|
|
|
|
|
|
type: object
|
|
|
|
|
|
handler.CreateAgentResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_id:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
message:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
handler.ListAgentsResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agents:
|
|
|
|
|
|
items: {}
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
2026-03-11 14:25:55 +08:00
|
|
|
|
handler.LoginRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- password
|
|
|
|
|
|
- username
|
|
|
|
|
|
type: object
|
|
|
|
|
|
handler.LoginResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
token:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
user: {}
|
|
|
|
|
|
type: object
|
|
|
|
|
|
handler.RegisterRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
email:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- password
|
|
|
|
|
|
- username
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
handler.TeamChatRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
member_agent_ids:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
|
|
|
|
|
message:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
session_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
strategy:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
supervisor_agent_id:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
required:
|
|
|
|
|
|
- member_agent_ids
|
|
|
|
|
|
- message
|
|
|
|
|
|
- supervisor_agent_id
|
|
|
|
|
|
type: object
|
|
|
|
|
|
handler.TeamChatResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
duration_ms:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
metadata: {}
|
|
|
|
|
|
reply:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
session_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
strategy:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
subtask_results: {}
|
|
|
|
|
|
supervisor_agent_id:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
2026-03-11 14:25:55 +08:00
|
|
|
|
model.CPUInfo:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
core_count:
|
|
|
|
|
|
description: 核心数
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
model_name:
|
|
|
|
|
|
description: CPU型号
|
|
|
|
|
|
type: string
|
|
|
|
|
|
percent:
|
|
|
|
|
|
description: CPU使用率
|
|
|
|
|
|
type: number
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.CheckRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
charset:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
database:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
database_id:
|
|
|
|
|
|
description: 可选,用于获取已保存的字段映射
|
|
|
|
|
|
type: string
|
|
|
|
|
|
db_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
host:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
port:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
ssl_mode:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
uri:
|
|
|
|
|
|
description: Neo4j 连接地址,如 bolt://localhost:7687
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- db_type
|
|
|
|
|
|
- host
|
|
|
|
|
|
- port
|
|
|
|
|
|
- username
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.CreateDatabaseRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
charset:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
database:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
db_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
host:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
port:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
ssl_mode:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
sub_tables:
|
|
|
|
|
|
description: 可选,子表配置
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/model.CreateSubTableRequest'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- db_type
|
|
|
|
|
|
- host
|
|
|
|
|
|
- name
|
|
|
|
|
|
- port
|
|
|
|
|
|
- username
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.CreateKnowledgeRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
embedding_model_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
llm_model_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
parsing_config:
|
|
|
|
|
|
$ref: '#/definitions/model.ParsingConfig'
|
|
|
|
|
|
storage_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/model.StorageConfig'
|
|
|
|
|
|
description: 存储配置,不传则使用全局配置
|
|
|
|
|
|
required:
|
|
|
|
|
|
- embedding_model_id
|
|
|
|
|
|
- llm_model_id
|
|
|
|
|
|
- name
|
|
|
|
|
|
- parsing_config
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.CreateModelRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
api_endpoint:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
api_key:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
base_url:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
provider:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
status:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- api_key
|
|
|
|
|
|
- base_url
|
|
|
|
|
|
- model
|
|
|
|
|
|
- model_type
|
|
|
|
|
|
- name
|
|
|
|
|
|
- provider
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.CreateSubTableRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
database_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
ddl:
|
|
|
|
|
|
description: 建表DDL
|
|
|
|
|
|
type: string
|
|
|
|
|
|
fields:
|
|
|
|
|
|
description: 字段映射列表
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/model.FieldMapping'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
mapping_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
parent_table:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
relation_field:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
relation_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
sub_table_comment:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
sub_table_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- database_id
|
|
|
|
|
|
- parent_table
|
|
|
|
|
|
- sub_table_name
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.DatabaseInfo:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
charset:
|
|
|
|
|
|
description: 连接选项
|
|
|
|
|
|
type: string
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
description: 时间
|
|
|
|
|
|
type: string
|
|
|
|
|
|
database:
|
|
|
|
|
|
description: 数据库名
|
|
|
|
|
|
type: string
|
|
|
|
|
|
db_type:
|
|
|
|
|
|
description: '数据库类型: mysql, postgres, mongodb, neo4j等'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: 描述
|
|
|
|
|
|
type: string
|
|
|
|
|
|
graph_labels:
|
|
|
|
|
|
description: Neo4j 标签列表 (JSON 格式)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
graph_relationship:
|
|
|
|
|
|
description: Neo4j 关系类型列表 (JSON 格式)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
host:
|
|
|
|
|
|
description: 主机地址
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: UUID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
description: 数据库名称
|
|
|
|
|
|
type: string
|
|
|
|
|
|
password:
|
|
|
|
|
|
description: 密码(建议加密存储)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
port:
|
|
|
|
|
|
description: 端口
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
selected_label:
|
|
|
|
|
|
description: 当前选中的标签
|
|
|
|
|
|
type: string
|
|
|
|
|
|
ssl_mode:
|
|
|
|
|
|
description: SSL模式
|
|
|
|
|
|
type: string
|
|
|
|
|
|
table_count:
|
|
|
|
|
|
description: 子表数量
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
uri:
|
|
|
|
|
|
description: Neo4j 专用字段
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
description: 用户名
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.FieldMapping:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
column_name:
|
|
|
|
|
|
description: 列名
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mapped_name:
|
|
|
|
|
|
description: 中文映射名
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-11 14:45:49 +08:00
|
|
|
|
model.MCP:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
args:
|
|
|
|
|
|
description: 参数,JSON数组格式
|
|
|
|
|
|
type: string
|
|
|
|
|
|
category:
|
|
|
|
|
|
description: 分类
|
|
|
|
|
|
type: string
|
|
|
|
|
|
command:
|
|
|
|
|
|
description: 启动命令
|
|
|
|
|
|
type: string
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: 英文描述
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description_cn:
|
|
|
|
|
|
description: 中文描述
|
|
|
|
|
|
type: string
|
|
|
|
|
|
env:
|
|
|
|
|
|
description: 环境变量,JSON对象格式
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
status:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
transport:
|
|
|
|
|
|
description: stdio, http, sse
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-11 14:25:55 +08:00
|
|
|
|
model.MemoryInfo:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
available:
|
|
|
|
|
|
description: 可用(字节)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
available_gb:
|
|
|
|
|
|
description: 可用(GB)
|
|
|
|
|
|
type: number
|
|
|
|
|
|
percent:
|
|
|
|
|
|
description: 使用率
|
|
|
|
|
|
type: number
|
|
|
|
|
|
total:
|
|
|
|
|
|
description: 总内存(字节)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
total_gb:
|
|
|
|
|
|
description: 总内存(GB)
|
|
|
|
|
|
type: number
|
|
|
|
|
|
used:
|
|
|
|
|
|
description: 已使用(字节)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
used_gb:
|
|
|
|
|
|
description: 已使用(GB)
|
|
|
|
|
|
type: number
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.ModelInfo:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
api_endpoint:
|
|
|
|
|
|
description: API 端点路径
|
|
|
|
|
|
type: string
|
|
|
|
|
|
api_key:
|
|
|
|
|
|
description: API 密钥
|
|
|
|
|
|
type: string
|
|
|
|
|
|
base_url:
|
|
|
|
|
|
description: 基础 URL
|
|
|
|
|
|
type: string
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model:
|
|
|
|
|
|
description: 模型标识
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model_type:
|
|
|
|
|
|
description: chat/embedding/rerank/vlm
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
provider:
|
|
|
|
|
|
description: OpenAI/Ollama
|
|
|
|
|
|
type: string
|
|
|
|
|
|
status:
|
|
|
|
|
|
description: active/inactive
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.Neo4jCheckRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
database:
|
|
|
|
|
|
description: 可选,默认 neo4j
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: 可选,数据库描述
|
|
|
|
|
|
type: string
|
|
|
|
|
|
host:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
description: 数据库名称
|
|
|
|
|
|
type: string
|
|
|
|
|
|
password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
port:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
uri:
|
|
|
|
|
|
description: 可选,Neo4j 连接地址 (bolt://host:7687)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- host
|
|
|
|
|
|
- password
|
|
|
|
|
|
- port
|
|
|
|
|
|
- username
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.Neo4jGraphRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
database:
|
|
|
|
|
|
description: 可选,默认 neo4j
|
|
|
|
|
|
type: string
|
|
|
|
|
|
password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
uri:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- password
|
|
|
|
|
|
- uri
|
|
|
|
|
|
- username
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.Neo4jNodeRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
database:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
label:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
limit:
|
|
|
|
|
|
description: 默认 10
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
uri:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- label
|
|
|
|
|
|
- password
|
|
|
|
|
|
- uri
|
|
|
|
|
|
- username
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.Neo4jRelRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
database:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
limit:
|
|
|
|
|
|
description: 默认 10
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
relationship_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
uri:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- password
|
|
|
|
|
|
- relationship_type
|
|
|
|
|
|
- uri
|
|
|
|
|
|
- username
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.ParsingConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
docling_url:
|
|
|
|
|
|
description: Docling 服务 URL
|
|
|
|
|
|
type: string
|
|
|
|
|
|
enable_pdf:
|
|
|
|
|
|
description: 是否启用 PDF 解析
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
engine:
|
|
|
|
|
|
description: markitdown / docling
|
|
|
|
|
|
type: string
|
|
|
|
|
|
pandoc:
|
|
|
|
|
|
description: 是否启用 Pandoc
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
vlm_api_key:
|
|
|
|
|
|
description: API Key
|
|
|
|
|
|
type: string
|
|
|
|
|
|
vlm_base_url:
|
|
|
|
|
|
description: 自定义 API 地址
|
|
|
|
|
|
type: string
|
|
|
|
|
|
vlm_enabled:
|
|
|
|
|
|
description: VLM 配置(用于图片 OCR 等)
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
vlm_model:
|
|
|
|
|
|
description: 模型名称
|
|
|
|
|
|
type: string
|
|
|
|
|
|
vlm_prompt:
|
|
|
|
|
|
description: 自定义提示词
|
|
|
|
|
|
type: string
|
|
|
|
|
|
vlm_provider:
|
|
|
|
|
|
description: 'VLM 提供商: openai, anthropic, local 等'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.SaveGraphRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
databaseId:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
databaseName:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
labels:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
relationshipTypes:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
selectedLabel:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
uri:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- databaseId
|
|
|
|
|
|
- databaseName
|
|
|
|
|
|
- labels
|
|
|
|
|
|
- relationshipTypes
|
|
|
|
|
|
- uri
|
|
|
|
|
|
- username
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
model.Skill:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
created_by:
|
|
|
|
|
|
description: 创建者用户名
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
path:
|
|
|
|
|
|
description: skill 文件路径
|
|
|
|
|
|
type: string
|
|
|
|
|
|
skill_desc:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
skill_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
skill_type:
|
|
|
|
|
|
description: system / user
|
|
|
|
|
|
type: string
|
|
|
|
|
|
status:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-11 14:25:55 +08:00
|
|
|
|
model.StorageConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
access_key_id:
|
|
|
|
|
|
description: MinIO/S3 access key
|
|
|
|
|
|
type: string
|
|
|
|
|
|
bucket:
|
|
|
|
|
|
description: MinIO/S3 bucket
|
|
|
|
|
|
type: string
|
|
|
|
|
|
endpoint:
|
|
|
|
|
|
description: MinIO/S3 endpoint
|
|
|
|
|
|
type: string
|
|
|
|
|
|
secret_access_key:
|
|
|
|
|
|
description: MinIO/S3 secret key
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type:
|
|
|
|
|
|
description: local / minio / s3
|
|
|
|
|
|
type: string
|
|
|
|
|
|
use_ssl:
|
|
|
|
|
|
description: MinIO/S3 use SSL
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.SubTableInfo:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
database_id:
|
|
|
|
|
|
description: 关联的数据库ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
ddl:
|
|
|
|
|
|
description: 建表 DDL
|
|
|
|
|
|
type: string
|
|
|
|
|
|
fields:
|
|
|
|
|
|
description: 字段映射列表(返回给前端)
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/model.FieldMapping'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: UUID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mapping_type:
|
|
|
|
|
|
description: 映射类型
|
|
|
|
|
|
type: string
|
|
|
|
|
|
parent_table:
|
|
|
|
|
|
description: 父表名
|
|
|
|
|
|
type: string
|
|
|
|
|
|
relation_field:
|
|
|
|
|
|
description: 关联字段
|
|
|
|
|
|
type: string
|
|
|
|
|
|
relation_type:
|
|
|
|
|
|
description: 关联类型
|
|
|
|
|
|
type: string
|
|
|
|
|
|
sub_table_comment:
|
|
|
|
|
|
description: 子表注释
|
|
|
|
|
|
type: string
|
|
|
|
|
|
sub_table_name:
|
|
|
|
|
|
description: 子表名
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.SystemInfo:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
cpu:
|
|
|
|
|
|
$ref: '#/definitions/model.CPUInfo'
|
|
|
|
|
|
memory:
|
|
|
|
|
|
$ref: '#/definitions/model.MemoryInfo'
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.TestModelRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
api_endpoint:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
api_key:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
base_url:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
provider:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- api_key
|
|
|
|
|
|
- base_url
|
|
|
|
|
|
- model
|
|
|
|
|
|
- model_type
|
|
|
|
|
|
- provider
|
|
|
|
|
|
type: object
|
2026-03-11 14:45:49 +08:00
|
|
|
|
model.Tool:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
args:
|
|
|
|
|
|
description: 参数,JSON数组格式
|
|
|
|
|
|
type: string
|
|
|
|
|
|
category:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
command:
|
|
|
|
|
|
description: 启动命令
|
|
|
|
|
|
type: string
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: 英文描述
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description_cn:
|
|
|
|
|
|
description: 中文描述
|
|
|
|
|
|
type: string
|
|
|
|
|
|
env:
|
|
|
|
|
|
description: 环境变量,JSON对象格式
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
description: JSON格式存储
|
|
|
|
|
|
type: string
|
|
|
|
|
|
provider:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
require_approval:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
security_level:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
status:
|
|
|
|
|
|
description: 状态
|
|
|
|
|
|
type: string
|
|
|
|
|
|
transport:
|
|
|
|
|
|
description: MCP 特有字段
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-11 14:25:55 +08:00
|
|
|
|
model.UpdateDatabaseRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
charset:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
database:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
db_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
graph_labels:
|
|
|
|
|
|
description: Neo4j 标签列表 (JSON)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
graph_relationship:
|
|
|
|
|
|
description: Neo4j 关系类型列表 (JSON)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
host:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
port:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
selected_label:
|
|
|
|
|
|
description: 当前选中的标签
|
|
|
|
|
|
type: string
|
|
|
|
|
|
ssl_mode:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
sub_tables:
|
|
|
|
|
|
description: 子表配置
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/model.CreateSubTableRequest'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
table_count:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
uri:
|
|
|
|
|
|
description: Neo4j 连接地址
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.UpdateKnowledgeRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
embedding_model_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
llm_model_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
parsing_config:
|
|
|
|
|
|
$ref: '#/definitions/model.ParsingConfig'
|
|
|
|
|
|
status:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
storage_config:
|
|
|
|
|
|
$ref: '#/definitions/model.StorageConfig'
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.UpdateModelRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
api_endpoint:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
api_key:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
base_url:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
provider:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
status:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.UpdateSubTableRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
ddl:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mapping_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
parent_table:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
relation_field:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
relation_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
sub_table_comment:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
sub_table_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
model.ChatSession:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_id:
|
|
|
|
|
|
description: Agent ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
created_at:
|
|
|
|
|
|
description: 创建时间
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
id:
|
|
|
|
|
|
description: 会话ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
model_id:
|
|
|
|
|
|
description: 模型ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
status:
|
|
|
|
|
|
description: 会话状态 (active/archived)
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
title:
|
|
|
|
|
|
description: 会话标题
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
description: 更新时间
|
|
|
|
|
|
type: string
|
|
|
|
|
|
user_id:
|
|
|
|
|
|
description: 用户ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.ChatMessage:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
content:
|
|
|
|
|
|
description: 消息内容
|
|
|
|
|
|
type: string
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
description: 创建时间
|
|
|
|
|
|
type: string
|
|
|
|
|
|
duration_ms:
|
|
|
|
|
|
description: 响应耗时(毫秒)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: 消息ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
metadata:
|
|
|
|
|
|
description: 额外信息(JSON格式)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
role:
|
|
|
|
|
|
description: 角色 (user/assistant/system)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
session_id:
|
|
|
|
|
|
description: 会话ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tokens_used:
|
|
|
|
|
|
description: 使用的token数
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.CreateSessionRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_id:
|
|
|
|
|
|
description: Agent ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model_id:
|
|
|
|
|
|
description: 模型ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
title:
|
|
|
|
|
|
description: 会话标题
|
|
|
|
|
|
type: string
|
|
|
|
|
|
user_id:
|
|
|
|
|
|
description: 用户ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- user_id
|
|
|
|
|
|
- agent_id
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.UpdateSessionRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
status:
|
|
|
|
|
|
description: 会话状态 (active/archived)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
title:
|
|
|
|
|
|
description: 会话标题
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.CreateMessageRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
content:
|
|
|
|
|
|
description: 消息内容
|
|
|
|
|
|
type: string
|
|
|
|
|
|
duration_ms:
|
|
|
|
|
|
description: 响应耗时(毫秒)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
metadata:
|
|
|
|
|
|
description: 额外信息(JSON格式)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
role:
|
|
|
|
|
|
description: 角色 (user/assistant)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
session_id:
|
|
|
|
|
|
description: 会话ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tokens_used:
|
|
|
|
|
|
description: 使用的token数
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
required:
|
|
|
|
|
|
- session_id
|
|
|
|
|
|
- role
|
|
|
|
|
|
- content
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.SessionListResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
list:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/model.ChatSession'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
total:
|
|
|
|
|
|
description: 总数
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.MessageListResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
list:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/model.ChatMessage'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
total:
|
|
|
|
|
|
description: 总数
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.AgentMemory:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_id:
|
|
|
|
|
|
description: Agent ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
category:
|
|
|
|
|
|
description: 记忆分类
|
|
|
|
|
|
type: string
|
|
|
|
|
|
content:
|
|
|
|
|
|
description: 记忆内容
|
|
|
|
|
|
type: string
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
description: 创建时间
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: 记忆ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
importance:
|
|
|
|
|
|
description: 重要性等级 (1-10)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
is_pinned:
|
|
|
|
|
|
description: 是否置顶
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
keywords:
|
|
|
|
|
|
description: 关键词,用于搜索
|
|
|
|
|
|
type: string
|
|
|
|
|
|
memory_type:
|
|
|
|
|
|
description: 记忆类型 (experience/preference/conversation/fact)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tags:
|
|
|
|
|
|
description: 标签,JSON数组格式
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
description: 更新时间
|
|
|
|
|
|
type: string
|
|
|
|
|
|
user_id:
|
|
|
|
|
|
description: 用户ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.CreateMemoryRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_id:
|
|
|
|
|
|
description: Agent ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
category:
|
|
|
|
|
|
description: 记忆分类
|
|
|
|
|
|
type: string
|
|
|
|
|
|
content:
|
|
|
|
|
|
description: 记忆内容
|
|
|
|
|
|
type: string
|
|
|
|
|
|
importance:
|
|
|
|
|
|
description: 重要性等级 (1-10)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
is_pinned:
|
|
|
|
|
|
description: 是否置顶
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
keywords:
|
|
|
|
|
|
description: 关键词
|
|
|
|
|
|
type: string
|
|
|
|
|
|
memory_type:
|
|
|
|
|
|
description: 记忆类型
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tags:
|
|
|
|
|
|
description: 标签
|
|
|
|
|
|
type: string
|
|
|
|
|
|
user_id:
|
|
|
|
|
|
description: 用户ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- agent_id
|
|
|
|
|
|
- content
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.SearchMemoryRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_id:
|
|
|
|
|
|
description: Agent ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
category:
|
|
|
|
|
|
description: 记忆分类
|
|
|
|
|
|
type: string
|
|
|
|
|
|
keyword:
|
|
|
|
|
|
description: 搜索关键词
|
|
|
|
|
|
type: string
|
|
|
|
|
|
limit:
|
|
|
|
|
|
description: 每页数量
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
memory_type:
|
|
|
|
|
|
description: 记忆类型
|
|
|
|
|
|
type: string
|
|
|
|
|
|
min_score:
|
|
|
|
|
|
description: 最小重要性分数
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
offset:
|
|
|
|
|
|
description: 偏移量
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
tags:
|
|
|
|
|
|
description: 标签筛选
|
|
|
|
|
|
type: string
|
|
|
|
|
|
user_id:
|
|
|
|
|
|
description: 用户ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- agent_id
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.UpdateMemoryRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
category:
|
|
|
|
|
|
description: 记忆分类
|
|
|
|
|
|
type: string
|
|
|
|
|
|
content:
|
|
|
|
|
|
description: 记忆内容
|
|
|
|
|
|
type: string
|
|
|
|
|
|
importance:
|
|
|
|
|
|
description: 重要性等级
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
is_pinned:
|
|
|
|
|
|
description: 是否置顶
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
keywords:
|
|
|
|
|
|
description: 关键词
|
|
|
|
|
|
type: string
|
|
|
|
|
|
memory_type:
|
|
|
|
|
|
description: 记忆类型
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tags:
|
|
|
|
|
|
description: 标签
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.ImportMemoryRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_id:
|
|
|
|
|
|
description: Agent ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
memories:
|
|
|
|
|
|
description: 要导入的记忆列表
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/model.ImportMemoryItem'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
user_id:
|
|
|
|
|
|
description: 用户ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- agent_id
|
|
|
|
|
|
- memories
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.ImportMemoryItem:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
category:
|
|
|
|
|
|
description: 记忆分类
|
|
|
|
|
|
type: string
|
|
|
|
|
|
content:
|
|
|
|
|
|
description: 记忆内容
|
|
|
|
|
|
type: string
|
|
|
|
|
|
importance:
|
|
|
|
|
|
description: 重要性等级
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
keywords:
|
|
|
|
|
|
description: 关键词
|
|
|
|
|
|
type: string
|
|
|
|
|
|
memory_type:
|
|
|
|
|
|
description: 记忆类型
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tags:
|
|
|
|
|
|
description: 标签
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- content
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.MemoryListResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
list:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/model.AgentMemory'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
total:
|
|
|
|
|
|
description: 总数
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.ChatGroup:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_ids:
|
|
|
|
|
|
description: 群聊中的Agent ID列表(JSON数组格式)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
description: 创建时间
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: 群聊描述
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: 群聊ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
description: 群聊名称
|
|
|
|
|
|
type: string
|
|
|
|
|
|
status:
|
|
|
|
|
|
description: 群聊状态 (active/archived)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
description: 更新时间
|
|
|
|
|
|
type: string
|
|
|
|
|
|
user_id:
|
|
|
|
|
|
description: 用户ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.CreateGroupRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_ids:
|
|
|
|
|
|
description: Agent ID列表(JSON数组格式)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: 群聊描述
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
description: 群聊名称
|
|
|
|
|
|
type: string
|
|
|
|
|
|
user_id:
|
|
|
|
|
|
description: 用户ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- name
|
|
|
|
|
|
- agent_ids
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.UpdateGroupRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_ids:
|
|
|
|
|
|
description: Agent ID列表
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: 群聊描述
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
description: 群聊名称
|
|
|
|
|
|
type: string
|
|
|
|
|
|
status:
|
|
|
|
|
|
description: 群聊状态
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.GroupChatRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_ids:
|
|
|
|
|
|
description: Agent ID列表(可选,覆盖群聊中配置的Agent)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
message:
|
|
|
|
|
|
description: 消息内容
|
|
|
|
|
|
type: string
|
|
|
|
|
|
session_id:
|
|
|
|
|
|
description: 关联的会话ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- message
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.GroupChatResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
duration_ms:
|
|
|
|
|
|
description: 响应耗时(毫秒)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
reply:
|
|
|
|
|
|
description: 汇总回复
|
|
|
|
|
|
type: string
|
|
|
|
|
|
session_id:
|
|
|
|
|
|
description: 会话ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
strategy:
|
|
|
|
|
|
description: 策略 (parallel/sequential)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
subtask_results:
|
|
|
|
|
|
description: 子任务结果列表
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/model.SubtaskResult'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
tokens_used:
|
|
|
|
|
|
description: 使用的token数
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.SubtaskResult:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_id:
|
|
|
|
|
|
description: Agent ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
agent_name:
|
|
|
|
|
|
description: Agent 名称
|
|
|
|
|
|
type: string
|
|
|
|
|
|
duration_ms:
|
|
|
|
|
|
description: 响应耗时(毫秒)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
reply:
|
|
|
|
|
|
description: Agent 回复
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tokens_used:
|
|
|
|
|
|
description: 使用的token数
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
model.GroupListResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
list:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/model.ChatGroup'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
total:
|
|
|
|
|
|
description: 总数
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
info:
|
|
|
|
|
|
contact: {}
|
|
|
|
|
|
paths:
|
|
|
|
|
|
/api/agent/chat:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 对话请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/handler.ChatRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/handler.ChatResponse'
|
|
|
|
|
|
summary: 单智能体对话
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 智能体管理
|
|
|
|
|
|
/api/agent/chat/stream:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 对话请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/handler.ChatRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- text/event-stream
|
|
|
|
|
|
responses: {}
|
|
|
|
|
|
summary: 单智能体对话(流式输出)
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 智能体管理
|
|
|
|
|
|
/api/agent/create:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 创建智能体请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/handler.CreateAgentRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/handler.CreateAgentResponse'
|
|
|
|
|
|
summary: 创建智能体
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 智能体管理
|
|
|
|
|
|
/api/agent/list:
|
|
|
|
|
|
get:
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/handler.ListAgentsResponse'
|
|
|
|
|
|
summary: 获取智能体列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 智能体管理
|
|
|
|
|
|
/api/agent/team/chat:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 群聊请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/handler.TeamChatRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/handler.TeamChatResponse'
|
|
|
|
|
|
summary: 多智能体群聊
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 智能体管理
|
|
|
|
|
|
/api/file_proxy:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 代理访问文件,解决 MinIO 内网和 HTTPS 问题
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 文件Key
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: key
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: kb_id
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/octet-stream
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: file
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 代理文件访问
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 文件上传
|
|
|
|
|
|
/api/file_upload:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- multipart/form-data
|
|
|
|
|
|
description: 上传文件到服务器(本地存储或MinIO)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 要上传的文件
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: file
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: file
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 上传文件
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 文件上传
|
|
|
|
|
|
/api/file_upload/{filename}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除指定文件
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 文件名
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: filename
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 删除文件
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 文件上传
|
|
|
|
|
|
/api/knowledge/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除指定的知识库
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 删除知识库
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据ID获取知识库详细信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取知识库详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新指定知识库的信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 更新信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.UpdateKnowledgeRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 更新知识库
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
/api/knowledge/{id}/documents:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取指定知识库下的所有文档
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 文档状态筛选
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: status
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取知识库文档列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- multipart/form-data
|
|
|
|
|
|
description: 上传文档到指定知识库
|
|
|
|
|
|
parameters:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 文档文件
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: file
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: file
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 上传文档
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
/api/knowledge/{id}/documents/{doc_id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除知识库中的指定文档
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 文档ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: doc_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 删除文档
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
/api/knowledge/{id}/documents/{doc_id}/preview:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取文档的解析预览内容
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 文档ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: doc_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 页码
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取文档预览
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
/api/knowledge/{id}/documents/{doc_id}/reparse:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 重新解析指定文档(用于更新解析结果)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 文档ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: doc_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 重新解析文档
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
/api/knowledge/create:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 创建一个新的知识库
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.CreateKnowledgeRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 创建知识库
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
/api/knowledge/list:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取所有知识库列表
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取知识库列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
/auth/login:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 用户登录并获取 JWT Token
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 登录请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/handler.LoginRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/handler.LoginResponse'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"401":
|
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 用户登录
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
|
|
|
|
|
/auth/me:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取已登录用户的详细信息
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"401":
|
|
|
|
|
|
description: Unauthorized
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取当前用户信息
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
|
|
|
|
|
/auth/register:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 新用户注册账号
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 注册请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: RegisterRequest
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/handler.RegisterRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: Created
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 用户注册
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
|
|
|
|
|
/database/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除指定的数据库连接
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 数据库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 删除数据库
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 数据库管理
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据ID获取数据库详细信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 数据库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.DatabaseInfo'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取数据库详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 数据库管理
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新指定数据库的信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 数据库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 更新信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.UpdateDatabaseRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.DatabaseInfo'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 更新数据库信息
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 数据库管理
|
|
|
|
|
|
/database/add:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 添加新的数据库连接信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 数据库信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.CreateDatabaseRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: Created
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.DatabaseInfo'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 创建数据库
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 数据库管理
|
|
|
|
|
|
/database/check:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 测试数据库连接是否正常
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 数据库连接信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.CheckRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 检查数据库连接
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 数据库管理
|
|
|
|
|
|
/database/graph/save:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 保存数据库的图谱结构信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 图谱信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.SaveGraphRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 保存图谱信息
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 数据库管理
|
|
|
|
|
|
/database/list:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取所有已添加的数据库列表
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取数据库列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 数据库管理
|
|
|
|
|
|
/mcp/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除MCP配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: MCP ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 删除MCP
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP管理
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据ID获取MCP配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: MCP ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取MCP详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP管理
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新MCP配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: MCP ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: MCP信息
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: body
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: mcp
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.MCP'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 更新MCP
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP管理
|
|
|
|
|
|
/mcp/add:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 创建新的MCP工具配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: MCP信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: mcp
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.MCP'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 创建MCP
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP管理
|
|
|
|
|
|
/mcp/list:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取所有MCP工具配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 分类
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: category
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取MCP列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP管理
|
|
|
|
|
|
/model/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除指定的AI模型
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 模型ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
type: boolean
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 删除模型
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 模型管理
|
2026-03-11 14:25:55 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 根据ID获取模型详细信息
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 模型ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.ModelInfo'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 获取模型详情
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 模型管理
|
|
|
|
|
|
put:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新指定模型的信息
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 模型ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 更新信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
2026-03-13 21:26:27 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.UpdateModelRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 更新模型
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 模型管理
|
|
|
|
|
|
/model/add:
|
|
|
|
|
|
post:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 添加新的AI模型配置
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 模型信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
2026-03-13 21:26:27 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.CreateModelRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 添加模型
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 模型管理
|
|
|
|
|
|
/model/list:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取所有已添加的AI模型列表
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取模型列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 模型管理
|
|
|
|
|
|
/model/test:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 测试AI模型连接是否正常
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 模型测试请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
2026-03-13 21:26:27 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.TestModelRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 测试模型连接
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 模型管理
|
|
|
|
|
|
/neo4j/check:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 测试 Neo4j 数据库连接是否正常
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Neo4j连接信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
2026-03-13 21:26:27 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.Neo4jCheckRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 检查 Neo4j 连接
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- Neo4j
|
|
|
|
|
|
/neo4j/graphs:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取 Neo4j 中的图谱概览数据
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 图谱查询请求
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.Neo4jGraphRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取图谱概览
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- Neo4j
|
|
|
|
|
|
/neo4j/nodes:
|
|
|
|
|
|
post:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取 Neo4j 中的节点详情
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 节点查询请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.Neo4jNodeRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-11 14:25:55 +08:00
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 获取节点列表
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- Neo4j
|
|
|
|
|
|
/neo4j/relationships:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取 Neo4j 中的关系详情
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 关系查询请求
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.Neo4jRelRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-11 14:25:55 +08:00
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 获取关系列表
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- Neo4j
|
|
|
|
|
|
/skill/{id}:
|
|
|
|
|
|
delete:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 删除技能
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 技能ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: '{"message": "skill deleted"}'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 删除技能
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 技能管理
|
|
|
|
|
|
get:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 根据ID获取技能详情
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 技能ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
2026-03-13 21:26:27 +08:00
|
|
|
|
type: string
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"200":
|
|
|
|
|
|
description: '{"skill": {}}'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 获取技能详情
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 技能管理
|
|
|
|
|
|
put:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- multipart/form-data
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
更新技能信息
|
|
|
|
|
|
更新技能信息,支持文件上传
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 技能ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 技能信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: skill
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.Skill'
|
|
|
|
|
|
- description: 技能ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 技能名称
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: skill_name
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 技能描述
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: skill_desc
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 技能类型
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: skill_type
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 技能文件(SKILL.md)
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: file
|
|
|
|
|
|
type: file
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- application/json
|
2026-03-11 14:25:55 +08:00
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: '{"message": "skill updated"}'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
additionalProperties: true
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 更新技能
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 技能管理
|
|
|
|
|
|
- 技能管理
|
|
|
|
|
|
/skill/add:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- multipart/form-data
|
|
|
|
|
|
description: 创建新的技能,支持文件上传。管理员用户(admin)上传为system技能,存到core/agents/skills/system/;其他用户上传为user技能,存到core/agents/skills/user/
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 技能名称
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: skill_name
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 技能描述
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: skill_desc
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 技能类型(system/user),不传则根据用户角色自动判断
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: skill_type
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 技能文件(SKILL.md)
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: file
|
|
|
|
|
|
type: file
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: '{"message": "skill created", "skill": {}}'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
additionalProperties: true
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 创建技能
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 技能管理
|
|
|
|
|
|
/skill/content:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取指定技能对应的 SKILL.md 文件内容
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 技能ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- text/plain
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 文件内容
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
summary: 获取技能文件内容
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 技能管理
|
|
|
|
|
|
/skill/list:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取所有技能列表,支持按类型筛选(system/user)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: '技能类型: system(系统技能)/user(用户技能)'
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: type
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: '{"list": [], "total": 0}'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取技能列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 技能管理
|
|
|
|
|
|
/skill/sync:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 从文件系统扫描 skills 目录并同步到数据库。扫描 account/admin/skills(系统技能) 和 account/{username}/skills(用户技能)
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: '{"message": "skills synced", "count": 0}'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
additionalProperties: true
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 手动同步技能
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 技能管理
|
|
|
|
|
|
/sub-table/{id}:
|
|
|
|
|
|
delete:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 删除指定的子表映射
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 子表ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 删除子表映射
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 子表管理
|
|
|
|
|
|
get:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 根据ID获取子表映射详情
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 子表ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
2026-03-13 21:26:27 +08:00
|
|
|
|
type: string
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.SubTableInfo'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 获取子表详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 子表管理
|
|
|
|
|
|
put:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 更新子表映射信息
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 子表ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 更新信息
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.UpdateSubTableRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.SubTableInfo'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 更新子表映射
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 子表管理
|
|
|
|
|
|
/sub-table/add:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 添加数据库的子表映射关系
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 子表信息
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.CreateSubTableRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"201":
|
|
|
|
|
|
description: Created
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.SubTableInfo'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 创建子表映射
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 子表管理
|
|
|
|
|
|
/sub-table/database/{database_id}:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取指定数据库的所有子表映射列表
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 数据库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: database_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 获取数据库下所有子表
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 子表管理
|
|
|
|
|
|
/sub-table/ddl/{database_id}:
|
|
|
|
|
|
get:
|
2026-03-11 14:45:49 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取数据库下所有表的DDL语句
|
2026-03-11 14:45:49 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 数据库ID
|
2026-03-11 14:45:49 +08:00
|
|
|
|
in: path
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: database_id
|
2026-03-11 14:45:49 +08:00
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 获取表结构DDL
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 子表管理
|
|
|
|
|
|
/sub-table/mapping/{database_id}:
|
2026-03-11 14:45:49 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 从文件中读取子表映射关系
|
2026-03-11 14:45:49 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 数据库ID
|
2026-03-11 14:45:49 +08:00
|
|
|
|
in: path
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: database_id
|
2026-03-11 14:45:49 +08:00
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 从文件获取映射
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 子表管理
|
|
|
|
|
|
/system/info:
|
|
|
|
|
|
get:
|
2026-03-11 14:45:49 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取服务器系统信息(CPU、内存等)
|
2026-03-11 14:45:49 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.SystemInfo'
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: Internal Server Error
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
2026-03-11 14:45:49 +08:00
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 获取系统信息
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 系统
|
|
|
|
|
|
/tool/{id}:
|
|
|
|
|
|
delete:
|
2026-03-11 14:45:49 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 删除工具
|
2026-03-11 14:45:49 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 工具ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
2026-03-11 14:45:49 +08:00
|
|
|
|
required: true
|
2026-03-13 21:26:27 +08:00
|
|
|
|
type: string
|
2026-03-11 14:45:49 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 删除工具
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 工具管理
|
2026-03-11 14:45:49 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 根据ID获取工具详情
|
2026-03-11 14:45:49 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 工具ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
2026-03-11 14:45:49 +08:00
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 获取工具详情
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 工具管理
|
|
|
|
|
|
put:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 更新工具信息
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 工具ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 工具信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: tool
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.Tool'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
additionalProperties: true
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 更新工具
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 工具管理
|
|
|
|
|
|
/tool/add:
|
|
|
|
|
|
post:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 创建新的工具
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 工具信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: tool
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
2026-03-13 21:26:27 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.Tool'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
additionalProperties: true
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 创建工具
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 工具管理
|
|
|
|
|
|
/tool/list:
|
|
|
|
|
|
get:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取所有工具列表,支持按分类和状态筛选
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 工具分类
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: category
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 工具状态
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: status
|
2026-03-11 14:25:55 +08:00
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 获取工具列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 工具管理
|
|
|
|
|
|
/tool/sync:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 从代码中的默认配置同步工具到数据库
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 手动同步工具
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 工具管理
|
|
|
|
|
|
/user/{id}:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 根据ID获取用户详情
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 用户ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取用户详情
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 用户管理
|
|
|
|
|
|
/user/list:
|
|
|
|
|
|
get:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取所有用户列表(需要管理员权限)
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"401":
|
|
|
|
|
|
description: Unauthorized
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取所有用户
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 用户管理
|
|
|
|
|
|
/api/chat/sessions:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 创建新的聊天会话
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 创建会话请求
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.CreateSessionRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.ChatSession'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 创建会话
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 会话管理
|
|
|
|
|
|
get:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取用户的会话列表
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 用户ID
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: user_id
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
2026-03-13 21:26:27 +08:00
|
|
|
|
type: string
|
|
|
|
|
|
- description: 每页数量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: limit
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 偏移量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: offset
|
|
|
|
|
|
type: integer
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.SessionListResponse'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取会话列表
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 会话管理
|
|
|
|
|
|
/api/chat/sessions/{id}:
|
|
|
|
|
|
get:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 根据ID获取会话详情
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
2026-03-13 21:26:27 +08:00
|
|
|
|
type: string
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.ChatSession'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取会话详情
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 会话管理
|
|
|
|
|
|
put:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 更新会话信息
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 更新会话请求
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.UpdateSessionRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.ChatSession'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 更新会话
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 会话管理
|
2026-03-11 14:25:55 +08:00
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 删除会话
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 会话ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 删除会话
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 会话管理
|
|
|
|
|
|
/api/chat/sessions/{id}/messages:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取会话的消息历史
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 会话ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 每页数量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: limit
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 偏移量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: offset
|
|
|
|
|
|
type: integer
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.MessageListResponse'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取会话消息历史
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 会话管理
|
|
|
|
|
|
/api/chat/messages:
|
|
|
|
|
|
post:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 保存聊天消息
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 创建消息请求
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.CreateMessageRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.ChatMessage'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 保存消息
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 会话管理
|
|
|
|
|
|
/api/agent/{id}/memories:
|
|
|
|
|
|
get:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取记忆列表,支持分类和类型筛选
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: Agent ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
2026-03-13 21:26:27 +08:00
|
|
|
|
type: string
|
|
|
|
|
|
- description: 用户ID
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: user_id
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 记忆分类
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: category
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 记忆类型
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: memory_type
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 每页数量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: limit
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 偏移量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: offset
|
|
|
|
|
|
type: integer
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.MemoryListResponse'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取记忆列表
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 记忆管理
|
|
|
|
|
|
post:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 创建新记忆
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: Agent ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: path
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: id
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 创建记忆请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.CreateMemoryRequest'
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.AgentMemory'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 创建记忆
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 记忆管理
|
|
|
|
|
|
/api/agent/{id}/memories/search:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 搜索记忆,支持关键词、标签、分类筛选
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
2026-03-11 14:25:55 +08:00
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.MemoryListResponse'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 搜索记忆
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 记忆管理
|
|
|
|
|
|
/api/agent/{id}/memories/categories:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取记忆分类列表
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: Agent ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: path
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: id
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 用户ID
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: user_id
|
|
|
|
|
|
type: string
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取记忆分类列表
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 记忆管理
|
|
|
|
|
|
/api/agent/{id}/memories/tags:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取记忆标签列表
|
2026-03-11 14:25:55 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: Agent ID
|
2026-03-11 14:25:55 +08:00
|
|
|
|
in: path
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: id
|
2026-03-11 14:25:55 +08:00
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 用户ID
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: user_id
|
|
|
|
|
|
type: string
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取记忆标签列表
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 记忆管理
|
|
|
|
|
|
/api/agent/{id}/memories/export:
|
2026-03-11 14:25:55 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 导出记忆,支持JSON和CSV格式
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Agent ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 用户ID
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: user_id
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 导出格式 (json/csv)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: format
|
|
|
|
|
|
type: string
|
2026-03-11 14:25:55 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 导出记忆
|
2026-03-11 14:25:55 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 记忆管理
|
|
|
|
|
|
/api/agent/{id}/memories/import:
|
|
|
|
|
|
post:
|
2026-03-11 14:45:49 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 导入记忆
|
2026-03-11 14:45:49 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: Agent ID
|
2026-03-11 14:45:49 +08:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 导入记忆请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.ImportMemoryRequest'
|
2026-03-11 14:45:49 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
2026-03-13 21:26:27 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 导入记忆
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 记忆管理
|
|
|
|
|
|
/api/agent/memories/{memory_id}:
|
2026-03-11 14:45:49 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取单个记忆详情
|
2026-03-11 14:45:49 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 记忆ID
|
2026-03-11 14:45:49 +08:00
|
|
|
|
in: path
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: memory_id
|
2026-03-11 14:45:49 +08:00
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.AgentMemory'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取记忆详情
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 记忆管理
|
2026-03-11 14:45:49 +08:00
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 更新记忆
|
2026-03-11 14:45:49 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 记忆ID
|
2026-03-11 14:45:49 +08:00
|
|
|
|
in: path
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: memory_id
|
2026-03-11 14:45:49 +08:00
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 更新记忆请求
|
2026-03-11 14:45:49 +08:00
|
|
|
|
in: body
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: request
|
2026-03-11 14:45:49 +08:00
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.UpdateMemoryRequest'
|
2026-03-11 14:45:49 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.AgentMemory'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 更新记忆
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 记忆管理
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除记忆
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 记忆ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: memory_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 删除记忆
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 记忆管理
|
|
|
|
|
|
/api/chat/groups:
|
2026-03-11 14:45:49 +08:00
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 创建新的群聊
|
2026-03-11 14:45:49 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 创建群聊请求
|
2026-03-11 14:45:49 +08:00
|
|
|
|
in: body
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: request
|
2026-03-11 14:45:49 +08:00
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.CreateGroupRequest'
|
2026-03-11 14:45:49 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.ChatGroup'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 创建群聊
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 群聊管理
|
2026-03-11 14:45:49 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 获取用户的群聊列表
|
2026-03-11 14:45:49 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 用户ID
|
2026-03-11 14:45:49 +08:00
|
|
|
|
in: query
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: user_id
|
|
|
|
|
|
required: true
|
2026-03-11 14:45:49 +08:00
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 每页数量
|
2026-03-11 14:45:49 +08:00
|
|
|
|
in: query
|
2026-03-13 21:26:27 +08:00
|
|
|
|
name: limit
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 偏移量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: offset
|
|
|
|
|
|
type: integer
|
2026-03-11 14:45:49 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.GroupListResponse'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取群聊列表
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 群聊管理
|
|
|
|
|
|
/api/chat/groups/{id}:
|
2026-03-11 14:45:49 +08:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 根据ID获取群聊详情
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 群聊ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-11 14:45:49 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.ChatGroup'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 获取群聊详情
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 群聊管理
|
|
|
|
|
|
put:
|
2026-03-11 14:45:49 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 更新群聊信息
|
2026-03-11 14:45:49 +08:00
|
|
|
|
parameters:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 群聊ID
|
2026-03-11 14:45:49 +08:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- description: 更新群聊请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.UpdateGroupRequest'
|
2026-03-11 14:45:49 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.ChatGroup'
|
2026-03-11 14:45:49 +08:00
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 更新群聊
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 群聊管理
|
|
|
|
|
|
delete:
|
2026-03-11 14:45:49 +08:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-13 21:26:27 +08:00
|
|
|
|
description: 删除群聊
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 群聊ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
|
|
|
|
|
summary: 删除群聊
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 群聊管理
|
|
|
|
|
|
/api/chat/groups/{id}/chat:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 群聊对话(多智能体)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 群聊ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 群聊对话请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/model.GroupChatRequest'
|
2026-03-11 14:45:49 +08:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
$ref: '#/definitions/model.GroupChatResponse'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
2026-03-11 14:45:49 +08:00
|
|
|
|
security:
|
|
|
|
|
|
- BearerAuth: []
|
2026-03-13 21:26:27 +08:00
|
|
|
|
summary: 群聊对话
|
2026-03-11 14:45:49 +08:00
|
|
|
|
tags:
|
2026-03-13 21:26:27 +08:00
|
|
|
|
- 群聊管理
|
2026-03-11 14:25:55 +08:00
|
|
|
|
swagger: "2.0"
|