Class: OpenAI::Models::FileObject

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/file_object.rb

Overview

Defined Under Namespace

Modules: Purpose, Status

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id: , bytes: , created_at: , filename: , purpose: , status: , expires_at: nil, status_details: nil, object: :file) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::FileObject for more details.

The ‘File` object represents a document that has been uploaded to OpenAI.

Parameters:

  • id (String) (defaults to: )

    The file identifier, which can be referenced in the API endpoints.

  • bytes (Integer) (defaults to: )

    The size of the file, in bytes.

  • created_at (Integer) (defaults to: )

    The Unix timestamp (in seconds) for when the file was created.

  • filename (String) (defaults to: )

    The name of the file.

  • purpose (Symbol, OpenAI::Models::FileObject::Purpose) (defaults to: )

    The intended purpose of the file. Supported values are ‘assistants`, `assistants

  • status (Symbol, OpenAI::Models::FileObject::Status) (defaults to: )

    Deprecated. The current status of the file, which can be either ‘uploaded`, `pro

  • expires_at (Integer) (defaults to: nil)

    The Unix timestamp (in seconds) for when the file will expire.

  • status_details (String) (defaults to: nil)

    Deprecated. For details on why a fine-tuning training file failed validation, se

  • object (Symbol, :file) (defaults to: :file)

    The object type, which is always ‘file`.



# File 'lib/openai/models/file_object.rb', line 69

Instance Attribute Details

#bytesInteger

The size of the file, in bytes.

Returns:

  • (Integer)


17
# File 'lib/openai/models/file_object.rb', line 17

required :bytes, Integer

#created_atInteger

The Unix timestamp (in seconds) for when the file was created.

Returns:

  • (Integer)


23
# File 'lib/openai/models/file_object.rb', line 23

required :created_at, Integer

#expires_atInteger?

The Unix timestamp (in seconds) for when the file will expire.

Returns:

  • (Integer, nil)


58
# File 'lib/openai/models/file_object.rb', line 58

optional :expires_at, Integer

#filenameString

The name of the file.

Returns:

  • (String)


29
# File 'lib/openai/models/file_object.rb', line 29

required :filename, String

#idString

The file identifier, which can be referenced in the API endpoints.

Returns:

  • (String)


11
# File 'lib/openai/models/file_object.rb', line 11

required :id, String

#objectSymbol, :file

The object type, which is always ‘file`.

Returns:

  • (Symbol, :file)


35
# File 'lib/openai/models/file_object.rb', line 35

required :object, const: :file

#purposeSymbol, OpenAI::Models::FileObject::Purpose

The intended purpose of the file. Supported values are ‘assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.



43
# File 'lib/openai/models/file_object.rb', line 43

required :purpose, enum: -> { OpenAI::FileObject::Purpose }

#statusSymbol, OpenAI::Models::FileObject::Status

Deprecated.

Deprecated. The current status of the file, which can be either ‘uploaded`, `processed`, or `error`.



52
# File 'lib/openai/models/file_object.rb', line 52

required :status, enum: -> { OpenAI::FileObject::Status }

#status_detailsString?

Deprecated.

Deprecated. For details on why a fine-tuning training file failed validation, see the ‘error` field on `fine_tuning.job`.

Returns:

  • (String, nil)


67
# File 'lib/openai/models/file_object.rb', line 67

optional :status_details, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/file_object.rb', line 109