Class: OpenAI::Model::ListData
- Inherits:
-
Object
- Object
- OpenAI::Model::ListData
- Defined in:
- lib/openai/models/list_data.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#data ⇒ Array[Assistant]
readonly
List assistants.
-
#first_id ⇒ String
readonly
First id.
-
#has_more ⇒ bool
readonly
Has more.
-
#last_id ⇒ String
readonly
Last id.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ ListData
constructor
A new instance of ListData.
- #parse_data(value) ⇒ Object
Constructor Details
#initialize(attributes) ⇒ ListData
Returns a new instance of ListData.
16 17 18 19 20 |
# File 'lib/openai/models/list_data.rb', line 16 def initialize(attributes) attributes.each do |key, value| instance_variable_set("@#{key}", key == 'data' ? parse_data(value) : value) end end |
Instance Attribute Details
#data ⇒ Array[Assistant] (readonly)
Returns List assistants.
5 6 7 |
# File 'lib/openai/models/list_data.rb', line 5 def data @data end |
#first_id ⇒ String (readonly)
Returns first id.
8 9 10 |
# File 'lib/openai/models/list_data.rb', line 8 def first_id @first_id end |
#has_more ⇒ bool (readonly)
Returns has more.
14 15 16 |
# File 'lib/openai/models/list_data.rb', line 14 def has_more @has_more end |
#last_id ⇒ String (readonly)
Returns last id.
11 12 13 |
# File 'lib/openai/models/list_data.rb', line 11 def last_id @last_id end |
Instance Method Details
#parse_data(value) ⇒ Object
22 23 |
# File 'lib/openai/models/list_data.rb', line 22 def parse_data(value) end |