Class: TestOpenai::File
- Inherits:
-
Object
- Object
- TestOpenai::File
- Defined in:
- lib/models.rb
Overview
The file object used by OpenAI API
Instance Attribute Summary collapse
-
#bytes ⇒ Integer
Size of the file in bytes.
-
#created_at ⇒ Integer
Timestamp in seconds of creation time of the file.
-
#filename ⇒ String
Original filename.
-
#id ⇒ String
The id of the data.
-
#object ⇒ String
Type of the data.
-
#purpose ⇒ String
The purpose of the data.
Instance Method Summary collapse
-
#initialize(**args) ⇒ File
constructor
A new instance of File.
Constructor Details
#initialize(**args) ⇒ File
Returns a new instance of File.
24 25 26 27 28 29 30 31 |
# File 'lib/models.rb', line 24 def initialize(**args) @object = args[:object] @id = args[:id] @purpose = args[:purpose] @filename = args[:filename] @bytes = args[:bytes] @created_at = args[:created_at] end |
Instance Attribute Details
#bytes ⇒ Integer
Returns Size of the file in bytes.
20 21 22 |
# File 'lib/models.rb', line 20 def bytes @bytes end |
#created_at ⇒ Integer
Returns Timestamp in seconds of creation time of the file.
22 23 24 |
# File 'lib/models.rb', line 22 def created_at @created_at end |
#filename ⇒ String
Returns Original filename.
18 19 20 |
# File 'lib/models.rb', line 18 def filename @filename end |
#id ⇒ String
Returns The id of the data.
14 15 16 |
# File 'lib/models.rb', line 14 def id @id end |
#object ⇒ String
Returns Type of the data. Always: ‘file’.
12 13 14 |
# File 'lib/models.rb', line 12 def object @object end |
#purpose ⇒ String
Returns The purpose of the data.
16 17 18 |
# File 'lib/models.rb', line 16 def purpose @purpose end |