config AgentConfig
}
+// Images returns the shared data-directory image store, also for a child.
+func (a *Agent) Images() *ImageStore {
+ root := a.dir
+ if a.config.Parent != "" {
+ root = filepath.Dir(filepath.Dir(root))
+ }
+
+ return &ImageStore{dir: filepath.Join(filepath.Dir(root), imageDirName)}
+}
+
// CacheKey returns the prompt cache key of every model call of the agent.
func (a *Agent) CacheKey() string {
return "onechat-" + a.config.ID