Class CreateQuizQuestionTool
java.lang.Object
fr.paris.lutece.plugins.wiki.modules.ai.service.tools.CreateQuizQuestionTool
Tool for creating quiz questions with their answers. This tool is used by the AI agent to generate quiz questions from page content.
-
Constructor Summary
ConstructorsConstructorDescriptionCreateQuizQuestionTool(int nWorkflowId, int nCurrentPageId) Constructor for CreateQuizQuestionTool. -
Method Summary
Modifier and TypeMethodDescriptioncreateQuestion(String questionText, String questionType, String explanation, String answersJson) Creates a quiz question with its answers.Returns the list of generated questions.voidsetCurrentPageId(int nPageId) Sets the current page identifier.
-
Constructor Details
-
CreateQuizQuestionTool
public CreateQuizQuestionTool(int nWorkflowId, int nCurrentPageId) Constructor for CreateQuizQuestionTool.- Parameters:
nWorkflowId- the workflow identifiernCurrentPageId- the current page identifier
-
-
Method Details
-
createQuestion
public String createQuestion(String questionText, String questionType, String explanation, String answersJson) Creates a quiz question with its answers.- Parameters:
questionText- the question textquestionType- the question type (MCQ, TRUE_FALSE, MATCHING, or ORDERING)explanation- the explanation shown after the user answersanswersJson- the JSON array of answers- Returns:
- a success or error message
-
getGeneratedQuestions
Returns the list of generated questions.- Returns:
- the list of generated questions
-
setCurrentPageId
public void setCurrentPageId(int nPageId) Sets the current page identifier.- Parameters:
nPageId- the page identifier to set
-