add allow & deny model list, fix cors on error

This commit is contained in:
2024-01-16 17:11:25 +08:00
parent 8672899a58
commit b1ab9c3d7b
5 changed files with 55 additions and 20 deletions

View File

@@ -17,9 +17,11 @@ type Config struct {
Upstreams []OPENAI_UPSTREAM `yaml:"upstreams"`
}
type OPENAI_UPSTREAM struct {
SK string `yaml:"sk"`
Endpoint string `yaml:"endpoint"`
Timeout int64 `yaml:"timeout"`
SK string `yaml:"sk"`
Endpoint string `yaml:"endpoint"`
Timeout int64 `yaml:"timeout"`
Allow []string `yaml:"allow"`
Deny []string `yaml:"deny"`
URL *url.URL
}