mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fixed class filter & new models count in featherless.ai
This commit is contained in:
@ -472,6 +472,7 @@ export async function loadFeatherlessModels(data) {
|
|||||||
featherlessTop = await fetchFeatherlessStats();
|
featherlessTop = await fetchFeatherlessStats();
|
||||||
}
|
}
|
||||||
const featherlessIds = featherlessTop.map(stat => stat.id);
|
const featherlessIds = featherlessTop.map(stat => stat.id);
|
||||||
|
|
||||||
if (selectedCategory === 'New') {
|
if (selectedCategory === 'New') {
|
||||||
featherlessNew = await fetchFeatherlessNew();
|
featherlessNew = await fetchFeatherlessNew();
|
||||||
}
|
}
|
||||||
@ -493,7 +494,7 @@ export async function loadFeatherlessModels(data) {
|
|||||||
return matchesSearch && matchesClass && matchesNew;
|
return matchesSearch && matchesClass && matchesNew;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return matchesSearch;
|
return matchesSearch && matchesClass;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -528,7 +529,7 @@ async function fetchFeatherlessStats() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function fetchFeatherlessNew() {
|
async function fetchFeatherlessNew() {
|
||||||
const response = await fetch('https://api.featherless.ai/feather/models?sort=-created_at&perPage=10');
|
const response = await fetch('https://api.featherless.ai/feather/models?sort=-created_at&perPage=20');
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
return data.items;
|
return data.items;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user