Class: RubricLLM::RSpecMatchers::BaseMatcher
- Inherits:
-
Object
- Object
- RubricLLM::RSpecMatchers::BaseMatcher
- Defined in:
- lib/rubric_llm/rspec.rb
Direct Known Subclasses
CorrectnessMatcher, FaithfulnessMatcher, HallucinationMatcher, RelevanceMatcher
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#threshold ⇒ Object
readonly
Returns the value of attribute threshold.
Instance Method Summary collapse
-
#initialize ⇒ BaseMatcher
constructor
A new instance of BaseMatcher.
- #with_config(value) ⇒ Object
- #with_threshold(value) ⇒ Object
Constructor Details
#initialize ⇒ BaseMatcher
Returns a new instance of BaseMatcher.
26 27 28 29 |
# File 'lib/rubric_llm/rspec.rb', line 26 def initialize @threshold = 0.8 @config = RubricLLM.config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
24 25 26 |
# File 'lib/rubric_llm/rspec.rb', line 24 def config @config end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
24 25 26 |
# File 'lib/rubric_llm/rspec.rb', line 24 def result @result end |
#threshold ⇒ Object (readonly)
Returns the value of attribute threshold.
24 25 26 |
# File 'lib/rubric_llm/rspec.rb', line 24 def threshold @threshold end |
Instance Method Details
#with_config(value) ⇒ Object
36 37 38 39 |
# File 'lib/rubric_llm/rspec.rb', line 36 def with_config(value) @config = value self end |
#with_threshold(value) ⇒ Object
31 32 33 34 |
# File 'lib/rubric_llm/rspec.rb', line 31 def with_threshold(value) @threshold = value self end |