forked from open-webui/open-webui
feat: litellm frontend integration
This commit is contained in:
parent
de0084c8df
commit
9b6dca3d7f
8 changed files with 134 additions and 62 deletions
|
@ -128,9 +128,11 @@ export const getOllamaModels = async (token: string = '') => {
|
|||
throw error;
|
||||
}
|
||||
|
||||
return (res?.models ?? []).sort((a, b) => {
|
||||
return a.name.localeCompare(b.name);
|
||||
});
|
||||
return (res?.models ?? [])
|
||||
.map((model) => ({ id: model.model, name: model.name ?? model.model, ...model }))
|
||||
.sort((a, b) => {
|
||||
return a.name.localeCompare(b.name);
|
||||
});
|
||||
};
|
||||
|
||||
// TODO: migrate to backend
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue