X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/3cdbd017da9ae7a7045f4272f16d4b262fd01c79..d73a88b9e0835b1d7f0711e02db56555101a7830:/agent.go diff --git a/agent.go b/agent.go index b86880e..d95a81c 100644 --- a/agent.go +++ b/agent.go @@ -90,6 +90,16 @@ func (a *Agent) Images() *ImageStore { return &ImageStore{dir: filepath.Join(filepath.Dir(root), imageDirName)} } +// Voices returns the shared data-directory audio store, also for a child. +func (a *Agent) Voices() *VoiceStore { + root := a.dir + if a.config.Parent != "" { + root = filepath.Dir(filepath.Dir(root)) + } + + return &VoiceStore{dir: filepath.Join(filepath.Dir(root), voiceDirName)} +} + // CacheKey returns the prompt cache key of every model call of the agent. func (a *Agent) CacheKey() string { return "onechat-" + a.config.ID