Class: OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb,
sig/openai/models/realtime/realtime_conversation_item_assistant_message.rbs

Defined Under Namespace

Modules: Object, Status Classes: Content

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 ⇒ Object

Parameters:

  • content —

    The content of the message.

  • id —

    The unique ID of the item. This may be provided by the client or generated by the server.

  • object —

    Identifier for the API object being returned - always realtime.item. Optional when creating a new item.

  • status —

    The status of the item. Has no effect on the conversation.

  • role —

    The role of the message sender. Always assistant.

  • type —

    The type of the item. Always message.



64
# File 'sig/openai/models/realtime/realtime_conversation_item_assistant_message.rbs', line 64

def initialize: (

Instance Attribute Details

#content ⇒ ::Array[OpenAI::Realtime::RealtimeConversationItemAssistantMessage::Content]

The content of the message.

Returns:

  • (::Array[OpenAI::Realtime::RealtimeConversationItemAssistantMessage::Content])


11
12
13
14
# File 'lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb', line 11

required(
  :content,
  -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Realtime::RealtimeConversationItemAssistantMessage::Content] }
)

#id ⇒ String?

The unique ID of the item. This may be provided by the client or generated by the server.

Returns:

  • (String, nil)


33
# File 'lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb', line 33

optional :id, String

#object ⇒ OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage::object?

Identifier for the API object being returned - always realtime.item. Optional when creating a new item.

Returns:

  • (OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage::object, nil)


40
# File 'lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb', line 40

optional :object, enum: -> { OpenAI::Realtime::RealtimeConversationItemAssistantMessage::Object }

#role ⇒ :assistant

The role of the message sender. Always assistant.

Returns:

  • (:assistant)


20
# File 'lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb', line 20

required :role, const: :assistant

#status ⇒ OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage::status?

The status of the item. Has no effect on the conversation.

Returns:

  • (OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage::status, nil)


46
# File 'lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb', line 46

optional :status, enum: -> { OpenAI::Realtime::RealtimeConversationItemAssistantMessage::Status }

#type ⇒ :message

The type of the item. Always message.

Returns:

  • (:message)


26
# File 'lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb', line 26

required :type, const: :message

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb', line 126

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


73
# File 'sig/openai/models/realtime/realtime_conversation_item_assistant_message.rbs', line 73

def to_hash: -> {