feat: Introduce conversation configuration management and localization updates

- Added new ConversationConfig interface and API endpoints for retrieving and updating conversation settings.
- Enhanced AgentSettings.vue to include UI for configuring conversation parameters such as prompt, context template, temperature, and max tokens.
- Updated localization files in English and Chinese to include new strings for conversation settings.
- Implemented logic to load and save conversation configuration for tenants, ensuring defaults are applied when no specific configuration exists.
This commit is contained in:
wizardchen
2025-11-17 15:33:43 +08:00
parent a886106917
commit 1f5e445eaa
14 changed files with 913 additions and 175 deletions
+15
View File
@@ -38,6 +38,13 @@ export interface AgentConfig {
available_placeholders?: PlaceholderDefinition[] // GET 响应中包含,POST/PUT 不需要
}
export interface ConversationConfig {
prompt: string
context_template: string
temperature: number
max_tokens: number
}
export function getSystemInfo(): Promise<{ data: SystemInfo }> {
return get('/api/v1/system/info')
}
@@ -49,3 +56,11 @@ export function getAgentConfig(): Promise<{ data: AgentConfig }> {
export function updateAgentConfig(config: AgentConfig): Promise<{ data: AgentConfig }> {
return put('/api/v1/tenants/kv/agent-config', config)
}
export function getConversationConfig(): Promise<{ data: ConversationConfig }> {
return get('/api/v1/tenants/kv/conversation-config')
}
export function updateConversationConfig(config: ConversationConfig): Promise<{ data: ConversationConfig }> {
return put('/api/v1/tenants/kv/conversation-config', config)
}