Evalkeeper
    Preparing search index...

    Function evalPages

    • Evalkeeper's pages for the Next.js App Router. Each route file add pages writes exports one of these as its page and title. Every page calls requireAdmin first, and a suite or test that isn't there is a 404.

      Parameters

      • app: EvalAppConfig

        Your screens' configuration, from defineEvals.

      • requireAdmin: () => Promise<EvalAdmin>

        Who may use the pages; it throws for anyone else.

      Returns {
          compare: EvalPage<{ suite: string }>;
          feedback: {
              generateMetadata: () => Promise<{ title: string }>;
              Page: () => Promise<Element>;
          };
          hub: {
              generateMetadata: () => Promise<{ title: string }>;
              Page: () => Promise<Element>;
          };
          rate: EvalPage<{ suite: string }>;
          run: EvalPage<{ runId: string; suite: string }>;
          sideBySide: EvalPage<{ suite: string }>;
          suite: EvalPage<{ suite: string }>;
      }

      • compare: EvalPage<{ suite: string }>

        Two tests compared: the verdict, each check, and where they differ.

      • feedback: {
            generateMetadata: () => Promise<{ title: string }>;
            Page: () => Promise<Element>;
        }

        Thumbs up and down, and what to do with each.

      • hub: {
            generateMetadata: () => Promise<{ title: string }>;
            Page: () => Promise<Element>;
        }

        The hub: where each suite stands and what needs attention.

      • rate: EvalPage<{ suite: string }>

        Blind rating: one case at a time, by its input only.

      • run: EvalPage<{ runId: string; suite: string }>

        One test: every answer, with what each check found.

      • sideBySide: EvalPage<{ suite: string }>

        Two tests' answers where they differ, side by side.

      • suite: EvalPage<{ suite: string }>

        A suite: its models, suggestion, versions, checks, and answer key.

      // app/evals/[suite]/page.tsx
      import { pages } from "@/lib/evalkeeper/evals";
      export const dynamic = "force-dynamic";
      export const generateMetadata = pages.suite.generateMetadata;
      export default pages.suite.Page;