File size: 714 Bytes
c30d191 c265074 c30d191 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import { models } from "$lib/server/models";
export async function GET() {
const res = models
.filter((m) => m.unlisted == false)
.map((model) => ({
id: model.id,
name: model.name,
websiteUrl: model.websiteUrl ?? "https://huggingface.co",
modelUrl: model.modelUrl ?? "https://huggingface.co",
tokenizer: model.tokenizer,
datasetName: model.datasetName,
datasetUrl: model.datasetUrl,
displayName: model.displayName,
description: model.description ?? "",
logoUrl: model.logoUrl,
promptExamples: model.promptExamples ?? [],
preprompt: model.preprompt ?? "",
multimodal: model.multimodal ?? false,
unlisted: model.unlisted ?? false,
}));
return Response.json(res);
}
|