mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-25 13:04:59 +00:00
feat: add API_KEY list support (#877)
Co-authored-by: Harold Sun <sunhua@amazon.com>
This commit is contained in:
parent
8c781a6a44
commit
1d1cae8e4d
3 changed files with 59 additions and 19 deletions
|
@ -23,6 +23,7 @@ type Option struct {
|
|||
PreloadJSONModels string
|
||||
PreloadModelsFromPath string
|
||||
CORSAllowOrigins string
|
||||
ApiKeys []string
|
||||
|
||||
Galleries []gallery.Gallery
|
||||
|
||||
|
@ -184,3 +185,9 @@ func WithImageDir(imageDir string) AppOption {
|
|||
o.ImageDir = imageDir
|
||||
}
|
||||
}
|
||||
|
||||
func WithApiKeys(apiKeys []string) AppOption {
|
||||
return func(o *Option) {
|
||||
o.ApiKeys = apiKeys
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue