mirror of
https://github.com/mudler/LocalAGI.git
synced 2026-07-23 18:55:52 -04:00
5a27c471ca
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
19 lines
481 B
Go
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
|
|
}
|