Class: OpenAI::Models::Beta::FilePart

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

Instance Attribute 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, meta_info, new_coerce_state, 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: , mime_type: , name: , upload_url: , type: :file) ⇒ Object

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

Metadata for a non-image file uploaded through ChatKit.

Parameters:

  • id (String) (defaults to: )

    Unique identifier for the uploaded file.

  • mime_type (String, nil) (defaults to: )

    MIME type reported for the uploaded file. Defaults to null when unknown.

  • name (String, nil) (defaults to: )

    Original filename supplied by the uploader. Defaults to null when unnamed.

  • upload_url (String, nil) (defaults to: )

    Signed URL for downloading the uploaded file. Defaults to null when no download

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

    Type discriminator that is always ‘file`.



# File 'lib/openai/models/beta/file_part.rb', line 38

Instance Attribute Details

#idString

Unique identifier for the uploaded file.

Returns:

  • (String)


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

required :id, String

#mime_typeString?

MIME type reported for the uploaded file. Defaults to null when unknown.

Returns:

  • (String, nil)


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

required :mime_type, String, nil?: true

#nameString?

Original filename supplied by the uploader. Defaults to null when unnamed.

Returns:

  • (String, nil)


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

required :name, String, nil?: true

#typeSymbol, :file

Type discriminator that is always ‘file`.

Returns:

  • (Symbol, :file)


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

required :type, const: :file

#upload_urlString?

Signed URL for downloading the uploaded file. Defaults to null when no download link is available.

Returns:

  • (String, nil)


36
# File 'lib/openai/models/beta/file_part.rb', line 36

required :upload_url, String, nil?: true