Class: Telnyx::Models::CallAssistantRequest

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

Defined Under Namespace

Modules: DynamicVariable, Tool Classes: ExternalLlm, FallbackConfig

Constant Summary collapse

Telnyx =

Returns:

  • (:BookAppointmentTool)

Instance Attribute Summary collapse

Class Method 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

#initializeObject



88
# File 'sig/telnyx/models/call_assistant_request.rbs', line 88

def initialize: (

Instance Attribute Details

#dynamic_variablesHash{Symbol=>String, Float, Boolean}?

Map of dynamic variables and their default values. Dynamic variables can be referenced in instructions, greeting, and tool definitions using the {{variable_name}} syntax. Call-control-agent automatically merges in telnyx_call_* variables (telnyx_call_to, telnyx_call_from, telnyx_conversation_channel, telnyx_agent_target, telnyx_end_user_target, telnyx_call_caller_id_name) and custom header variables.

Returns:

  • (Hash{Symbol=>String, Float, Boolean}, nil)


21
22
# File 'lib/telnyx/models/call_assistant_request.rb', line 21

optional :dynamic_variables,
-> { Telnyx::Internal::Type::HashOf[union: Telnyx::CallAssistantRequest::DynamicVariable] }

#external_llmTelnyx::Models::CallAssistantRequest::ExternalLlm?

External LLM configuration for bringing your own LLM endpoint.



28
# File 'lib/telnyx/models/call_assistant_request.rb', line 28

optional :external_llm, -> { Telnyx::CallAssistantRequest::ExternalLlm }

#fallback_configTelnyx::Models::CallAssistantRequest::FallbackConfig?

Fallback LLM configuration used when the primary LLM provider is unavailable.



34
# File 'lib/telnyx/models/call_assistant_request.rb', line 34

optional :fallback_config, -> { Telnyx::CallAssistantRequest::FallbackConfig }

#greetingString?

Initial greeting text spoken when the assistant starts. Can be plain text for any voice or SSML for AWS.Polly.<voice_id> voices. There is a 3,000 character limit.

Parameters:

  • (String)

Returns:

  • (String, nil)


42
# File 'lib/telnyx/models/call_assistant_request.rb', line 42

optional :greeting, String

#idString

The identifier of the AI assistant to use.

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/telnyx/models/call_assistant_request.rb', line 10

required :id, String

#instructionsString?

System instructions for the voice assistant. Can be templated with dynamic variables. This will overwrite the instructions set in the assistant configuration.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :instructions, String

#llm_api_key_refString?

Integration secret identifier for the LLM provider API key. Use this field to reference an integration secret containing your LLM provider API key. Supports any LLM provider (OpenAI, Anthropic, etc.).

Parameters:

  • (String)

Returns:

  • (String, nil)


60
# File 'lib/telnyx/models/call_assistant_request.rb', line 60

optional :llm_api_key_ref, String

#mcp_serversArray<Hash{Symbol=>Object}>?

MCP (Model Context Protocol) server configurations for extending the assistant's capabilities with external tools and data sources.

Returns:

  • (Array<Hash{Symbol=>Object}>, nil)


67
68
# File 'lib/telnyx/models/call_assistant_request.rb', line 67

optional :mcp_servers,
Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]]

#modelString?

LLM model override for this call. If omitted, the assistant's configured model is used.

Parameters:

  • (String)

Returns:

  • (String, nil)


75
# File 'lib/telnyx/models/call_assistant_request.rb', line 75

optional :model, String

#nameString?

Assistant name override for this call.

Parameters:

  • (String)

Returns:

  • (String, nil)


81
# File 'lib/telnyx/models/call_assistant_request.rb', line 81

optional :name, String

#observability_settingsHash{Symbol=>Object}?

Observability configuration for the assistant session, including Langfuse integration for tracing and monitoring.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


88
# File 'lib/telnyx/models/call_assistant_request.rb', line 88

optional :observability_settings, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]

#openai_api_key_refString?

Deprecated.

This field is deprecated and will be removed soon

Deprecated — use llm_api_key_ref instead. Integration secret identifier for the OpenAI API key. This field is maintained for backward compatibility; llm_api_key_ref is the canonical field name and supports all LLM providers.

Parameters:

  • (String)

Returns:

  • (String, nil)


98
# File 'lib/telnyx/models/call_assistant_request.rb', line 98

optional :openai_api_key_ref, String

#toolsArray<Telnyx::Models::BookAppointmentTool, Telnyx::Models::CheckAvailabilityTool, Telnyx::Models::AI::WebhookTool, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::TransferTool, Telnyx::Models::CallControlRetrievalTool>?

Inline tool definitions available to the assistant (webhook, retrieval, transfer, hangup, etc.). Overrides the assistant's stored tools if provided.



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

optional :tools, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::CallAssistantRequest::Tool] }

#voice_settingsTelnyx::Models::AI::VoiceSettings?



110
# File 'lib/telnyx/models/call_assistant_request.rb', line 110

optional :voice_settings, -> { Telnyx::AI::VoiceSettings }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/call_assistant_request.rb', line 240

.variantsArray(String, Float, Boolean)

Returns:

  • (Array(String, Float, Boolean))


# File 'lib/telnyx/models/call_assistant_request.rb', line 157

Instance Method Details

#to_hash{

Returns:

  • ({)


105
# File 'sig/telnyx/models/call_assistant_request.rbs', line 105

def to_hash: -> {