mirror of
https://github.com/open-webui/open-webui
synced 2025-02-22 21:32:32 +00:00
refac
This commit is contained in:
parent
5626426c31
commit
7e73790d6c
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user