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

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

Overview

See Also:

  • Telnyx::Resources::Calls::Actions#gather_using_ai

Defined Under Namespace

Modules: VoiceSettings Classes: MessageHistory

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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

#initializeObject



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

def initialize: (

Instance Attribute Details

#assistantTelnyx::Models::AI::Assistant?

Assistant configuration including choice of LLM, custom instructions, and tools.

Parameters:

  • (Telnyx::AI::Assistant)

Returns:



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

optional :assistant, -> { Telnyx::AI::Assistant }

#call_control_idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :call_control_id, String

#client_stateString?

Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :client_state, String

#command_idString?

Use this field to avoid duplicate commands. Telnyx will ignore any command with the same command_id for the same call_control_id.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :command_id, String

#gather_ended_speechString?

Text that will be played when the gathering has finished. There is a 3,000 character limit.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :gather_ended_speech, String

#greetingString?

Text that will be played when the gathering starts, if none then nothing will be played when the gathering starts. The greeting can be text for any voice or SSML for AWS.Polly.<voice_id> voices. There is a 3,000 character limit.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :greeting, String

#interruption_settingsTelnyx::Models::Calls::InterruptionSettings?

Settings for handling user interruptions during assistant speech



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

optional :interruption_settings, -> { Telnyx::Calls::InterruptionSettings }

#languageSymbol, ...

Language to use for speech recognition



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

optional :language, enum: -> { Telnyx::Calls::GoogleTranscriptionLanguage }

#message_historyArray<Telnyx::Models::Calls::ActionGatherUsingAIParams::MessageHistory>?

The message history you want the voice assistant to be aware of, this can be useful to keep the context of the conversation, or to pass additional information to the voice assistant.



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

optional :message_history,
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::Calls::ActionGatherUsingAIParams::MessageHistory] }

#parametersHash{Symbol=>Object}

The parameters described as a JSON Schema object that needs to be gathered by the voice assistant. See the JSON Schema reference for documentation about the format

Parameters:

  • value (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object})


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

required :parameters, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]

#send_message_history_updatesBoolean?

Default is false. If set to true, the voice assistant will send updates to the message history via the call.ai_gather.message_history_updated callback in real time as the message history is updated.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


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

optional :send_message_history_updates, Telnyx::Internal::Type::Boolean

#send_partial_resultsBoolean?

Default is false. If set to true, the voice assistant will send partial results via the call.ai_gather.partial_results callback in real time as individual fields are gathered. If set to false, the voice assistant will only send the final result via the call.ai_gather.ended callback.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


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

optional :send_partial_results, Telnyx::Internal::Type::Boolean

#transcriptionTelnyx::Models::Calls::TranscriptionConfig?

The settings associated with speech to text for the voice assistant. This is only relevant if the assistant uses a text-to-text language model. Any assistant using a model with native audio support (e.g. fixie-ai/ultravox-v0_4) will ignore this field.



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

optional :transcription, -> { Telnyx::Calls::TranscriptionConfig }

#user_response_timeout_msInteger?

The maximum time in milliseconds to wait for user response before timing out.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


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

optional :user_response_timeout_ms, Integer

#voiceString?

The voice to be used by the voice assistant. Currently we support ElevenLabs, Telnyx and AWS voices.

Supported Providers:

  • AWS: Use AWS.Polly.<VoiceId> (e.g., AWS.Polly.Joanna). For neural voices, which provide more realistic, human-like speech, append -Neural to the VoiceId (e.g., AWS.Polly.Joanna-Neural). Check the available voices for compatibility.
  • Azure: Use `Azure.. (e.g. Azure.en-CA-ClaraNeural, Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural, Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to Azure Voice Gallery.)
  • ElevenLabs: Use ElevenLabs.<ModelId>.<VoiceId> (e.g., ElevenLabs.BaseModel.John). The ModelId part is optional. To use ElevenLabs, you must provide your ElevenLabs API key as an integration secret under "voice_settings": {"api_key_ref": "<secret_id>"}. See integration secrets documentation for details. Check available voices.
  • Telnyx: Use Telnyx.<model_id>.<voice_id>
  • Inworld: Use Inworld.<ModelId>.<VoiceId> (e.g., Inworld.Mini.Loretta, Inworld.Max.Oliver, Inworld.TTS2.Loretta). Supported models: Mini, Max, TTS2.
  • xAI: Use xAI.<VoiceId> (e.g., xAI.eve). Available voices: eve, ara, rex, sal, leo.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :voice, String

#voice_settingsTelnyx::Models::Calls::ElevenLabsVoiceSettings, ...

The settings associated with the voice selected



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

optional :voice_settings, union: -> { Telnyx::Calls::ActionGatherUsingAIParams::VoiceSettings }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {