Class: RubyLLM::Contract::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- RubyLLM::Contract::RakeTask
- Defined in:
- lib/ruby_llm/contract/rake_task.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#eval_dirs ⇒ Object
Returns the value of attribute eval_dirs.
-
#fail_on_empty ⇒ Object
Returns the value of attribute fail_on_empty.
-
#fail_on_regression ⇒ Object
Returns the value of attribute fail_on_regression.
-
#maximum_cost ⇒ Object
Returns the value of attribute maximum_cost.
-
#minimum_score ⇒ Object
Returns the value of attribute minimum_score.
-
#name ⇒ Object
Returns the value of attribute name.
-
#save_baseline ⇒ Object
Returns the value of attribute save_baseline.
-
#track_history ⇒ Object
Returns the value of attribute track_history.
Instance Method Summary collapse
-
#initialize(name = :"ruby_llm_contract:eval", &block) ⇒ RakeTask
constructor
A new instance of RakeTask.
Constructor Details
#initialize(name = :"ruby_llm_contract:eval", &block) ⇒ RakeTask
Returns a new instance of RakeTask.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ruby_llm/contract/rake_task.rb', line 12 def initialize(name = :"ruby_llm_contract:eval", &block) super() @name = name @context = {} @fail_on_empty = true @minimum_score = nil # nil = require 100%; float = threshold @maximum_cost = nil # nil = no cost limit; float = budget cap (suite-level) @eval_dirs = [] # directories to load eval files from (non-Rails) @save_baseline = false @fail_on_regression = false @track_history = false block&.call(self) define_task end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
9 10 11 |
# File 'lib/ruby_llm/contract/rake_task.rb', line 9 def context @context end |
#eval_dirs ⇒ Object
Returns the value of attribute eval_dirs.
9 10 11 |
# File 'lib/ruby_llm/contract/rake_task.rb', line 9 def eval_dirs @eval_dirs end |
#fail_on_empty ⇒ Object
Returns the value of attribute fail_on_empty.
9 10 11 |
# File 'lib/ruby_llm/contract/rake_task.rb', line 9 def fail_on_empty @fail_on_empty end |
#fail_on_regression ⇒ Object
Returns the value of attribute fail_on_regression.
9 10 11 |
# File 'lib/ruby_llm/contract/rake_task.rb', line 9 def fail_on_regression @fail_on_regression end |
#maximum_cost ⇒ Object
Returns the value of attribute maximum_cost.
9 10 11 |
# File 'lib/ruby_llm/contract/rake_task.rb', line 9 def maximum_cost @maximum_cost end |
#minimum_score ⇒ Object
Returns the value of attribute minimum_score.
9 10 11 |
# File 'lib/ruby_llm/contract/rake_task.rb', line 9 def minimum_score @minimum_score end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/ruby_llm/contract/rake_task.rb', line 9 def name @name end |
#save_baseline ⇒ Object
Returns the value of attribute save_baseline.
9 10 11 |
# File 'lib/ruby_llm/contract/rake_task.rb', line 9 def save_baseline @save_baseline end |
#track_history ⇒ Object
Returns the value of attribute track_history.
9 10 11 |
# File 'lib/ruby_llm/contract/rake_task.rb', line 9 def track_history @track_history end |