feat: litellm frontend integration

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

No files matched your search

+5 -3
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