QUIZZES FEITOS POHA

This commit is contained in:
2026-05-16 20:19:23 +01:00
parent 728368b040
commit 3463b1f6cc
4 changed files with 749 additions and 39 deletions

View File

@@ -480,6 +480,22 @@ Usas formatação clara e organizada.''';
}
}
/// Gerar quiz a partir de um prompt com contexto PDF embutido — sem histórico de conversa
static Future<String> generateQuiz(String prompt) async {
final messages = <Map<String, String>>[
{
'role': 'system',
'content': 'És um assistente educativo especializado em criar quizzes pedagógicos. '
'Cria sempre perguntas claras, baseadas exclusivamente no contexto fornecido.',
},
{
'role': 'user',
'content': prompt,
},
];
return await _callOllamaAPIWithMessages(messages);
}
/// Test the service with a simple query
static Future<String> testService() async {
try {