Files
Ettore Di Giacinto 5a27c471ca chore: refactoring to make it importable
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-03-06 16:49:48 +01:00

19 lines
481 B
Go

package collections
import (
"sync"
"github.com/mudler/localrecall/rag"
)
// CollectionList maps collection names to their persistent knowledge bases.
type CollectionList map[string]*rag.PersistentKB
// State holds in-memory state for the collections API.
type State struct {
Mu sync.RWMutex
Collections CollectionList
SourceManager *rag.SourceManager
EnsureCollection func(name string) (*rag.PersistentKB, bool) // get-or-create for internal RAG
}