Do not let age to be either a string or an int
This commit is contained in:
@@ -22,7 +22,7 @@ type PromptHUD struct {
|
||||
|
||||
type Character struct {
|
||||
Name string `json:"name"`
|
||||
Age string `json:"age"`
|
||||
Age any `json:"age"`
|
||||
Occupation string `json:"job_occupation"`
|
||||
Hobbies []string `json:"hobbies"`
|
||||
MusicTaste []string `json:"music_taste"`
|
||||
|
||||
@@ -423,7 +423,12 @@ func (a *AgentPool) Stop(name string) {
|
||||
|
||||
func (a *AgentPool) Start(name string) error {
|
||||
if agent, ok := a.agents[name]; ok {
|
||||
return agent.Run()
|
||||
err := agent.Run()
|
||||
if err != nil {
|
||||
return fmt.Errorf("agent %s failed to start: %w", name, err)
|
||||
}
|
||||
slog.Info("Agent started", "name", name)
|
||||
return nil
|
||||
}
|
||||
if config, ok := a.pool[name]; ok {
|
||||
return a.startAgentWithConfig(name, &config)
|
||||
|
||||
Reference in New Issue
Block a user