Class: OpenAI::Models::Beta::ChatKit::ChatKitThreadAssistantMessageItem

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

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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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 ⇒ ChatKitThreadAssistantMessageItem

Returns a new instance of ChatKitThreadAssistantMessageItem.

Parameters:

  • id —

    Identifier of the thread item.

  • content —

    Ordered assistant response segments.

  • created_at —

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

  • thread_id —

    Identifier of the parent thread.

  • object —

    Type discriminator that is always chatkit.thread_item.

  • type —

    Type discriminator that is always chatkit.assistant_message.

  • id: (String)
  • content: (::Array[OpenAI::Beta::ChatKit::ChatKitResponseOutputText])
  • created_at: (Integer)
  • thread_id: (String)
  • object: (:"chatkit.thread_item")
  • type: (:"chatkit.assistant_message")


48
49
50
51
52
53
54
55
# File 'sig/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rbs', line 48

def initialize: (
  id: String,
  content: ::Array[OpenAI::Beta::ChatKit::ChatKitResponseOutputText],
  created_at: Integer,
  thread_id: String,
  ?object: :"chatkit.thread_item",
  ?type: :"chatkit.assistant_message"
) -> void

Instance Attribute Details

#content ⇒ ::Array[OpenAI::Beta::ChatKit::ChatKitResponseOutputText]

Ordered assistant response segments.

Returns:

  • (::Array[OpenAI::Beta::ChatKit::ChatKitResponseOutputText])


18
19
20
21
# File 'lib/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rb', line 18

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

#created_at ⇒ Integer

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

Returns:

  • (Integer)


27
# File 'lib/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rb', line 27

required :created_at, Integer

#id ⇒ String

Identifier of the thread item.

Returns:

  • (String)


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

required :id, String

#object ⇒ :"chatkit.thread_item"

Type discriminator that is always chatkit.thread_item.

Returns:

  • (:"chatkit.thread_item")


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

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

#thread_id ⇒ String

Identifier of the parent thread.

Returns:

  • (String)


39
# File 'lib/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rb', line 39

required :thread_id, String

#type ⇒ :"chatkit.assistant_message"

Type discriminator that is always chatkit.assistant_message.

Returns:

  • (:"chatkit.assistant_message")


45
# File 'lib/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rb', line 45

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

Instance Method Details

#to_hash ⇒ { id: String, content: ::Array[OpenAI::Beta::ChatKit::ChatKitResponseOutputText], created_at: Integer, ?object: :"chatkit.thread_item", thread_id: String, ?type: :"chatkit.assistant_message" }

Returns:

  • ({ id: String, content: ::Array[OpenAI::Beta::ChatKit::ChatKitResponseOutputText], created_at: Integer, ?object: :"chatkit.thread_item", thread_id: String, ?type: :"chatkit.assistant_message" })


57
58
59
60
61
62
63
64
# File 'sig/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rbs', line 57

def to_hash: -> {
  id: String,
  content: ::Array[OpenAI::Beta::ChatKit::ChatKitResponseOutputText],
  created_at: Integer,
  ?object: :"chatkit.thread_item",
  thread_id: String,
  ?type: :"chatkit.assistant_message"
}