{role:'system',content:'You are a quiz generator. Output ONLY valid JSON. The "correct" field must always contain the EXACT TEXT of the correct answer option, never "option1" or "option2".'},
{role:'user',content:aiPrompt}
],
stream:false,
options:{temperature:0.7}
})
});
if(!ollamaResponse.ok){
consterrText=awaitollamaResponse.text();
console.error('Ollama error:',errText);
returnres.status(500).json({message:`Ollama error (${ollamaResponse.status}): Make sure Ollama is running with "${ollamaModel}" model pulled.`});
placeholder="e.g. Generate a quiz on Operating Systems covering process scheduling, memory management, and file systems. Include 10 questions that a student can answer in 15 minutes."></textarea>