MCPcopy
hub / github.com/mudler/LocalAI / NewConfigService

Function NewConfigService

core/services/modeladmin/config.go:32–34  ·  view source on GitHub ↗

NewConfigService returns a ConfigService bound to the supplied loader and app config. The loader and the system state in AppConfig are mandatory; the model loader is required only by EditYAML and ToggleState (for Shutdown).

(loader *config.ModelConfigLoader, appConfig *config.ApplicationConfig)

Source from the content-addressed store, hash-verified

30// app config. The loader and the system state in AppConfig are mandatory; the
31// model loader is required only by EditYAML and ToggleState (for Shutdown).
32func NewConfigService(loader *config.ModelConfigLoader, appConfig *config.ApplicationConfig) *ConfigService {
33 return &ConfigService{Loader: loader, AppConfig: appConfig}
34}
35
36// ConfigView is the on-disk YAML plus the parsed JSON view, returned by GetConfig.
37// The YAML is read from disk (not serialised from the in-memory loader) so

Callers 7

GetEditModelPageFunction · 0.92
EditModelEndpointFunction · 0.92
PatchConfigEndpointFunction · 0.92
ToggleStateModelEndpointFunction · 0.92
NewFunction · 0.92
newTestServiceFunction · 0.85

Calls

no outgoing calls

Tested by 1

newTestServiceFunction · 0.68