Class: MistralModels::ModelListResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/mistral_rb/response_models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (readonly)

Returns the value of attribute data.



56
57
58
# File 'lib/mistral_rb/response_models.rb', line 56

def data
  @data
end

#objectObject (readonly)

Returns the value of attribute object.



56
57
58
# File 'lib/mistral_rb/response_models.rb', line 56

def object
  @object
end