Add load job configuration
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
"code.chimeric.al/chimerical/odidere/internal/job"
|
||||
"code.chimeric.al/chimerical/odidere/internal/llm"
|
||||
"code.chimeric.al/chimerical/odidere/internal/stt"
|
||||
"code.chimeric.al/chimerical/odidere/internal/tool"
|
||||
@@ -30,6 +31,8 @@ type Config struct {
|
||||
LLM llm.Config `yaml:"llm"`
|
||||
// STT configures the speech-to-text client.
|
||||
STT stt.Config `yaml:"stt"`
|
||||
// Jobs defines scheduled autonomous tasks.
|
||||
Jobs []job.Config `yaml:"jobs"`
|
||||
// Tools defines external commands available to the LLM.
|
||||
Tools []tool.Tool `yaml:"tools"`
|
||||
// TTS configures the text-to-speech client.
|
||||
@@ -74,6 +77,11 @@ func (cfg *Config) Validate() error {
|
||||
cfg.ShutdownTimeout, err,
|
||||
)
|
||||
}
|
||||
for i, jc := range cfg.Jobs {
|
||||
if err := jc.Validate(); err != nil {
|
||||
return fmt.Errorf("jobs[%d] invalid: %w", i, err)
|
||||
}
|
||||
}
|
||||
for i, t := range cfg.Tools {
|
||||
if err := t.Validate(); err != nil {
|
||||
return fmt.Errorf("tools[%d] invalid: %w", i, err)
|
||||
|
||||
Reference in New Issue
Block a user