feat: sort model list by alphabetical order

This commit is contained in:
Timothy J. Baek 2024-01-03 23:46:49 -08:00
parent c6c32e2abd
commit f6640c4e8b
3 changed files with 17 additions and 27 deletions

View file

@ -67,7 +67,9 @@ export const getOllamaModels = async (
throw error;
}
return res?.models ?? [];
return (res?.models ?? []).sort((a, b) => {
return a.name.localeCompare(b.name);
});
};
export const generateTitle = async (