import db, { getModels } from "@/utils/db" export default async function ModelResults({ params }) { const slug = params.slug const models = await getModels() const model = models.find((m) => m.slug === slug) const results = await db` SELECT results.*, prompts.text as prompt_text FROM results INNER JOIN prompts ON results.prompt = prompts.id WHERE model = ${model.id} ORDER BY results.score DESC; ` return ( <>

{model.name}

Score: {model.total_score}

{results.map((result, i) => ( ))}
Prompt Result Rate Score
{result.prompt_text}
{result.result.trim()}
{result.rate} char/s {typeof result.score === "number" ? result.score : "not rated"}
) }