Class: LLM::Response::ModelList

Inherits:
LLM::Response show all
Includes:
Enumerable
Defined in:
lib/llm/response/modellist.rb

Overview

The LLM::Response::ModelList class represents a list of model objects that are returned by a provider. It is an Enumerable object, and can be used to iterate over the model objects in a way that is similar to an array. Each element is an instance of OpenStruct.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LLM::Response

#body, #initialize

Constructor Details

This class inherits a constructor from LLM::Response

Instance Attribute Details

#modelsObject

Returns the value of attribute models.



12
13
14
# File 'lib/llm/response/modellist.rb', line 12

def models
  @models
end

Instance Method Details

#eachObject



14
15
16
# File 'lib/llm/response/modellist.rb', line 14

def each(&)
  @models.each(&)
end