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:
@@ -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 } : {}),
|
||||
},
|
||||
|
||||
@@ -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 }> {
|
||||
|
||||
Reference in New Issue
Block a user