Class: RubyLLM::Contract::Step::RunnerConfig
- Inherits:
-
Data
- Object
- Data
- RubyLLM::Contract::Step::RunnerConfig
- Defined in:
- lib/ruby_llm/contract/step/runner_config.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#contract_definition ⇒ Object
readonly
Returns the value of attribute contract_definition.
-
#extra_options ⇒ Object
readonly
Returns the value of attribute extra_options.
-
#input_type ⇒ Object
readonly
Returns the value of attribute input_type.
-
#max_cost ⇒ Object
readonly
Returns the value of attribute max_cost.
-
#max_input ⇒ Object
readonly
Returns the value of attribute max_input.
-
#max_output ⇒ Object
readonly
Returns the value of attribute max_output.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#observers ⇒ Object
readonly
Returns the value of attribute observers.
-
#on_unknown_pricing ⇒ Object
readonly
Returns the value of attribute on_unknown_pricing.
-
#output_schema ⇒ Object
readonly
Returns the value of attribute output_schema.
-
#output_type ⇒ Object
readonly
Returns the value of attribute output_type.
-
#prompt_block ⇒ Object
readonly
Returns the value of attribute prompt_block.
-
#temperature ⇒ Object
readonly
Returns the value of attribute temperature.
Instance Method Summary collapse
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def adapter @adapter end |
#contract_definition ⇒ Object (readonly)
Returns the value of attribute contract_definition
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def contract_definition @contract_definition end |
#extra_options ⇒ Object (readonly)
Returns the value of attribute extra_options
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def @extra_options end |
#input_type ⇒ Object (readonly)
Returns the value of attribute input_type
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def input_type @input_type end |
#max_cost ⇒ Object (readonly)
Returns the value of attribute max_cost
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def max_cost @max_cost end |
#max_input ⇒ Object (readonly)
Returns the value of attribute max_input
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def max_input @max_input end |
#max_output ⇒ Object (readonly)
Returns the value of attribute max_output
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def max_output @max_output end |
#model ⇒ Object (readonly)
Returns the value of attribute model
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def model @model end |
#observers ⇒ Object (readonly)
Returns the value of attribute observers
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def observers @observers end |
#on_unknown_pricing ⇒ Object (readonly)
Returns the value of attribute on_unknown_pricing
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def on_unknown_pricing @on_unknown_pricing end |
#output_schema ⇒ Object (readonly)
Returns the value of attribute output_schema
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def output_schema @output_schema end |
#output_type ⇒ Object (readonly)
Returns the value of attribute output_type
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def output_type @output_type end |
#prompt_block ⇒ Object (readonly)
Returns the value of attribute prompt_block
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def prompt_block @prompt_block end |
#temperature ⇒ Object (readonly)
Returns the value of attribute temperature
6 7 8 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 6 def temperature @temperature end |
Instance Method Details
#adapter_options ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 26 def { model: model }.tap do || [:schema] = output_schema if output_schema [:max_tokens] = effective_max_output if effective_max_output [:temperature] = temperature if temperature .each { |key, value| [key] = value unless .key?(key) } end end |
#effective_max_output ⇒ Object
22 23 24 |
# File 'lib/ruby_llm/contract/step/runner_config.rb', line 22 def effective_max_output [:max_tokens] || max_output end |