feat: Add agent configuration and cleanup scripts for database migrations
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user