feat: litellm frontend integration

This commit is contained in:
Timothy J. Baek 2024-02-22 04:12:26 -08:00
parent de0084c8df
commit 9b6dca3d7f
8 changed files with 134 additions and 62 deletions

View file

@ -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