hotfix: old AZURE_URL config error: "DeploymentNotFound". #4945 #4930

This commit is contained in:
lloydzhou
2024-07-09 00:32:18 +08:00
parent 7218f13783
commit 71af2628eb
2 changed files with 33 additions and 2 deletions

View File

@@ -47,10 +47,16 @@ export function collectModelTable(
(model) => (model.available = available),
);
} else {
// 1. find model by name(), and set available value
// 1. find model by name, and set available value
const [customModelName, customProviderName] = name.split("@");
let count = 0;
for (const fullName in modelTable) {
if (fullName.split("@").shift() == name) {
const [modelName, providerName] = fullName.split("@");
if (
customModelName == modelName &&
(customProviderName === undefined ||
customProviderName === providerName)
) {
count += 1;
modelTable[fullName]["available"] = available;
if (displayName) {