mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-20 21:23:10 +00:00
59ef426fbf
fix(model-list): be consistent, skip known files from listing This changeset does two things: - Removes the dependency of listing models from the OpenAI schema. - Tries to reduce confusion between ListModels() in model loader and in the service - now there is only one ListModels which is in services and does not depend anymore on the OpenAI schema - The OpenAI-schema functions were moved nearby the OpenAI specific endpoints that needs the schema - Drops the ListModel Service structure as there was no real need for it. Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
39 lines
1.4 KiB
Go
39 lines
1.4 KiB
Go
package core
|
|
|
|
import (
|
|
"github.com/mudler/LocalAI/core/config"
|
|
"github.com/mudler/LocalAI/core/services"
|
|
"github.com/mudler/LocalAI/pkg/model"
|
|
)
|
|
|
|
// The purpose of this structure is to hold pointers to all initialized services, to make plumbing easy
|
|
// Perhaps a proper DI system is worth it in the future, but for now keep things simple.
|
|
type Application struct {
|
|
|
|
// Application-Level Config
|
|
ApplicationConfig *config.ApplicationConfig
|
|
// ApplicationState *ApplicationState
|
|
|
|
// Core Low-Level Services
|
|
BackendConfigLoader *config.BackendConfigLoader
|
|
ModelLoader *model.ModelLoader
|
|
|
|
// Backend Services
|
|
// EmbeddingsBackendService *backend.EmbeddingsBackendService
|
|
// ImageGenerationBackendService *backend.ImageGenerationBackendService
|
|
// LLMBackendService *backend.LLMBackendService
|
|
// TranscriptionBackendService *backend.TranscriptionBackendService
|
|
// TextToSpeechBackendService *backend.TextToSpeechBackendService
|
|
|
|
// LocalAI System Services
|
|
BackendMonitorService *services.BackendMonitorService
|
|
GalleryService *services.GalleryService
|
|
LocalAIMetricsService *services.LocalAIMetricsService
|
|
// OpenAIService *services.OpenAIService
|
|
}
|
|
|
|
// TODO [NEXT PR?]: Break up ApplicationConfig.
|
|
// Migrate over stuff that is not set via config at all - especially runtime stuff
|
|
type ApplicationState struct {
|
|
}
|