Class CreateQuizQuestionTool

java.lang.Object
fr.paris.lutece.plugins.wiki.modules.ai.service.tools.CreateQuizQuestionTool

public class CreateQuizQuestionTool extends Object
Tool for creating quiz questions with their answers. This tool is used by the AI agent to generate quiz questions from page content.
  • Constructor Details

    • CreateQuizQuestionTool

      public CreateQuizQuestionTool(int nWorkflowId, int nCurrentPageId)
      Constructor for CreateQuizQuestionTool.
      Parameters:
      nWorkflowId - the workflow identifier
      nCurrentPageId - 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 text
      questionType - the question type (MCQ, TRUE_FALSE, MATCHING, or ORDERING)
      explanation - the explanation shown after the user answers
      answersJson - the JSON array of answers
      Returns:
      a success or error message
    • getGeneratedQuestions

      public List<QuizGeneratedQuestion> 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