Add customizable system prompt

This commit is contained in:
mudler
2024-04-10 20:35:04 +02:00
parent 0dda705017
commit 230d012915
4 changed files with 26 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ type AgentConfig struct {
PermanentGoal string `json:"permanent_goal" form:"permanent_goal"`
EnableKnowledgeBase bool `json:"enable_kb" form:"enable_kb"`
KnowledgeBaseResults int `json:"kb_results" form:"kb_results"`
SystemPrompt string `json:"system_prompt" form:"system_prompt"`
}
type AgentPool struct {
@@ -248,6 +249,7 @@ func (a *AgentPool) startAgentWithConfig(name string, config *AgentConfig) error
}
return true
}),
WithSystemPrompt(config.SystemPrompt),
WithAgentResultCallback(func(state ActionState) {
fmt.Println("Reasoning", state.Reasoning)