Exception: Phronomy::LowConfidenceError
- Defined in:
- lib/phronomy.rb
Overview
Raised by GeneratorVerifier#invoke when +raise_if_untrusted: true+ and the pipeline's combined confidence score falls below the configured threshold.
Instance Attribute Summary collapse
-
#result ⇒ Phronomy::GeneratorVerifier::Result
readonly
The untrusted result.
Instance Method Summary collapse
-
#initialize(result) ⇒ LowConfidenceError
constructor
A new instance of LowConfidenceError.
Constructor Details
#initialize(result) ⇒ LowConfidenceError
Returns a new instance of LowConfidenceError.
38 39 40 41 |
# File 'lib/phronomy.rb', line 38 def initialize(result) @result = result super("Answer confidence #{result.confidence} is below the required threshold") end |
Instance Attribute Details
#result ⇒ Phronomy::GeneratorVerifier::Result (readonly)
Returns the untrusted result.
36 37 38 |
# File 'lib/phronomy.rb', line 36 def result @result end |