Class: Telnyx::Models::CallAssistantRequest

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

Defined Under Namespace

Modules: DynamicVariable, Tool

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, 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

This class inherits a constructor from Telnyx::Internal::Type::BaseModel

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_llmHash{Symbol=>Object}?

External LLM configuration for bringing your own LLM endpoint.

Returns:

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


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

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

#fallback_configHash{Symbol=>Object}?

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

Returns:

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


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

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

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

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.

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](developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables). This will overwrite the instructions set in the assistant configuration.

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](developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret) containing your LLM provider API key. Supports any LLM provider (OpenAI, Anthropic, etc.).

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.

Returns:

  • (String, nil)


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

optional :model, String

#nameString?

Assistant name override for this call.

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.

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.

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] }

Class Method Details

.variantsArray(String, Float, Boolean)

Returns:

  • (Array(String, Float, Boolean))


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