Class: OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Content

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

Defined Under Namespace

Modules: Type

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

Parameters:

  • text (defaults to: nil) —

    The text content.

  • type (defaults to: nil) —

    The content type. Always input_text for system messages.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/openai/models/realtime/realtime_conversation_item_system_message.rb', line 75

class Content < OpenAI::Internal::Type::BaseModel
  # @!attribute text
  #   The text content.
  #
  #   @return [String, nil]
  optional :text, String

  # @!attribute type
  #   The content type. Always `input_text` for system messages.
  #
  #   @return [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Content::Type, nil]
  optional :type, enum: -> { OpenAI::Realtime::RealtimeConversationItemSystemMessage::Content::Type }

  # @!method initialize(text: nil, type: nil)
  #   @param text [String]
  #     The text content.
  #
  #   @param type [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Content::Type]
  #     The content type. Always `input_text` for system messages.

  # The content type. Always `input_text` for system messages.
  #
  # @see OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Content#type
  module Type
    extend OpenAI::Internal::Type::Enum

    INPUT_TEXT = :input_text

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#text ⇒ String?

The text content.

Returns:

  • (String, nil)


80
# File 'lib/openai/models/realtime/realtime_conversation_item_system_message.rb', line 80

optional :text, String

#type ⇒ OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Content::type_?

The content type. Always input_text for system messages.

Returns:

  • (OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Content::type_, nil)


86
# File 'lib/openai/models/realtime/realtime_conversation_item_system_message.rb', line 86

optional :type, enum: -> { OpenAI::Realtime::RealtimeConversationItemSystemMessage::Content::Type }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


112
# File 'sig/openai/models/realtime/realtime_conversation_item_system_message.rbs', line 112

def to_hash: -> {