feat: enhance localization and configuration support

- Added timezone and language settings to the environment configuration.
- Introduced built-in agent configurations with multilingual support for various agents.
- Updated Docker Compose to utilize new environment variables for timezone and language.
- Created new prompt templates for question generation, summary generation, and keywords extraction.
This commit is contained in:
wizardchen
2026-03-17 15:33:19 +08:00
committed by lyingbug
parent 09d9fe5ddb
commit 139a9c40ff
54 changed files with 2524 additions and 1482 deletions
+1
View File
@@ -124,6 +124,7 @@ export function useStream() {
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${token}`,
"Accept-Language": i18n.global.locale?.value || localStorage.getItem('locale') || 'zh-CN',
"X-Request-ID": `${generateRandomString(12)}`,
...(tenantIdHeader ? { "X-Tenant-ID": tenantIdHeader } : {}),
},
+12 -2
View File
@@ -63,16 +63,26 @@ export interface PromptTemplate {
name: string
description: string
content: string
user?: string
has_knowledge_base?: boolean
has_web_search?: boolean
default?: boolean
mode?: string
}
export interface PromptTemplatesConfig {
system_prompt: PromptTemplate[]
context_template: PromptTemplate[]
rewrite_system: PromptTemplate[]
rewrite_user: PromptTemplate[]
// Rewrite templates — each template contains both content (system) + user fields
rewrite: PromptTemplate[]
// Fallback templates — fixed responses + model fallback prompts (mode: "model")
fallback: PromptTemplate[]
generate_session_title?: PromptTemplate[]
generate_summary?: PromptTemplate[]
keywords_extraction?: PromptTemplate[]
chat_summary?: PromptTemplate[]
agent_system_prompt?: PromptTemplate[]
}
export function getSystemInfo(): Promise<{ data: SystemInfo }> {