Fixed class filter & new models count in featherless.ai
| @@ -472,6 +472,7 @@ export async function loadFeatherlessModels(data) { | ||
| 472 | 472 | featherlessTop = await fetchFeatherlessStats(); |
| 473 | 473 | } |
| 474 | 474 | const featherlessIds = featherlessTop.map(stat => stat.id); |
| 475 | + | |
| 475 | 476 | if (selectedCategory === 'New') { |
| 476 | 477 | featherlessNew = await fetchFeatherlessNew(); |
| 477 | 478 | } |
| @@ -493,7 +494,7 @@ export async function loadFeatherlessModels(data) { | ||
| 493 | 494 | return matchesSearch && matchesClass && matchesNew; |
| 494 | 495 | } |
| 495 | 496 | else { |
| 496 | 497 | return matchesSearch && matchesClass; |
| 497 | 498 | } |
| 498 | 499 | }); |
| 499 | 500 | |
| @@ -528,7 +529,7 @@ async function fetchFeatherlessStats() { | ||
| 528 | 529 | } |
| 529 | 530 | |
| 530 | 531 | async function fetchFeatherlessNew() { |
| 531 | 532 | const response = await fetch('https://api.featherless.ai/feather/models?sort=-created_at&perPage=1020'); |
| 532 | 533 | const data = await response.json(); |
| 533 | 534 | return data.items; |
| 534 | 535 | } |