Class: OpenAI::Models::Realtime::RealtimeConversationItemUserMessage

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/realtime_conversation_item_user_message.rb,
sig/openai/models/realtime/realtime_conversation_item_user_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

#initializeObject

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 user.

  • type

    The type of the item. Always message.



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

def initialize: (

Instance Attribute Details

#content::Array[OpenAI::Realtime::RealtimeConversationItemUserMessage::Content]

The content of the message.

Returns:

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


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

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

#idString?

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_user_message.rb', line 33

optional :id, String

#objectOpenAI::Models::Realtime::RealtimeConversationItemUserMessage::object?

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

Returns:

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


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

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

#role:user

The role of the message sender. Always user.

Returns:

  • (:user)


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

required :role, const: :user

#statusOpenAI::Models::Realtime::RealtimeConversationItemUserMessage::status?

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

Returns:

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


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

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

#type:message

The type of the item. Always message.

Returns:

  • (:message)


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

required :type, const: :message

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/realtime/realtime_conversation_item_user_message.rb', line 163

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {