mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
refac
This commit is contained in:
@@ -68,7 +68,21 @@ export const getModels = async (
|
|||||||
})()
|
})()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
requests.push(getOpenAIModelsDirect(url, OPENAI_API_KEYS[idx]));
|
requests.push(
|
||||||
|
(async () => {
|
||||||
|
return await getOpenAIModelsDirect(url, OPENAI_API_KEYS[idx])
|
||||||
|
.then((res) => {
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return {
|
||||||
|
object: 'list',
|
||||||
|
data: [],
|
||||||
|
urlIdx: idx
|
||||||
|
};
|
||||||
|
});
|
||||||
|
})()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
requests.push(
|
requests.push(
|
||||||
|
|||||||
Reference in New Issue
Block a user