This commit is contained in:
Timothy J. Baek
2024-05-24 02:17:48 -07:00
parent 404875cab9
commit e80e4c304a
14 changed files with 49 additions and 60 deletions
+6 -1
View File
@@ -25,7 +25,12 @@ export const getModels = async (token: string = '') => {
throw error;
}
return res?.data ?? [];
let models = res?.data ?? [];
models = models.filter((models) => models).reduce((a, e, i, arr) => a.concat(e), []);
console.log(models);
return models;
};
export const getBackendConfig = async () => {
+1 -1
View File
@@ -29,7 +29,7 @@ export const addNewModel = async (token: string, model: object) => {
return res;
};
export const getModels = async (token: string = '') => {
export const getModelInfos = async (token: string = '') => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/models/`, {