mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-28 06:25:00 +00:00
feature: model list :: filter query string parameter (#830)
This commit is contained in:
parent
32ca7efbeb
commit
ce8e9dc690
4 changed files with 54 additions and 18 deletions
|
@ -172,6 +172,16 @@ func (cm *ConfigLoader) GetConfig(m string) (Config, bool) {
|
|||
return v, exists
|
||||
}
|
||||
|
||||
func (cm *ConfigLoader) GetAllConfigs() []Config {
|
||||
cm.Lock()
|
||||
defer cm.Unlock()
|
||||
var res []Config
|
||||
for _, v := range cm.configs {
|
||||
res = append(res, v)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func (cm *ConfigLoader) ListConfigs() []string {
|
||||
cm.Lock()
|
||||
defer cm.Unlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue