Fixed class filter & new models count in featherless.ai

c1535f1b34c1c8ac9a614b5239ed53dd2fdea3bc

Eradev <admin@eradev.com>

1 files changed, +3 -2Ignore whitespace
public/scripts/textgen-models.js+3 -2
@@ -472,6 +472,7 @@ export async function loadFeatherlessModels(data) {
472 featherlessTop = await fetchFeatherlessStats();472 featherlessTop = await fetchFeatherlessStats();
473 }473 }
474 const featherlessIds = featherlessTop.map(stat => stat.id);474 const featherlessIds = featherlessTop.map(stat => stat.id);
475
475 if (selectedCategory === 'New') {476 if (selectedCategory === 'New') {
476 featherlessNew = await fetchFeatherlessNew();477 featherlessNew = await fetchFeatherlessNew();
477 }478 }
@@ -493,7 +494,7 @@ export async function loadFeatherlessModels(data) {
493 return matchesSearch && matchesClass && matchesNew;494 return matchesSearch && matchesClass && matchesNew;
494 }495 }
495 else {496 else {
496 return matchesSearch;497 return matchesSearch && matchesClass;
497 }498 }
498 });499 });
499500
@@ -528,7 +529,7 @@ async function fetchFeatherlessStats() {
528}529}
529530
530async function fetchFeatherlessNew() {531async function fetchFeatherlessNew() {
531 const response = await fetch('https://api.featherless.ai/feather/models?sort=-created_at&perPage=10');532 const response = await fetch('https://api.featherless.ai/feather/models?sort=-created_at&perPage=20');
532 const data = await response.json();533 const data = await response.json();
533 return data.items;534 return data.items;
534}535}