Class: RubyLLM::Test::CompleteParameters

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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 = 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

#blockObject (readonly)

Returns the value of attribute block.



8
9
10
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8

def block
  @block
end

#headersObject (readonly)

Returns the value of attribute headers.



8
9
10
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8

def headers
  @headers
end

#messagesObject (readonly)

Returns the value of attribute messages.



8
9
10
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8

def messages
  @messages
end

#modelObject (readonly)

Returns the value of attribute model.



8
9
10
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8

def model
  @model
end

#paramsObject (readonly)

Returns the value of attribute params.



8
9
10
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8

def params
  @params
end

#schemaObject (readonly)

Returns the value of attribute schema.



8
9
10
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8

def schema
  @schema
end

#temperatureObject (readonly)

Returns the value of attribute temperature.



8
9
10
# File 'lib/ruby_llm/test/complete_parameters.rb', line 8

def temperature
  @temperature
end

#thinkingObject (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_prefsObject (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

#toolsObject (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

Returns:

  • (Boolean)


24
25
26
# File 'lib/ruby_llm/test/complete_parameters.rb', line 24

def block_received?
  !@block.nil?
end