Class: OpenAI::Models::Beta::ImagePart

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/image_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: , preview_url: , upload_url: , type: :image) ⇒ Object

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

Metadata for an image uploaded through ChatKit.

Parameters:

  • id (String) (defaults to: )

    Unique identifier for the uploaded image.

  • mime_type (String) (defaults to: )

    MIME type of the uploaded image.

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

    Original filename for the uploaded image. Defaults to null when unnamed.

  • preview_url (String) (defaults to: )

    Preview URL that can be rendered inline for the image.

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

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

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

    Type discriminator that is always ‘image`.



# File 'lib/openai/models/beta/image_part.rb', line 44

Instance Attribute Details

#idString

Unique identifier for the uploaded image.

Returns:

  • (String)


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

required :id, String

#mime_typeString

MIME type of the uploaded image.

Returns:

  • (String)


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

required :mime_type, String

#nameString?

Original filename for the uploaded image. Defaults to null when unnamed.

Returns:

  • (String, nil)


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

required :name, String, nil?: true

#preview_urlString

Preview URL that can be rendered inline for the image.

Returns:

  • (String)


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

required :preview_url, String

#typeSymbol, :image

Type discriminator that is always ‘image`.

Returns:

  • (Symbol, :image)


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

required :type, const: :image

#upload_urlString?

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

Returns:

  • (String, nil)


42
# File 'lib/openai/models/beta/image_part.rb', line 42

required :upload_url, String, nil?: true