Class: MistralModels::ModelListResponse
- Inherits:
-
Object
- Object
- MistralModels::ModelListResponse
- Defined in:
- lib/mistral_rb/response_models.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(response_hash) ⇒ ModelListResponse
constructor
A new instance of ModelListResponse.
Constructor Details
#initialize(response_hash) ⇒ ModelListResponse
Returns a new instance of ModelListResponse.
58 59 60 61 |
# File 'lib/mistral_rb/response_models.rb', line 58 def initialize(response_hash) @object = response_hash["object"] @data = response_hash["data"].map { |model_data| Model.new(model_data) } end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
56 57 58 |
# File 'lib/mistral_rb/response_models.rb', line 56 def data @data end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
56 57 58 |
# File 'lib/mistral_rb/response_models.rb', line 56 def object @object end |