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

Method ToConfigLoaderOptions

core/config/application_config.go:1045–1053  ·  view source on GitHub ↗

ToConfigLoaderOptions returns a slice of ConfigLoader Option. Some options defined at the application level are going to be passed as defaults for all the configuration for the models. This includes for instance the context size or the number of threads. If a model doesn't set configs directly to th

()

Source from the content-addressed store, hash-verified

1043// If a model doesn't set configs directly to the config model file
1044// it will use the defaults defined here.
1045func (o *ApplicationConfig) ToConfigLoaderOptions() []ConfigLoaderOption {
1046 return []ConfigLoaderOption{
1047 LoadOptionContextSize(o.ContextSize),
1048 LoadOptionDebug(o.Debug),
1049 LoadOptionF16(o.F16),
1050 LoadOptionThreads(o.Threads),
1051 ModelPath(o.SystemState.Model.ModelsPath),
1052 }
1053}
1054
1055// ToRuntimeSettings converts ApplicationConfig to RuntimeSettings for API responses and JSON serialization.
1056// This provides a single source of truth - ApplicationConfig holds the live values,

Callers 14

NewFunction · 0.95
ReloadModelsEndpointFunction · 0.80
ImportModelEndpointFunction · 0.80
DeleteJobMethod · 0.80
ImportModelMethod · 0.80
modelHandlerMethod · 0.80
DeleteJobMethod · 0.80
ExportModelMethod · 0.80
writeModelYAMLFunction · 0.80
TogglePinnedMethod · 0.80
ToggleStateMethod · 0.80
PatchConfigMethod · 0.80

Calls 5

LoadOptionContextSizeFunction · 0.85
LoadOptionDebugFunction · 0.85
LoadOptionF16Function · 0.85
LoadOptionThreadsFunction · 0.85
ModelPathFunction · 0.85

Tested by 1

writeModelYAMLFunction · 0.64