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

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

Defined Under Namespace

Modules: Type

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:, type:) ⇒ Object

Attachment metadata included on thread items.

Parameters:

  • id (String)

    Identifier for the attachment.

  • mime_type (String)

    MIME type of the attachment.

  • name (String)

    Original display name for the attachment.

  • preview_url (String, nil)

    Preview URL for rendering the attachment inline.

  • type (Symbol, OpenAI::Models::Beta::ChatKit::ChatKitAttachment::Type)

    Attachment discriminator.



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

Instance Attribute Details

#idString

Identifier for the attachment.

Returns:

  • (String)


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

required :id, String

#mime_typeString

MIME type of the attachment.

Returns:

  • (String)


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

required :mime_type, String

#nameString

Original display name for the attachment.

Returns:

  • (String)


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

required :name, String

#preview_urlString?

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

#typeSymbol, OpenAI::Models::Beta::ChatKit::ChatKitAttachment::Type

Attachment discriminator.



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

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