mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 19:37:47 +01:00
refac
This commit is contained in:
@@ -68,7 +68,21 @@ export const getModels = async (
|
||||
})()
|
||||
);
|
||||
} 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 {
|
||||
requests.push(
|
||||
|
||||
Reference in New Issue
Block a user