Add customizable system prompt
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -114,6 +114,11 @@
|
||||
<label for="permanent_goal" class="block text-lg font-medium text-gray-400">Permanent goal</label>
|
||||
<input type="text" name="permanent_goal" id="permanent_goal" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md bg-gray-700 text-white" placeholder="Permanent goal">
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="system_prompt" class="block text-lg font-medium text-gray-400">System prompt</label>
|
||||
<input type="text" name="system_prompt" id="system_prompt" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md bg-gray-700 text-white" placeholder="System prompt">
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between">
|
||||
<button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-500 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
|
||||
Create Agent
|
||||
|
||||
Reference in New Issue
Block a user