feat: Add agent configuration and cleanup scripts for database migrations

This commit is contained in:
wizardchen
2025-11-05 23:18:44 +08:00
parent ae9d0778e9
commit 4fa3adbf3b
126 changed files with 22506 additions and 629 deletions
+27 -1
View File
@@ -1,4 +1,4 @@
import { get } from '@/utils/request'
import { get, put } from '@/utils/request'
export interface SystemInfo {
version: string
@@ -7,6 +7,32 @@ export interface SystemInfo {
go_version?: string
}
export interface ToolDefinition {
name: string
label: string
description: string
}
export interface AgentConfig {
enabled: boolean
max_iterations: number
reflection_enabled: boolean
allowed_tools: string[]
temperature: number
thinking_model_id: string
rerank_model_id: string
knowledge_bases?: string[]
available_tools?: ToolDefinition[] // GET 响应中包含,POST/PUT 不需要
}
export function getSystemInfo(): Promise<{ data: SystemInfo }> {
return get('/api/v1/system/info')
}
export function getAgentConfig(): Promise<{ data: AgentConfig }> {
return get('/api/v1/tenants/agent-config')
}
export function updateAgentConfig(config: AgentConfig): Promise<{ data: AgentConfig }> {
return put('/api/v1/tenants/agent-config', config)
}