const types = { ecommerce: "Online shop", news: "News outlet" }; const sectors = { tech: "Technology", finance: "Banking" }; const jevQuestions = { type: choice("What kind of website is this?", types), sector: choice("Which sector does it belong to?", sectors), commercial: score("How commercial is this page?", levels), }; // Gemini: the same keys, as an enum in its JSON schema
const page = await scrape(url); // once const [jevResult, geminiResult] = await Promise.all([ timed(() => jev.systemOne({ state: page.text, questions })), timed(() => generateText({ model: "google/gemini-3.8-flash", prompt: page.text, output: Output.object({ schema: geminiSchema }), })), ]);