refact: azure

This commit is contained in:
Sakurasan
2024-04-17 01:21:47 +08:00
parent b61e85b7fc
commit ec073db5c7
2 changed files with 36 additions and 10 deletions

View File

@@ -49,6 +49,11 @@ func SelectKeyCache(apitype string) (Key, error) {
if item.Object.(Key).ApiType == apitype {
keys = append(keys, item.Object.(Key))
}
if apitype == "openai" {
if item.Object.(Key).ApiType == "azure" {
keys = append(keys, item.Object.(Key))
}
}
}
if len(keys) == 0 {
return Key{}, errors.New("No key found")