Class: Telnyx::Models::Calls::ActionGatherUsingAIParams::MessageHistory

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/calls/action_gather_using_ai_params.rb,
sig/telnyx/models/calls/action_gather_using_ai_params.rbs

Defined Under Namespace

Modules: Role

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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(content: nil, role: nil) ⇒ Object

Parameters:



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/telnyx/models/calls/action_gather_using_ai_params.rb', line 196

class MessageHistory < Telnyx::Internal::Type::BaseModel
  # @!attribute content
  #   The content of the message
  #
  #   @return [String, nil]
  optional :content, String

  # @!attribute role
  #   The role of the message sender
  #
  #   @return [Symbol, Telnyx::Models::Calls::ActionGatherUsingAIParams::MessageHistory::Role, nil]
  optional :role, enum: -> { Telnyx::Calls::ActionGatherUsingAIParams::MessageHistory::Role }

  # @!method initialize(content: nil, role: nil)
  #   @param content [String] The content of the message
  #
  #   @param role [Symbol, Telnyx::Models::Calls::ActionGatherUsingAIParams::MessageHistory::Role] The role of the message sender

  # The role of the message sender
  #
  # @see Telnyx::Models::Calls::ActionGatherUsingAIParams::MessageHistory#role
  module Role
    extend Telnyx::Internal::Type::Enum

    ASSISTANT = :assistant
    USER = :user

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

Instance Attribute Details

#contentString?

The content of the message

Parameters:

  • (String)

Returns:

  • (String, nil)


201
# File 'lib/telnyx/models/calls/action_gather_using_ai_params.rb', line 201

optional :content, String

#roleSymbol, ...

The role of the message sender



207
# File 'lib/telnyx/models/calls/action_gather_using_ai_params.rb', line 207

optional :role, enum: -> { Telnyx::Calls::ActionGatherUsingAIParams::MessageHistory::Role }

Instance Method Details

#to_hash{

Returns:

  • ({)


161
# File 'sig/telnyx/models/calls/action_gather_using_ai_params.rbs', line 161

def to_hash: -> {