Class: OpenAI::Models::Beta::ChatKit::ChatKitThreadUserMessageItem

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

Defined Under Namespace

Modules: Content Classes: InferenceOptions

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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

Quoted snippet that the user referenced in their message.

Parameters:

  • text (String)

    Quoted text content.

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

    Type discriminator that is always quoted_text.



# File 'lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb', line 62

Instance Attribute Details

#attachmentsArray<OpenAI::Models::Beta::ChatKit::ChatKitAttachment>

Attachments associated with the user message. Defaults to an empty list.

Parameters:

  • value (::Array[OpenAI::Beta::ChatKit::ChatKitAttachment])

Returns:



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

required :attachments, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::ChatKit::ChatKitAttachment] }

#contentArray<OpenAI::Models::Beta::ChatKit::ChatKitThreadUserMessageItem::Content::InputText, OpenAI::Models::Beta::ChatKit::ChatKitThreadUserMessageItem::Content::QuotedText>

Ordered content elements supplied by the user.

Parameters:

  • value (::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadUserMessageItem::content])

Returns:



24
25
26
27
# File 'lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb', line 24

required(
  :content,
  -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::ChatKit::ChatKitThreadUserMessageItem::Content] }
)

#created_atInteger

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

Parameters:

  • value (Integer)

Returns:

  • (Integer)


33
# File 'lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb', line 33

required :created_at, Integer

#idString

Identifier of the thread item.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#inference_optionsOpenAI::Models::Beta::ChatKit::ChatKitThreadUserMessageItem::InferenceOptions?

Inference overrides applied to the message. Defaults to null when unset.

Parameters:

  • value (OpenAI::Beta::ChatKit::ChatKitThreadUserMessageItem::InferenceOptions, nil)

Returns:



39
40
41
42
43
# File 'lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb', line 39

required(
  :inference_options,
  -> { OpenAI::Beta::ChatKit::ChatKitThreadUserMessageItem::InferenceOptions },
  nil?: true
)

#objectSymbol, :"chatkit.thread_item"

Type discriminator that is always chatkit.thread_item.

Parameters:

  • value (:"chatkit.thread_item")

Returns:

  • (Symbol, :"chatkit.thread_item")


49
# File 'lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb', line 49

required :object, const: :"chatkit.thread_item"

#thread_idString

Identifier of the parent thread.

Parameters:

  • value (String)

Returns:

  • (String)


55
# File 'lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb', line 55

required :thread_id, String

#typeSymbol, :"chatkit.user_message"

Parameters:

  • value (:"chatkit.user_message")

Returns:

  • (Symbol, :"chatkit.user_message")


60
# File 'lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb', line 60

required :type, const: :"chatkit.user_message"

Instance Method Details

#to_hash{

Returns:

  • ({)


47
# File 'sig/openai/models/beta/chatkit/chatkit_thread_user_message_item.rbs', line 47

def to_hash: -> {