Class: RubyLLM::Test::CompleteParameters
- Inherits:
-
Object
- Object
- RubyLLM::Test::CompleteParameters
- Defined in:
- lib/ruby_llm/test/complete_parameters.rb
Overview
This class encapsulates all the parameters that are passed to the ‘complete` method of the `Test` class. It serves as a structured way to manage and access these parameters throughout the testing process.
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
-
#temperature ⇒ Object
readonly
Returns the value of attribute temperature.
-
#thinking ⇒ Object
readonly
Returns the value of attribute thinking.
-
#tool_prefs ⇒ Object
readonly
Returns the value of attribute tool_prefs.
-
#tools ⇒ Object
readonly
Returns the value of attribute tools.
Instance Method Summary collapse
- #block_received? ⇒ Boolean
-
#initialize(messages:, tools:, temperature:, model:, params:, headers:, schema:, thinking:, tool_prefs:, block:) ⇒ CompleteParameters
constructor
rubocop:disable Metrics/ParameterLists.
Constructor Details
#initialize(messages:, tools:, temperature:, model:, params:, headers:, schema:, thinking:, tool_prefs:, block:) ⇒ CompleteParameters
rubocop:disable Metrics/ParameterLists
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 10 def initialize(messages:, tools:, temperature:, model:, params:, # rubocop:disable Metrics/ParameterLists headers:, schema:, thinking:, tool_prefs:, block:) @messages = @tools = tools @temperature = temperature @model = model @params = params @headers = headers @schema = schema @thinking = thinking @tool_prefs = tool_prefs @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
8 9 10 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8 def block @block end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
8 9 10 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8 def headers @headers end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
8 9 10 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8 def @messages end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
8 9 10 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8 def model @model end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
8 9 10 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8 def params @params end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
8 9 10 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8 def schema @schema end |
#temperature ⇒ Object (readonly)
Returns the value of attribute temperature.
8 9 10 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8 def temperature @temperature end |
#thinking ⇒ Object (readonly)
Returns the value of attribute thinking.
8 9 10 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8 def thinking @thinking end |
#tool_prefs ⇒ Object (readonly)
Returns the value of attribute tool_prefs.
8 9 10 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8 def tool_prefs @tool_prefs end |
#tools ⇒ Object (readonly)
Returns the value of attribute tools.
8 9 10 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8 def tools @tools end |
Instance Method Details
#block_received? ⇒ Boolean
24 25 26 |
# File 'lib/ruby_llm/test/complete_parameters.rb', line 24 def block_received? !@block.nil? end |