feat: Add system prompt template support and placeholder functionality
- Introduced a new PlaceholderDefinition interface to manage available placeholders for system prompts. - Enhanced AgentSettings.vue to allow users to configure system prompts with dynamic placeholders, improving user experience. - Updated the AgentConfig structure to include a system prompt field, enabling custom prompt templates. - Modified backend components to support the new system prompt template, ensuring compatibility with existing configurations. - Implemented logic for rendering placeholders in the system prompt, allowing for dynamic content generation based on user input.
This commit is contained in:
@@ -144,6 +144,9 @@ func (s *agentService) CreateAgentEngine(
|
||||
}
|
||||
}
|
||||
|
||||
// Get system prompt template from config (use default if empty)
|
||||
systemPromptTemplate := config.SystemPrompt
|
||||
|
||||
// Create engine with provided EventBus and contextManager
|
||||
engine := agent.NewAgentEngine(
|
||||
config,
|
||||
@@ -154,6 +157,7 @@ func (s *agentService) CreateAgentEngine(
|
||||
kbInfos,
|
||||
contextManager,
|
||||
sessionID,
|
||||
systemPromptTemplate,
|
||||
)
|
||||
|
||||
return engine, nil
|
||||
|
||||
Reference in New Issue
Block a user