refac
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
@@ -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/`, {
|
||||
|
||||
Reference in New Issue
Block a user