Class: OpenAI::Models::Beta::ChatKit::ChatKitAttachment

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/chatkit/chatkit_attachment.rb,
sig/openai/models/beta/chatkit/chatkit_attachment.rbs

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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:, type:) ⇒ Object

Parameters:

  • id —

    Identifier for the attachment.

  • mime_type —

    MIME type of the attachment.

  • name —

    Original display name for the attachment.

  • preview_url —

    Preview URL for rendering the attachment inline.

  • type —

    Attachment discriminator.



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

Instance Attribute Details

#id ⇒ String

Identifier for the attachment.

Returns:

  • (String)


12
# File 'lib/openai/models/beta/chatkit/chatkit_attachment.rb', line 12

required :id, String

#mime_type ⇒ String

MIME type of the attachment.

Returns:

  • (String)


18
# File 'lib/openai/models/beta/chatkit/chatkit_attachment.rb', line 18

required :mime_type, String

#name ⇒ String

Original display name for the attachment.

Returns:

  • (String)


24
# File 'lib/openai/models/beta/chatkit/chatkit_attachment.rb', line 24

required :name, String

#preview_url ⇒ String?

Preview URL for rendering the attachment inline.

Returns:

  • (String, nil)


30
# File 'lib/openai/models/beta/chatkit/chatkit_attachment.rb', line 30

required :preview_url, String, nil?: true

#type ⇒ OpenAI::Models::Beta::ChatKit::ChatKitAttachment::type_

Attachment discriminator.

Returns:

  • (OpenAI::Models::Beta::ChatKit::ChatKitAttachment::type_)


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

required :type, enum: -> { OpenAI::Beta::ChatKit::ChatKitAttachment::Type }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


50
# File 'sig/openai/models/beta/chatkit/chatkit_attachment.rbs', line 50

def to_hash: -> {