mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-24 06:46:39 +00:00
5866fc8ded
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
24 lines
544 B
Go
24 lines
544 B
Go
package backend
|
|
|
|
import (
|
|
"github.com/mudler/LocalAI/core/config"
|
|
|
|
"github.com/mudler/LocalAI/pkg/grpc"
|
|
"github.com/mudler/LocalAI/pkg/model"
|
|
)
|
|
|
|
func StoreBackend(sl *model.ModelLoader, appConfig *config.ApplicationConfig, storeName string) (grpc.Backend, error) {
|
|
if storeName == "" {
|
|
storeName = "default"
|
|
}
|
|
|
|
sc := []model.Option{
|
|
model.WithBackendString(model.LocalStoreBackend),
|
|
model.WithAssetDir(appConfig.AssetsDestination),
|
|
model.WithModel(storeName),
|
|
}
|
|
|
|
return sl.BackendLoader(sc...)
|
|
}
|
|
|