Add AI post-processing prompt

This commit is contained in:
Thales Maciel 2026-02-06 18:54:39 -03:00
parent b296491703
commit cda89923ce
4 changed files with 269 additions and 1 deletions

View file

@ -218,7 +218,8 @@ func (d *Daemon) stopAndProcess(reason string) {
}
d.log.Printf("transcript: %s", text)
if d.ai != nil && d.cfg.AIEnabled {
if d.cfg.AIEnabled && d.ai != nil {
d.log.Printf("ai enabled")
d.setState(StateProcessing)
aiCtx, cancel := context.WithTimeout(context.Background(), time.Duration(d.cfg.AITimeoutSec)*time.Second)
cleaned, err := d.ai.Process(aiCtx, text)