Class YesNoQuestion
java.lang.Object
org.springframework.ai.decision.question.YesNoQuestion
- All Implemented Interfaces:
DecisionQuestion
A question with a yes or no answer, answered with the probability of "yes" as a
YesNoAnswer. The optional criteria describe when the answer is yes and when it
is no; a blank criterion counts as none. Providers whose API has a place for them send
them as such, the others add them to the question text.- Since:
- 2.1.0
- Author:
- Thomas Vitale
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic YesNoQuestion.Builderbuilder()booleangetText()The question text, which tells the model what to decide.@Nullable StringWhen the answer is no, ornullwhen not specified or blank.@Nullable StringWhen the answer is yes, ornullwhen not specified or blank.inthashCode()static YesNoQuestionA question without criteria.toString()
-
Method Details
-
of
A question without criteria. -
builder
-
getText
Description copied from interface:DecisionQuestionThe question text, which tells the model what to decide.- Specified by:
getTextin interfaceDecisionQuestion
-
getWhenYes
When the answer is yes, ornullwhen not specified or blank. -
getWhenNo
When the answer is no, ornullwhen not specified or blank. -
equals
-
hashCode
public int hashCode() -
toString
-