ai-proxy: support custom openai provider (#1176)

Co-authored-by: Kent Dong <ch3cho@qq.com>
This commit is contained in:
澄潭
2024-08-07 10:33:01 +08:00
committed by GitHub
parent 536a3069a8
commit 0a578c2a04
17 changed files with 110 additions and 38 deletions

View File

@@ -34,6 +34,9 @@ type baiduProviderInitializer struct {
}
func (b *baiduProviderInitializer) ValidateConfig(config ProviderConfig) error {
if config.apiTokens == nil || len(config.apiTokens) == 0 {
return errors.New("no apiToken found in provider config")
}
return nil
}