Package com.github.copilot.sdk.json
Class UserInputRequest
java.lang.Object
com.github.copilot.sdk.json.UserInputRequest
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns whether freeform text input is allowed.Gets the optional choices for multiple choice questions.Gets the question to ask the user.setAllowFreeform(Boolean allowFreeform) Sets whether freeform text input is allowed.setChoices(List<String> choices) Sets the choices for multiple choice questions.setQuestion(String question) Sets the question to ask the user.
-
Constructor Details
-
UserInputRequest
public UserInputRequest()
-
-
Method Details
-
getQuestion
Gets the question to ask the user.- Returns:
- the question text
-
setQuestion
Sets the question to ask the user.- Parameters:
question- the question text- Returns:
- this instance for method chaining
-
getChoices
Gets the optional choices for multiple choice questions.- Returns:
- the list of choices, or
nullfor freeform input
-
setChoices
Sets the choices for multiple choice questions.- Parameters:
choices- the list of choices- Returns:
- this instance for method chaining
-
getAllowFreeform
Returns whether freeform text input is allowed.- Returns:
trueif freeform input is allowed,nullif not specified
-
setAllowFreeform
Sets whether freeform text input is allowed.- Parameters:
allowFreeform-trueto allow freeform input- Returns:
- this instance for method chaining
-