Class UserInputRequest

java.lang.Object
com.github.copilot.sdk.json.UserInputRequest

public class UserInputRequest extends Object
Request for user input from the agent.

This is sent when the agent uses the ask_user tool to request input from the user.

Since:
1.0.6
  • Constructor Details

    • UserInputRequest

      public UserInputRequest()
  • Method Details

    • getQuestion

      public String getQuestion()
      Gets the question to ask the user.
      Returns:
      the question text
    • setQuestion

      public UserInputRequest setQuestion(String question)
      Sets the question to ask the user.
      Parameters:
      question - the question text
      Returns:
      this instance for method chaining
    • getChoices

      public List<String> getChoices()
      Gets the optional choices for multiple choice questions.
      Returns:
      the list of choices, or null for freeform input
    • setChoices

      public UserInputRequest setChoices(List<String> choices)
      Sets the choices for multiple choice questions.
      Parameters:
      choices - the list of choices
      Returns:
      this instance for method chaining
    • getAllowFreeform

      public Boolean getAllowFreeform()
      Returns whether freeform text input is allowed.
      Returns:
      true if freeform input is allowed, null if not specified
    • setAllowFreeform

      public UserInputRequest setAllowFreeform(Boolean allowFreeform)
      Sets whether freeform text input is allowed.
      Parameters:
      allowFreeform - true to allow freeform input
      Returns:
      this instance for method chaining