Class UserInputResponse

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

public class UserInputResponse extends Object
Response to a user input request.
Since:
1.0.6
  • Constructor Details

    • UserInputResponse

      public UserInputResponse()
  • Method Details

    • getAnswer

      public String getAnswer()
      Gets the user's answer.
      Returns:
      the answer text
    • setAnswer

      public UserInputResponse setAnswer(String answer)
      Sets the user's answer.
      Parameters:
      answer - the answer text
      Returns:
      this instance for method chaining
    • isWasFreeform

      public boolean isWasFreeform()
      Returns whether the answer was freeform (not from the provided choices).
      Returns:
      true if the answer was freeform
    • setWasFreeform

      public UserInputResponse setWasFreeform(boolean wasFreeform)
      Sets whether the answer was freeform.
      Parameters:
      wasFreeform - true if the answer was freeform
      Returns:
      this instance for method chaining