DecisionScript
class DecisionScript
The script of a ScriptedDecisionModel: each call adds the decision for one request, in order.
ScriptedDecisionModel {
chooses("refund") // picks an option
chooses("technical", confidence = 0.3) // picks one, and is not sure
yes()
no()
scores(2.0) // rates on a scale
fails("API error 429: slow down") // a call that throws
decides { request -> DecisionResponse(request.questions.mapValues { Answer.YesNo(1.0) }) }
}Content copied to clipboard
Functions
Link copied to clipboard
The model answers with what decision returns for the request, for a request with several questions or a decision that depends on what was asked.
Link copied to clipboard
The model answers no.
Link copied to clipboard
The model answers yes.