Class DecisionResponse

java.lang.Object
dev.langchain4j.model.decision.response.DecisionResponse

@Experimental public final class DecisionResponse extends Object
The response of a DecisionModel: one DecisionAnswer per question of the request, keyed by question name, together with the DecisionResponseMetadata (model name, token usage).
DecisionResponse response = decisionModel.decide(request);

ChoiceAnswer team = response.choice("team");
YesNoAnswer urgent = response.yesNo("urgent");

if (urgent.probability() > 0.8) {
    escalate(team.value());
}
Since:
1.21.0