Files
LocalAGI/webui/collections_internal.go
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

18 lines
694 B
Go

package webui
import (
"github.com/mudler/LocalAGI/core/agent"
"github.com/mudler/LocalAGI/core/state"
"github.com/mudler/LocalAGI/webui/collections"
)
// CollectionsRAGProviderFromState delegates to the collections sub-package.
func CollectionsRAGProviderFromState(cs *CollectionsState) func(collectionName string) (agent.RAGDB, state.KBCompactionClient, bool) {
return collections.RAGProviderFromState(cs)
}
// CollectionsRAGProvider returns a provider that the pool can use when no LocalRAG URL is set.
func (app *App) CollectionsRAGProvider() func(collectionName string) (agent.RAGDB, state.KBCompactionClient, bool) {
return CollectionsRAGProviderFromState(app.collectionsState)
}