Merge branch 'custom_agent'

This commit is contained in:
wizardchen
2025-12-29 17:01:23 +08:00
64 changed files with 10364 additions and 1965 deletions
+307 -11
View File
@@ -1,6 +1,7 @@
export default {
menu: {
knowledgeBase: 'Knowledge Base',
agents: 'Agents',
chat: 'Chat',
createChat: 'Create Chat',
tenant: 'Account Info',
@@ -204,7 +205,197 @@ export default {
updatePlan: 'Update Plan',
webSearchFound: 'Found <strong>{count}</strong> web search result(s)',
argumentsLabel: 'Arguments',
toolFallback: 'Tool'
toolFallback: 'Tool',
title: 'Agents',
subtitle: 'Configure and manage your agents to customize conversation behavior and capabilities',
createAgent: 'Create Agent',
builtin: 'Built-in',
noDescription: 'No description',
selectAgent: 'Select Agent',
noAgents: 'No agents',
manageAgents: 'Manage',
builtinAgents: 'Built-in Agents',
customAgents: 'Custom Agents',
capabilities: {
normal: 'Quick response, direct answers',
agent: 'Multi-step thinking, deep analysis for complex questions',
modelSpecified: 'Model specified',
kbCount: '{count} knowledge base(s) specified',
kbAll: 'Access to all knowledge bases',
kbDisabled: 'Knowledge base disabled',
rerankSpecified: 'ReRank model specified',
webSearchOn: 'Web search enabled',
webSearchOff: 'Web search disabled',
hasPrompt: 'Custom prompt',
default: 'Default configuration',
mcpEnabled: 'MCP services enabled',
multiTurn: 'Multi-turn conversation',
},
type: {
normal: 'Quick Answer',
agent: 'Smart Reasoning',
custom: 'Custom',
},
mode: {
normal: 'Quick Answer',
agent: 'Smart Reasoning',
},
features: {
webSearch: 'Web Search Enabled',
knowledgeBase: 'Knowledge Base Linked',
mcp: 'MCP Services Enabled',
multiTurn: 'Multi-turn Conversation',
},
empty: {
title: 'No Custom Agents',
description: 'Click the button in the top right to create your first agent',
},
delete: {
confirmTitle: 'Delete Agent',
confirmMessage: 'Are you sure you want to delete agent "{name}"? This action cannot be undone.',
confirmButton: 'Confirm Delete',
},
messages: {
created: 'Agent created successfully',
updated: 'Agent updated successfully',
deleted: 'Agent deleted',
deleteFailed: 'Delete failed',
saveFailed: 'Save failed',
builtinReadonly: 'Built-in agents cannot be edited',
copied: 'Agent copied successfully',
copyFailed: 'Copy failed',
},
editor: {
createTitle: 'Create Agent',
editTitle: 'Edit Agent',
basicInfo: 'Basic Info',
basicInfoDesc: 'Configure agent basic information',
modelConfig: 'Model Config',
modelConfigDesc: 'Configure agent model parameters',
capabilities: 'Capabilities',
capabilitiesDesc: 'Configure agent capabilities and tools',
toolsConfig: 'Tools',
toolsConfigDesc: 'Configure tools available to the Agent',
knowledgeConfig: 'Knowledge Base',
knowledgeConfigDesc: 'Configure knowledge bases for the agent',
webSearchConfig: 'Web Search',
webSearchConfigDesc: 'Configure web search capabilities for the agent',
configuration: 'Configuration',
name: 'Name',
namePlaceholder: 'Enter agent name',
nameRequired: 'Agent name is required',
systemPromptRequired: 'System prompt is required',
modelRequired: 'Please select a model',
rerankModelRequired: 'ReRank model is required when using knowledge bases',
contextsMissing: 'Context template must contain {{contexts}} placeholder when knowledge base is enabled',
queryMissingInContext: 'Context template must contain {{query}} placeholder',
knowledgeBasesMissing: 'It is recommended to include {{knowledge_bases}} placeholder in system prompt so the model knows available knowledge bases',
queryMissingInRewrite: 'Rewrite user prompt must contain {{query}} placeholder',
conversationMissing: 'Rewrite user prompt must contain {{conversation}} placeholder',
queryMissingInFallback: 'Fallback prompt must contain {{query}} placeholder',
avatar: 'Avatar',
avatarPlaceholder: 'Enter Emoji or select',
description: 'Description',
descriptionPlaceholder: 'Enter agent description',
baseType: 'Base Type',
normalDesc: 'Quick response, direct answers',
agentDesc: 'Multi-step thinking, deep analysis for complex questions',
model: 'Model',
modelPlaceholder: 'Select Model',
systemPrompt: 'System Prompt',
systemPromptPlaceholder: 'Custom system prompt to define agent behavior and role (use {{web_search_status}} placeholder for dynamic web search behavior)',
defaultPromptHint: 'Leave empty to use the following default system prompt:',
defaultContextTemplateHint: 'Leave empty to use the following default context template:',
contextTemplateRequired: 'Context template is required',
availablePlaceholders: 'Available Placeholders',
placeholderHint: 'Type {{ to trigger autocomplete',
temperature: 'Temperature',
welcomeMessage: 'Welcome Message',
welcomeMessagePlaceholder: 'Message displayed when this agent is selected',
suggestedPrompts: 'Suggested Prompts',
mode: 'Running Mode',
webSearch: 'Web Search',
webSearchMaxResults: 'Max Search Results',
knowledgeBases: 'Knowledge Bases',
allKnowledgeBases: 'All Knowledge Bases',
allKnowledgeBasesDesc: 'Agent can access all knowledge bases',
selectedKnowledgeBases: 'Selected Knowledge Bases',
selectedKnowledgeBasesDesc: 'Only access selected knowledge bases',
noKnowledgeBase: 'No Knowledge Base',
noKnowledgeBaseDesc: 'Pure model conversation, no knowledge retrieval',
selectKnowledgeBases: 'Select Knowledge Bases',
rerankModel: 'ReRank Model',
rerankModelDesc: 'Used to rerank knowledge base retrieval results for better accuracy',
rerankModelPlaceholder: 'Select ReRank Model',
maxIterations: 'Max Iterations',
allowedTools: 'Allowed Tools',
multiTurn: 'Multi-turn Conversation',
historyTurns: 'History Turns',
// Retrieval Strategy
retrievalStrategy: 'Retrieval Strategy',
embeddingTopK: 'Embedding Top K',
keywordThreshold: 'Keyword Threshold',
vectorThreshold: 'Vector Threshold',
rerankTopK: 'Rerank Top K',
rerankThreshold: 'Rerank Threshold',
// Conversation Settings
conversationSettings: 'Conversation',
// Advanced Settings
advancedSettings: 'Advanced Settings',
contextTemplate: 'Context Template',
contextTemplatePlaceholder: 'Custom context template...',
availableContextPlaceholders: 'Available Placeholders',
placeholderQuery: 'User query',
placeholderContexts: 'Retrieved content list',
placeholderCurrentTime: 'Current time (format: 2006-01-02 15:04:05)',
placeholderCurrentWeek: 'Current weekday (e.g., Monday)',
enableQueryExpansion: 'Query Expansion',
enableRewrite: 'Query Rewrite',
rewritePromptSystem: 'Rewrite System Prompt',
rewritePromptSystemPlaceholder: 'Leave empty to use default prompt',
rewritePromptUser: 'Rewrite User Prompt',
rewritePromptUserPlaceholder: 'Leave empty to use default prompt',
maxCompletionTokens: 'Max Completion Tokens',
fallbackStrategy: 'Fallback Strategy',
fallbackResponse: 'Fixed Response',
fallbackResponsePlaceholder: 'Sorry, I cannot answer this question.',
fallbackPrompt: 'Fallback Prompt',
fallbackPromptPlaceholder: 'Leave empty to use default prompt',
},
selector: {
title: 'Select Agent',
builtinSection: 'Built-in Agents',
customSection: 'My Agents',
addNew: 'Add New Agent',
current: 'Current',
},
// Built-in agent information
builtinInfo: {
quickAnswer: {
name: 'Quick Answer',
description: 'Knowledge base RAG Q&A for fast and accurate answers',
},
smartReasoning: {
name: 'Smart Reasoning',
description: 'ReAct reasoning framework with multi-step thinking and tool calling',
},
deepResearcher: {
name: 'Deep Researcher',
description: 'Focused on in-depth research and comprehensive analysis, capable of creating research plans, multi-dimensional information retrieval, deep thinking and providing thorough analysis reports',
},
dataAnalyst: {
name: 'Data Analyst',
description: 'Focused on database queries and data analysis, capable of understanding business needs, building SQL queries, analyzing data and providing insights',
},
knowledgeGraphExpert: {
name: 'Knowledge Graph Expert',
description: 'Focused on knowledge graph queries and relationship analysis, capable of exploring entity relationships, discovering hidden connections and building knowledge networks',
},
documentAssistant: {
name: 'Document Assistant',
description: 'Focused on document retrieval and content organization, capable of quickly locating documents, extracting key information and generating summaries',
},
},
},
settings: {
title: 'Settings',
@@ -604,6 +795,7 @@ export default {
save: 'Save',
delete: 'Delete',
edit: 'Edit',
copy: 'Copy',
default: 'Default',
create: 'Create',
search: 'Search',
@@ -752,16 +944,25 @@ export default {
placeholderWithContext: 'Enter your question, will answer based on selected knowledge bases/files above',
placeholderWebOnly: 'Enter your question, will answer with web search',
placeholderKbAndWeb: 'Enter your question, will answer based on knowledge base and web search',
agentMode: 'Agent Mode',
normalMode: 'Normal Mode',
placeholderAgent: 'Ask {name}',
agentMode: 'Smart Reasoning',
normalMode: 'Quick Answer',
normalModeDesc: 'Knowledge base RAG Q&A',
agentModeDesc: 'ReAct reasoning framework with multi-step thinking',
agentModeDesc: 'Multi-step thinking, deep analysis',
agentNotReadyTooltip: 'Agent is not ready. Please finish configuration first.',
agentNotReadyDetail: 'Agent is not ready. Please configure the following: {reasons}',
agentMissingAllowedTools: 'Allowed tools',
agentMissingSummaryModel: 'Chat Model (Summary Model)',
agentMissingRerankModel: 'Rerank Model',
goToSettings: 'Go to settings →',
customAgentNotReadyTooltip: 'Agent is not ready. Please finish configuration first.',
customAgentNotReadyDetail: 'Agent is not ready. Please configure the following: {reasons}',
customAgentMissingSummaryModel: 'Chat Model (Summary Model)',
customAgentMissingRerankModel: 'Rerank Model',
goToAgentEditor: 'Go to configure →',
builtinAgentNotReadyDetail: 'Built-in agent "{agentName}" is not ready. Please configure: {reasons}',
builtinAgentSettingName: 'Intelligent Reasoning',
builtinNormalSettingName: 'Quick Q&A',
webSearch: {
toggleOn: 'Enable Web Search',
toggleOff: 'Disable Web Search',
@@ -780,8 +981,9 @@ export default {
enterContent: 'Please enter content first!',
selectKnowledge: 'Please select a knowledge base first!',
replying: 'Currently replying, please try again later!',
agentSwitchedOn: 'Switched to Agent Mode',
agentSwitchedOff: 'Switched to Normal Mode',
agentSwitchedOn: 'Switched to Intelligent Reasoning',
agentSwitchedOff: 'Switched to Quick Q&A',
agentSelected: 'Selected agent "{name}"',
agentEnabled: 'Agent Mode enabled',
agentDisabled: 'Agent Mode disabled',
agentNotReadyDetail: 'Agent is not ready. Please configure the following: {reasons}',
@@ -795,7 +997,15 @@ export default {
messageMissing: 'Unable to get message ID. Please refresh the page and try again.',
stopSuccess: 'Generation stopped',
stopFailed: 'Failed to stop. Please try again.'
}
},
webSearchDisabledByAgent: 'Web search is disabled by the current agent',
webSearchForcedByAgent: 'Web search is enabled by the current agent and cannot be turned off',
kbLockedByAgent: 'Knowledge base configuration is locked by the current agent',
kbDisabledByAgent: 'Knowledge base is disabled by the current agent',
cannotRemoveAgentKb: 'Cannot remove knowledge base configured by agent',
agentConfiguredKb: 'Configured by agent, cannot be removed',
modelLockedByAgent: 'Model selection is locked by the current agent',
goToAgentSettings: 'Go to agent settings'
},
createChat: {
title: 'Knowledge-base Q&A - AI Assistant',
@@ -1589,9 +1799,7 @@ export default {
custom: 'Custom Prompt',
disabledHint: 'Currently using the default prompt. Enable custom to apply the content below.',
placeholder: 'Enter the system prompt, or leave blank to use the default...',
tabHint: 'Configure separate prompts for sessions with web search on or off.',
tabWebOn: 'Web search enabled',
tabWebOff: 'Web search disabled'
tabHint: 'Unified system prompt using {{web_search_status}} placeholder for dynamic web search behavior'
},
reset: {
header: 'Reset to Default Prompt',
@@ -1931,5 +2139,93 @@ export default {
createFailed: 'Failed to create MCP service',
updateFailed: 'Failed to update MCP service'
}
}
},
promptTemplate: {
selectTemplate: 'Select Template',
useTemplate: 'Use Template',
withKnowledgeBase: 'KB',
withWebSearch: 'Web Search',
systemPrompt: {
defaultKB: {
name: 'Knowledge Base Assistant',
desc: 'Basic knowledge base Q&A template for most scenarios',
},
expert: {
name: 'Domain Expert',
desc: 'Professional and in-depth answers for technical domains',
},
customerService: {
name: 'Customer Service',
desc: 'Friendly and warm service style for customer support',
},
techSupport: {
name: 'Technical Support',
desc: 'Professional technical problem solving with code examples',
},
pureChat: {
name: 'General Chat',
desc: 'General conversation assistant without knowledge base',
},
webSearch: {
name: 'Web Search Assistant',
desc: 'Combines web search for up-to-date information',
},
},
contextTemplate: {
default: {
name: 'Standard Template',
desc: 'Basic context template with clear references and questions',
},
detailed: {
name: 'Detailed Template',
desc: 'Complete template with detailed instructions and requirements',
},
simple: {
name: 'Simple Template',
desc: 'Minimal template format for simple Q&A scenarios',
},
qa: {
name: 'Q&A Template',
desc: 'Optimized template for Q&A scenarios',
},
},
rewriteSystem: {
default: {
name: 'Standard Rewrite',
desc: 'Standard rules for resolving references and completing omissions',
},
strict: {
name: 'Strict Rewrite',
desc: 'Stricter requirements for complete and independent questions',
},
},
rewriteUser: {
default: {
name: 'Standard Format',
desc: 'Standard format with conversation history and current question',
},
detailed: {
name: 'Detailed Format',
desc: 'Detailed format with task instructions',
},
},
fallback: {
default: {
name: 'Standard Fallback',
desc: 'Friendly message with suggestions when unable to answer',
},
polite: {
name: 'Polite Fallback',
desc: 'More polite and detailed unable-to-answer message',
},
brief: {
name: 'Brief Fallback',
desc: 'Short unable-to-answer message',
},
model: {
name: 'Model Fallback Prompt',
desc: 'Prompt to guide model to answer with general knowledge',
},
},
},
}