Class: TestOpenai::File

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

Overview

The file object used by OpenAI API

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bytesInteger

Returns Size of the file in bytes.

Returns:

  • (Integer)

    Size of the file in bytes.



20
21
22
# File 'lib/models.rb', line 20

def bytes
  @bytes
end

#created_atInteger

Returns Timestamp in seconds of creation time of the file.

Returns:

  • (Integer)

    Timestamp in seconds of creation time of the file.



22
23
24
# File 'lib/models.rb', line 22

def created_at
  @created_at
end

#filenameString

Returns Original filename.

Returns:

  • (String)

    Original filename.



18
19
20
# File 'lib/models.rb', line 18

def filename
  @filename
end

#idString

Returns The id of the data.

Returns:

  • (String)

    The id of the data.



14
15
16
# File 'lib/models.rb', line 14

def id
  @id
end

#objectString

Returns Type of the data. Always: ‘file’.

Returns:

  • (String)

    Type of the data. Always: ‘file’.



12
13
14
# File 'lib/models.rb', line 12

def object
  @object
end

#purposeString

Returns The purpose of the data.

Returns:

  • (String)

    The purpose of the data.



16
17
18
# File 'lib/models.rb', line 16

def purpose
  @purpose
end