ChoiceAnswer
class ChoiceAnswer extends Answer
Methods
array
toArray()
Get the instance as an array.
__construct(string $choice, array $probabilities, float|null $confidence = null)
Create a new choice answer instance.
float
probabilityOf(string $option)
Get the probability of the given option.
Details
at line 33
array
toArray()
Get the instance as an array.
in
Answer at line 20
array
jsonSerialize()
Get the JSON serializable representation of the instance.
at line 15
__construct(string $choice, array $probabilities, float|null $confidence = null)
Create a new choice answer instance.
at line 25
float
probabilityOf(string $option)
Get the probability of the given option.