telnyx 5.123.0 → 5.124.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +5 -0
  5. data/lib/telnyx/models/ai/assistant_create_params.rb +780 -1
  6. data/lib/telnyx/models/ai/assistant_update_params.rb +780 -1
  7. data/lib/telnyx/models/ai/assistants/update_assistant.rb +785 -1
  8. data/lib/telnyx/models/ai/inference_embedding.rb +767 -1
  9. data/lib/telnyx/models/{ai_create_response_params.rb → ai_create_response_deprecated_params.rb} +2 -2
  10. data/lib/telnyx/models/{ai_create_response_response.rb → ai_create_response_deprecated_response.rb} +1 -1
  11. data/lib/telnyx/models/call_dial_params.rb +276 -10
  12. data/lib/telnyx/models/calls/action_answer_params.rb +278 -10
  13. data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +15 -4
  14. data/lib/telnyx/models/calls/action_speak_params.rb +15 -4
  15. data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +431 -13
  16. data/lib/telnyx/models/calls/transcription_start_request.rb +173 -5
  17. data/lib/telnyx/models/conferences/action_speak_params.rb +15 -4
  18. data/lib/telnyx/models/messaging_profile_update_params.rb +9 -1
  19. data/lib/telnyx/models/sip_registration_status_retrieve_params.rb +45 -0
  20. data/lib/telnyx/models/sip_registration_status_retrieve_response.rb +160 -0
  21. data/lib/telnyx/models/speech_to_text_list_providers_params.rb +16 -5
  22. data/lib/telnyx/models/speech_to_text_list_providers_response.rb +55 -23
  23. data/lib/telnyx/models/voice_sdk_call_report_list_response.rb +114 -9
  24. data/lib/telnyx/models/voice_sdk_call_report_retrieve_response.rb +116 -9
  25. data/lib/telnyx/models/whatsapp/user_data_retrieve_response.rb +44 -3
  26. data/lib/telnyx/models/whatsapp/user_data_update_response.rb +44 -3
  27. data/lib/telnyx/models.rb +3 -9
  28. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
  29. data/lib/telnyx/resources/ai/assistants.rb +6 -2
  30. data/lib/telnyx/resources/ai.rb +4 -4
  31. data/lib/telnyx/resources/calls/actions.rb +6 -6
  32. data/lib/telnyx/resources/conferences/actions.rb +1 -1
  33. data/lib/telnyx/resources/messaging_profiles.rb +3 -1
  34. data/lib/telnyx/resources/sip_registration_status.rb +45 -0
  35. data/lib/telnyx/resources/speech_to_text.rb +6 -5
  36. data/lib/telnyx/version.rb +1 -1
  37. data/lib/telnyx.rb +5 -9
  38. data/rbi/telnyx/client.rbi +4 -0
  39. data/rbi/telnyx/models/ai/assistant_create_params.rbi +1411 -0
  40. data/rbi/telnyx/models/ai/assistant_update_params.rbi +1411 -0
  41. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +1417 -0
  42. data/rbi/telnyx/models/ai/inference_embedding.rbi +1454 -0
  43. data/rbi/telnyx/models/{ai_create_response_params.rbi → ai_create_response_deprecated_params.rbi} +5 -2
  44. data/rbi/telnyx/models/{ai_create_response_response.rbi → ai_create_response_deprecated_response.rbi} +1 -1
  45. data/rbi/telnyx/models/call_dial_params.rbi +661 -13
  46. data/rbi/telnyx/models/calls/action_answer_params.rbi +659 -13
  47. data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +30 -5
  48. data/rbi/telnyx/models/calls/action_speak_params.rbi +30 -5
  49. data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +1016 -17
  50. data/rbi/telnyx/models/calls/transcription_start_request.rbi +433 -10
  51. data/rbi/telnyx/models/conferences/action_speak_params.rbi +30 -5
  52. data/rbi/telnyx/models/messaging_profile_update_params.rbi +8 -0
  53. data/rbi/telnyx/models/sip_registration_status_retrieve_params.rbi +93 -0
  54. data/rbi/telnyx/models/sip_registration_status_retrieve_response.rbi +343 -0
  55. data/rbi/telnyx/models/speech_to_text_list_providers_params.rbi +27 -7
  56. data/rbi/telnyx/models/speech_to_text_list_providers_response.rbi +107 -43
  57. data/rbi/telnyx/models/voice_sdk_call_report_list_response.rbi +294 -9
  58. data/rbi/telnyx/models/voice_sdk_call_report_retrieve_response.rbi +294 -9
  59. data/rbi/telnyx/models/whatsapp/user_data_retrieve_response.rbi +96 -6
  60. data/rbi/telnyx/models/whatsapp/user_data_update_response.rbi +94 -6
  61. data/rbi/telnyx/models.rbi +5 -10
  62. data/rbi/telnyx/resources/ai/assistants/versions.rbi +8 -0
  63. data/rbi/telnyx/resources/ai/assistants.rbi +16 -0
  64. data/rbi/telnyx/resources/ai.rbi +1 -1
  65. data/rbi/telnyx/resources/calls/actions.rbi +10 -7
  66. data/rbi/telnyx/resources/conferences/actions.rbi +1 -1
  67. data/rbi/telnyx/resources/messaging_profiles.rbi +3 -0
  68. data/rbi/telnyx/resources/sip_registration_status.rbi +34 -0
  69. data/rbi/telnyx/resources/speech_to_text.rbi +11 -5
  70. data/sig/telnyx/client.rbs +2 -0
  71. data/sig/telnyx/models/ai/assistant_create_params.rbs +508 -0
  72. data/sig/telnyx/models/ai/assistant_update_params.rbs +508 -0
  73. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +511 -0
  74. data/sig/telnyx/models/ai/inference_embedding.rbs +526 -0
  75. data/sig/telnyx/models/{ai_create_response_params.rbs → ai_create_response_deprecated_params.rbs} +2 -2
  76. data/sig/telnyx/models/ai_create_response_deprecated_response.rbs +7 -0
  77. data/sig/telnyx/models/call_dial_params.rbs +236 -13
  78. data/sig/telnyx/models/calls/action_answer_params.rbs +236 -13
  79. data/sig/telnyx/models/calls/action_gather_using_speak_params.rbs +11 -1
  80. data/sig/telnyx/models/calls/action_speak_params.rbs +11 -1
  81. data/sig/telnyx/models/calls/action_start_conversation_relay_params.rbs +370 -19
  82. data/sig/telnyx/models/calls/transcription_start_request.rbs +175 -2
  83. data/sig/telnyx/models/conferences/action_speak_params.rbs +11 -1
  84. data/sig/telnyx/models/messaging_profile_update_params.rbs +5 -0
  85. data/sig/telnyx/models/sip_registration_status_retrieve_params.rbs +41 -0
  86. data/sig/telnyx/models/sip_registration_status_retrieve_response.rbs +164 -0
  87. data/sig/telnyx/models/speech_to_text_list_providers_params.rbs +4 -4
  88. data/sig/telnyx/models/speech_to_text_list_providers_response.rbs +33 -16
  89. data/sig/telnyx/models/voice_sdk_call_report_list_response.rbs +121 -8
  90. data/sig/telnyx/models/voice_sdk_call_report_retrieve_response.rbs +121 -8
  91. data/sig/telnyx/models/whatsapp/user_data_retrieve_response.rbs +57 -6
  92. data/sig/telnyx/models/whatsapp/user_data_update_response.rbs +57 -6
  93. data/sig/telnyx/models.rbs +3 -9
  94. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  95. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  96. data/sig/telnyx/resources/ai.rbs +2 -2
  97. data/sig/telnyx/resources/calls/actions.rbs +2 -2
  98. data/sig/telnyx/resources/messaging_profiles.rbs +1 -0
  99. data/sig/telnyx/resources/sip_registration_status.rbs +13 -0
  100. metadata +17 -29
  101. data/lib/telnyx/models/calls/transcription_engine_soniox_config.rb +0 -91
  102. data/lib/telnyx/models/calls/transcription_engine_speechmatics_config.rb +0 -100
  103. data/lib/telnyx/models/conversation_relay_interruption_settings.rb +0 -105
  104. data/lib/telnyx/models/conversation_relay_language.rb +0 -141
  105. data/lib/telnyx/models/inworld_voice_settings.rb +0 -28
  106. data/lib/telnyx/models/voice_sdk_call_report_log_entry.rb +0 -57
  107. data/lib/telnyx/models/whatsapp/whatsapp_user_data.rb +0 -49
  108. data/rbi/telnyx/models/calls/transcription_engine_soniox_config.rbi +0 -184
  109. data/rbi/telnyx/models/calls/transcription_engine_speechmatics_config.rbi +0 -289
  110. data/rbi/telnyx/models/conversation_relay_interruption_settings.rbi +0 -271
  111. data/rbi/telnyx/models/conversation_relay_language.rbi +0 -309
  112. data/rbi/telnyx/models/inworld_voice_settings.rbi +0 -53
  113. data/rbi/telnyx/models/voice_sdk_call_report_log_entry.rbi +0 -108
  114. data/rbi/telnyx/models/whatsapp/whatsapp_user_data.rbi +0 -82
  115. data/sig/telnyx/models/ai_create_response_response.rbs +0 -7
  116. data/sig/telnyx/models/calls/transcription_engine_soniox_config.rbs +0 -79
  117. data/sig/telnyx/models/calls/transcription_engine_speechmatics_config.rbs +0 -114
  118. data/sig/telnyx/models/conversation_relay_interruption_settings.rbs +0 -88
  119. data/sig/telnyx/models/conversation_relay_language.rbs +0 -121
  120. data/sig/telnyx/models/inworld_voice_settings.rbs +0 -26
  121. data/sig/telnyx/models/voice_sdk_call_report_log_entry.rbs +0 -58
  122. data/sig/telnyx/models/whatsapp/whatsapp_user_data.rbs +0 -54
@@ -20,6 +20,16 @@ module Telnyx
20
20
  # @return [String]
21
21
  required :name, String
22
22
 
23
+ # @!attribute conversation_flow
24
+ # Conversation flow as supplied by API clients (create / update).
25
+ #
26
+ # A directed graph of `FlowNodeReq` connected by `FlowEdge`s. Validation enforces
27
+ # unique node/edge IDs, that `start_node_id` references a real node, and that
28
+ # every edge's endpoints reference real nodes.
29
+ #
30
+ # @return [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow, nil]
31
+ optional :conversation_flow, -> { Telnyx::AI::AssistantCreateParams::ConversationFlow }
32
+
23
33
  # @!attribute description
24
34
  #
25
35
  # @return [String, nil]
@@ -201,7 +211,7 @@ module Telnyx
201
211
  # @return [Telnyx::Models::AI::WidgetSettings, nil]
202
212
  optional :widget_settings, -> { Telnyx::AI::WidgetSettings }
203
213
 
204
- # @!method initialize(instructions:, name:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_timeout_ms: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, external_llm: nil, fallback_config: nil, greeting: nil, insight_settings: nil, integrations: nil, interruption_settings: nil, llm_api_key_ref: nil, mcp_servers: nil, messaging_settings: nil, model: nil, observability_settings: nil, post_conversation_settings: nil, privacy_settings: nil, tags: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
214
+ # @!method initialize(instructions:, name:, conversation_flow: nil, description: nil, dynamic_variables: nil, dynamic_variables_webhook_timeout_ms: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, external_llm: nil, fallback_config: nil, greeting: nil, insight_settings: nil, integrations: nil, interruption_settings: nil, llm_api_key_ref: nil, mcp_servers: nil, messaging_settings: nil, model: nil, observability_settings: nil, post_conversation_settings: nil, privacy_settings: nil, tags: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
205
215
  # Some parameter documentations has been truncated, see
206
216
  # {Telnyx::Models::AI::AssistantCreateParams} for more details.
207
217
  #
@@ -209,6 +219,8 @@ module Telnyx
209
219
  #
210
220
  # @param name [String]
211
221
  #
222
+ # @param conversation_flow [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow] Conversation flow as supplied by API clients (create / update).
223
+ #
212
224
  # @param description [String]
213
225
  #
214
226
  # @param dynamic_variables [Hash{Symbol=>Object}] Map of dynamic variables and their default values
@@ -260,6 +272,773 @@ module Telnyx
260
272
  # @param widget_settings [Telnyx::Models::AI::WidgetSettings] Configuration settings for the assistant's web widget.
261
273
  #
262
274
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
275
+
276
+ class ConversationFlow < Telnyx::Internal::Type::BaseModel
277
+ # @!attribute nodes
278
+ # All nodes in the flow. Must contain `start_node_id`. Each node is a prompt node
279
+ # (`type: prompt`) or a tool node (`type: tool`).
280
+ #
281
+ # @return [Array<Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Tool>]
282
+ required :nodes,
283
+ -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::AssistantCreateParams::ConversationFlow::Node] }
284
+
285
+ # @!attribute start_node_id
286
+ # ID of the node where the conversation begins.
287
+ #
288
+ # @return [String]
289
+ required :start_node_id, String
290
+
291
+ # @!attribute edges
292
+ # Directed transitions between nodes. May be empty for a single-node flow.
293
+ #
294
+ # @return [Array<Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge>, nil]
295
+ optional :edges,
296
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge] }
297
+
298
+ # @!method initialize(nodes:, start_node_id:, edges: nil)
299
+ # Some parameter documentations has been truncated, see
300
+ # {Telnyx::Models::AI::AssistantCreateParams::ConversationFlow} for more details.
301
+ #
302
+ # Conversation flow as supplied by API clients (create / update).
303
+ #
304
+ # A directed graph of `FlowNodeReq` connected by `FlowEdge`s. Validation enforces
305
+ # unique node/edge IDs, that `start_node_id` references a real node, and that
306
+ # every edge's endpoints reference real nodes.
307
+ #
308
+ # @param nodes [Array<Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Tool>] All nodes in the flow. Must contain `start_node_id`. Each node is a prompt node
309
+ #
310
+ # @param start_node_id [String] ID of the node where the conversation begins.
311
+ #
312
+ # @param edges [Array<Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge>] Directed transitions between nodes. May be empty for a single-node flow.
313
+
314
+ # One step in a conversation flow, as supplied by API clients.
315
+ #
316
+ # Each node carries the prompt, tool scope, and optional overrides for
317
+ # model/voice/transcription. Unset overrides cascade from the assistant.
318
+ module Node
319
+ extend Telnyx::Internal::Type::Union
320
+
321
+ discriminator :type
322
+
323
+ # One step in a conversation flow, as supplied by API clients.
324
+ #
325
+ # Each node carries the prompt, tool scope, and optional overrides for
326
+ # model/voice/transcription. Unset overrides cascade from the assistant.
327
+ variant :prompt, -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Prompt }
328
+
329
+ # A standalone tool step in a conversation flow, as supplied by clients.
330
+ #
331
+ # Unlike a prompt node, a tool node has no instructions or model — it
332
+ # isn't an LLM turn. Reaching it deterministically runs one shared tool
333
+ # (arguments filled from matching dynamic variables by name), then routes
334
+ # on the result via outgoing `tool_result` edges.
335
+ variant :tool, -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Tool }
336
+
337
+ class Prompt < Telnyx::Internal::Type::BaseModel
338
+ # @!attribute id
339
+ # Caller-supplied unique identifier for this node within the flow.
340
+ #
341
+ # @return [String]
342
+ required :id, String
343
+
344
+ # @!attribute instructions
345
+ # Prompt that drives the LLM while this node is active. Required.
346
+ #
347
+ # @return [String]
348
+ required :instructions, String
349
+
350
+ # @!attribute external_llm
351
+ # Override for `Assistant.external_llm` while this node is active. Use this to
352
+ # route a node's turns to a different external LLM (different `model`, `base_url`,
353
+ # credentials). Part of the LLM bundle — see `model` for cascade semantics.
354
+ # Mutually exclusive with `model` on the node (a single LLM identity per node).
355
+ #
356
+ # @return [Telnyx::Models::AI::ExternalLlmReq, nil]
357
+ optional :external_llm, -> { Telnyx::AI::ExternalLlmReq }
358
+
359
+ # @!attribute instructions_mode
360
+ # How `instructions` combine with the assistant-level instructions. `replace`
361
+ # (default): the node's instructions are used alone. `append`: the node's
362
+ # instructions are concatenated after the assistant's instructions.
363
+ #
364
+ # @return [Symbol, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::InstructionsMode, nil]
365
+ optional :instructions_mode,
366
+ enum: -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::InstructionsMode }
367
+
368
+ # @!attribute llm_api_key_ref
369
+ # Override for `Assistant.llm_api_key_ref` while this node is active. Part of the
370
+ # LLM bundle — see `model` for cascade semantics.
371
+ #
372
+ # @return [String, nil]
373
+ optional :llm_api_key_ref, String
374
+
375
+ # @!attribute model
376
+ # Override for `Assistant.model` while this node is active. Part of the LLM bundle
377
+ # (`model` + `llm_api_key_ref` + `external_llm`): when any of the three is set on
378
+ # the node, all three are taken from the node and the assistant-level LLM identity
379
+ # is not consulted. When none of the three is set, the assistant's bundle cascades
380
+ # unchanged.
381
+ #
382
+ # @return [String, nil]
383
+ optional :model, String
384
+
385
+ # @!attribute name
386
+ # Optional human-readable label, displayed in authoring UIs.
387
+ #
388
+ # @return [String, nil]
389
+ optional :name, String
390
+
391
+ # @!attribute position
392
+ # Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
393
+ # by the runtime; round-trips so frontends can persist graph layout across
394
+ # reloads.
395
+ #
396
+ # @return [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::Position, nil]
397
+ optional :position, -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::Position }
398
+
399
+ # @!attribute shared_tool_ids
400
+ # IDs of shared (org-level) tools available at this node. Knowledge bases are
401
+ # attached the same way — via a shared retrieval tool. Tools not listed here are
402
+ # not callable while this node is active.
403
+ #
404
+ # @return [Array<String>, nil]
405
+ optional :shared_tool_ids, Telnyx::Internal::Type::ArrayOf[String]
406
+
407
+ # @!attribute tools_mode
408
+ # How `shared_tool_ids` combine with the assistant-level tool set. `replace`
409
+ # (default): only the node's tools are callable. `append`: the node's tools are
410
+ # added to the assistant's tools. Ignored when `shared_tool_ids` is null.
411
+ #
412
+ # @return [Symbol, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::ToolsMode, nil]
413
+ optional :tools_mode,
414
+ enum: -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::ToolsMode }
415
+
416
+ # @!attribute transcription
417
+ # Per-node transcription override (model/language/region). Unset fields cascade
418
+ # from the assistant-level transcription.
419
+ #
420
+ # @return [Telnyx::Models::AI::TranscriptionSettings, nil]
421
+ optional :transcription, -> { Telnyx::AI::TranscriptionSettings }
422
+
423
+ # @!attribute type
424
+ # Node kind discriminator. `prompt` (default) is an LLM-driven step; `tool` is a
425
+ # standalone tool execution (see `ToolNodeReq`).
426
+ #
427
+ # @return [Symbol, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::Type, nil]
428
+ optional :type, enum: -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::Type }
429
+
430
+ # @!attribute voice_settings
431
+ # Per-node voice override. Only fields set here override the assistant-level voice
432
+ # settings; unset fields cascade.
433
+ #
434
+ # @return [Telnyx::Models::AI::VoiceSettings, nil]
435
+ optional :voice_settings, -> { Telnyx::AI::VoiceSettings }
436
+
437
+ # @!method initialize(id:, instructions:, external_llm: nil, instructions_mode: nil, llm_api_key_ref: nil, model: nil, name: nil, position: nil, shared_tool_ids: nil, tools_mode: nil, transcription: nil, type: nil, voice_settings: nil)
438
+ # Some parameter documentations has been truncated, see
439
+ # {Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt} for
440
+ # more details.
441
+ #
442
+ # One step in a conversation flow, as supplied by API clients.
443
+ #
444
+ # Each node carries the prompt, tool scope, and optional overrides for
445
+ # model/voice/transcription. Unset overrides cascade from the assistant.
446
+ #
447
+ # @param id [String] Caller-supplied unique identifier for this node within the flow.
448
+ #
449
+ # @param instructions [String] Prompt that drives the LLM while this node is active. Required.
450
+ #
451
+ # @param external_llm [Telnyx::Models::AI::ExternalLlmReq] Override for `Assistant.external_llm` while this node is active. Use this to rou
452
+ #
453
+ # @param instructions_mode [Symbol, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::InstructionsMode] How `instructions` combine with the assistant-level instructions. `replace` (def
454
+ #
455
+ # @param llm_api_key_ref [String] Override for `Assistant.llm_api_key_ref` while this node is active. Part of the
456
+ #
457
+ # @param model [String] Override for `Assistant.model` while this node is active. Part of the LLM bundle
458
+ #
459
+ # @param name [String] Optional human-readable label, displayed in authoring UIs.
460
+ #
461
+ # @param position [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::Position] Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
462
+ #
463
+ # @param shared_tool_ids [Array<String>] IDs of shared (org-level) tools available at this node. Knowledge bases are atta
464
+ #
465
+ # @param tools_mode [Symbol, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::ToolsMode] How `shared_tool_ids` combine with the assistant-level tool set. `replace` (defa
466
+ #
467
+ # @param transcription [Telnyx::Models::AI::TranscriptionSettings] Per-node transcription override (model/language/region). Unset fields cascade fr
468
+ #
469
+ # @param type [Symbol, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::Type] Node kind discriminator. `prompt` (default) is an LLM-driven step; `tool` is a s
470
+ #
471
+ # @param voice_settings [Telnyx::Models::AI::VoiceSettings] Per-node voice override. Only fields set here override the assistant-level voice
472
+
473
+ # How `instructions` combine with the assistant-level instructions. `replace`
474
+ # (default): the node's instructions are used alone. `append`: the node's
475
+ # instructions are concatenated after the assistant's instructions.
476
+ #
477
+ # @see Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt#instructions_mode
478
+ module InstructionsMode
479
+ extend Telnyx::Internal::Type::Enum
480
+
481
+ REPLACE = :replace
482
+ APPEND = :append
483
+
484
+ # @!method self.values
485
+ # @return [Array<Symbol>]
486
+ end
487
+
488
+ # @see Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt#position
489
+ class Position < Telnyx::Internal::Type::BaseModel
490
+ # @!attribute x
491
+ # Horizontal coordinate in the authoring canvas.
492
+ #
493
+ # @return [Float]
494
+ required :x, Float
495
+
496
+ # @!attribute y_
497
+ # Vertical coordinate in the authoring canvas.
498
+ #
499
+ # @return [Float]
500
+ required :y_, Float, api_name: :y
501
+
502
+ # @!method initialize(x:, y_:)
503
+ # Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
504
+ # by the runtime; round-trips so frontends can persist graph layout across
505
+ # reloads.
506
+ #
507
+ # @param x [Float] Horizontal coordinate in the authoring canvas.
508
+ #
509
+ # @param y_ [Float] Vertical coordinate in the authoring canvas.
510
+ end
511
+
512
+ # How `shared_tool_ids` combine with the assistant-level tool set. `replace`
513
+ # (default): only the node's tools are callable. `append`: the node's tools are
514
+ # added to the assistant's tools. Ignored when `shared_tool_ids` is null.
515
+ #
516
+ # @see Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt#tools_mode
517
+ module ToolsMode
518
+ extend Telnyx::Internal::Type::Enum
519
+
520
+ REPLACE = :replace
521
+ APPEND = :append
522
+
523
+ # @!method self.values
524
+ # @return [Array<Symbol>]
525
+ end
526
+
527
+ # Node kind discriminator. `prompt` (default) is an LLM-driven step; `tool` is a
528
+ # standalone tool execution (see `ToolNodeReq`).
529
+ #
530
+ # @see Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt#type
531
+ module Type
532
+ extend Telnyx::Internal::Type::Enum
533
+
534
+ PROMPT = :prompt
535
+
536
+ # @!method self.values
537
+ # @return [Array<Symbol>]
538
+ end
539
+ end
540
+
541
+ class Tool < Telnyx::Internal::Type::BaseModel
542
+ # @!attribute id
543
+ # Caller-supplied unique identifier for this node within the flow.
544
+ #
545
+ # @return [String]
546
+ required :id, String
547
+
548
+ # @!attribute shared_tool_id
549
+ # ID of the single shared (org-level) tool this node executes. When the flow
550
+ # reaches this node the tool runs as a deliberate step (no LLM turn); its outgoing
551
+ # `tool_result` edges then route on the outcome. Arguments are filled from the
552
+ # conversation's dynamic variables by name — a dynamic variable whose name matches
553
+ # one of the tool's parameters supplies that argument. Cross-validated against the
554
+ # org's shared tools on write.
555
+ #
556
+ # @return [String]
557
+ required :shared_tool_id, String
558
+
559
+ # @!attribute name
560
+ # Optional human-readable label, displayed in authoring UIs.
561
+ #
562
+ # @return [String, nil]
563
+ optional :name, String
564
+
565
+ # @!attribute position
566
+ # Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
567
+ # by the runtime; round-trips so frontends can persist graph layout across
568
+ # reloads.
569
+ #
570
+ # @return [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Tool::Position, nil]
571
+ optional :position, -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Tool::Position }
572
+
573
+ # @!attribute type
574
+ # Node kind discriminator. Always `tool` for a tool node.
575
+ #
576
+ # @return [Symbol, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Tool::Type, nil]
577
+ optional :type, enum: -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Tool::Type }
578
+
579
+ # @!method initialize(id:, shared_tool_id:, name: nil, position: nil, type: nil)
580
+ # Some parameter documentations has been truncated, see
581
+ # {Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Tool} for
582
+ # more details.
583
+ #
584
+ # A standalone tool step in a conversation flow, as supplied by clients.
585
+ #
586
+ # Unlike a prompt node, a tool node has no instructions or model — it isn't an LLM
587
+ # turn. Reaching it deterministically runs one shared tool (arguments filled from
588
+ # matching dynamic variables by name), then routes on the result via outgoing
589
+ # `tool_result` edges.
590
+ #
591
+ # @param id [String] Caller-supplied unique identifier for this node within the flow.
592
+ #
593
+ # @param shared_tool_id [String] ID of the single shared (org-level) tool this node executes. When the flow reach
594
+ #
595
+ # @param name [String] Optional human-readable label, displayed in authoring UIs.
596
+ #
597
+ # @param position [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Tool::Position] Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
598
+ #
599
+ # @param type [Symbol, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Tool::Type] Node kind discriminator. Always `tool` for a tool node.
600
+
601
+ # @see Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Tool#position
602
+ class Position < Telnyx::Internal::Type::BaseModel
603
+ # @!attribute x
604
+ # Horizontal coordinate in the authoring canvas.
605
+ #
606
+ # @return [Float]
607
+ required :x, Float
608
+
609
+ # @!attribute y_
610
+ # Vertical coordinate in the authoring canvas.
611
+ #
612
+ # @return [Float]
613
+ required :y_, Float, api_name: :y
614
+
615
+ # @!method initialize(x:, y_:)
616
+ # Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
617
+ # by the runtime; round-trips so frontends can persist graph layout across
618
+ # reloads.
619
+ #
620
+ # @param x [Float] Horizontal coordinate in the authoring canvas.
621
+ #
622
+ # @param y_ [Float] Vertical coordinate in the authoring canvas.
623
+ end
624
+
625
+ # Node kind discriminator. Always `tool` for a tool node.
626
+ #
627
+ # @see Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Tool#type
628
+ module Type
629
+ extend Telnyx::Internal::Type::Enum
630
+
631
+ TOOL = :tool
632
+
633
+ # @!method self.values
634
+ # @return [Array<Symbol>]
635
+ end
636
+ end
637
+
638
+ # @!method self.variants
639
+ # @return [Array(Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Prompt, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Node::Tool)]
640
+ end
641
+
642
+ class Edge < Telnyx::Internal::Type::BaseModel
643
+ # @!attribute id
644
+ # Caller-supplied unique identifier for this edge within the flow.
645
+ #
646
+ # @return [String]
647
+ required :id, String
648
+
649
+ # @!attribute condition
650
+ # Condition that gates the transition. Discriminated by `type`: `llm`,
651
+ # `expression`.
652
+ #
653
+ # @return [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression]
654
+ required :condition, union: -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition }
655
+
656
+ # @!attribute start_node_id
657
+ # ID of the node this edge transitions away from.
658
+ #
659
+ # @return [String]
660
+ required :start_node_id, String
661
+
662
+ # @!attribute target
663
+ # Destination of the transition. Discriminated by `type`: `node` (jump to another
664
+ # node in this flow) or `assistant` (hand off to a different assistant).
665
+ #
666
+ # @return [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Node, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant]
667
+ required :target, union: -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Target }
668
+
669
+ # @!method initialize(id:, condition:, start_node_id:, target:)
670
+ # Some parameter documentations has been truncated, see
671
+ # {Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge} for more
672
+ # details.
673
+ #
674
+ # Directed transition from one node to a target, gated by a condition.
675
+ #
676
+ # The target is either another node in the same flow (`NodeTarget`) or a different
677
+ # assistant (`AssistantTarget`). Multiple edges may share a `start_node_id`; the
678
+ # runtime evaluates them in the order they're declared and takes the first whose
679
+ # condition is true.
680
+ #
681
+ # @param id [String] Caller-supplied unique identifier for this edge within the flow.
682
+ #
683
+ # @param condition [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression] Condition that gates the transition. Discriminated by `type`: `llm`, `expression
684
+ #
685
+ # @param start_node_id [String] ID of the node this edge transitions away from.
686
+ #
687
+ # @param target [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Node, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant] Destination of the transition. Discriminated by `type`: `node` (jump to another
688
+
689
+ # Condition that gates the transition. Discriminated by `type`: `llm`,
690
+ # `expression`.
691
+ #
692
+ # @see Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge#condition
693
+ module Condition
694
+ extend Telnyx::Internal::Type::Union
695
+
696
+ discriminator :type
697
+
698
+ # Edge condition evaluated by the LLM from a natural-language prompt.
699
+ #
700
+ # The model is asked to judge the prompt against conversation context and
701
+ # returns true/false. Use this for fuzzy intents that aren't expressible as
702
+ # a deterministic expression (e.g. 'user wants to escalate to a human').
703
+ variant :llm, -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Llm }
704
+
705
+ # Edge condition evaluated as a deterministic expression AST.
706
+ #
707
+ # The expression is computed against runtime dynamic variables and must
708
+ # evaluate to a boolean. Prefer this over `LLMCondition` when the rule is
709
+ # a clean function of known variables — it's cheaper and predictable.
710
+ variant :expression,
711
+ -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression }
712
+
713
+ class Llm < Telnyx::Internal::Type::BaseModel
714
+ # @!attribute prompt
715
+ # Natural-language criterion the LLM judges as true/false.
716
+ #
717
+ # @return [String]
718
+ required :prompt, String
719
+
720
+ # @!attribute type
721
+ #
722
+ # @return [Symbol, :llm]
723
+ required :type, const: :llm
724
+
725
+ # @!method initialize(prompt:, type: :llm)
726
+ # Edge condition evaluated by the LLM from a natural-language prompt.
727
+ #
728
+ # The model is asked to judge the prompt against conversation context and returns
729
+ # true/false. Use this for fuzzy intents that aren't expressible as a
730
+ # deterministic expression (e.g. 'user wants to escalate to a human').
731
+ #
732
+ # @param prompt [String] Natural-language criterion the LLM judges as true/false.
733
+ #
734
+ # @param type [Symbol, :llm]
735
+ end
736
+
737
+ class Expression < Telnyx::Internal::Type::BaseModel
738
+ # @!attribute expression
739
+ # A node in a deterministic expression AST. Exactly one variant is selected by the
740
+ # `type` discriminator. Terminal variants (`number_literal`, `string_literal`,
741
+ # `bool_literal`, `variable`) bottom out the recursion; `arithmetic`, `bool_op`,
742
+ # and `comparison` nest further sub-expressions.
743
+ #
744
+ # Extracted into a single named schema so the recursive union is defined once (was
745
+ # previously inlined at every operand site).
746
+ #
747
+ # @return [Object, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::DynamicVariableExpression, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::StringLiteralExpression, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::NumberLiteralExpression, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::BooleanLiteralExpression]
748
+ required :expression,
749
+ union: -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression }
750
+
751
+ # @!attribute type
752
+ #
753
+ # @return [Symbol, :expression]
754
+ required :type, const: :expression
755
+
756
+ # @!method initialize(expression:, type: :expression)
757
+ # Some parameter documentations has been truncated, see
758
+ # {Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression}
759
+ # for more details.
760
+ #
761
+ # Edge condition evaluated as a deterministic expression AST.
762
+ #
763
+ # The expression is computed against runtime dynamic variables and must evaluate
764
+ # to a boolean. Prefer this over `LLMCondition` when the rule is a clean function
765
+ # of known variables — it's cheaper and predictable.
766
+ #
767
+ # @param expression [Object, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::DynamicVariableExpression, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::StringLiteralExpression, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::NumberLiteralExpression, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::BooleanLiteralExpression] A node in a deterministic expression AST. Exactly one variant is selected by the
768
+ #
769
+ # @param type [Symbol, :expression]
770
+
771
+ # A node in a deterministic expression AST. Exactly one variant is selected by the
772
+ # `type` discriminator. Terminal variants (`number_literal`, `string_literal`,
773
+ # `bool_literal`, `variable`) bottom out the recursion; `arithmetic`, `bool_op`,
774
+ # and `comparison` nest further sub-expressions.
775
+ #
776
+ # Extracted into a single named schema so the recursive union is defined once (was
777
+ # previously inlined at every operand site).
778
+ #
779
+ # @see Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression#expression
780
+ module Expression
781
+ extend Telnyx::Internal::Type::Union
782
+
783
+ variant Telnyx::Internal::Type::Unknown
784
+
785
+ # Reference a dynamic variable by name.
786
+ #
787
+ # Resolved at runtime from the assistant's dynamic-variables context (see
788
+ # `Assistant.dynamic_variables` and the dynamic-variables webhook).
789
+ variant -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::DynamicVariableExpression }
790
+
791
+ # Constant string value.
792
+ variant -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::StringLiteralExpression }
793
+
794
+ # Constant numeric value (float; integers are accepted and stored as float).
795
+ variant -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::NumberLiteralExpression }
796
+
797
+ # Constant boolean value. Useful for unconditional ('always') edges.
798
+ variant -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::BooleanLiteralExpression }
799
+
800
+ class DynamicVariableExpression < Telnyx::Internal::Type::BaseModel
801
+ # @!attribute name
802
+ # Variable name to look up in the runtime context.
803
+ #
804
+ # @return [String]
805
+ required :name, String
806
+
807
+ # @!attribute type
808
+ #
809
+ # @return [Symbol, :variable]
810
+ required :type, const: :variable
811
+
812
+ # @!method initialize(name:, type: :variable)
813
+ # Reference a dynamic variable by name.
814
+ #
815
+ # Resolved at runtime from the assistant's dynamic-variables context (see
816
+ # `Assistant.dynamic_variables` and the dynamic-variables webhook).
817
+ #
818
+ # @param name [String] Variable name to look up in the runtime context.
819
+ #
820
+ # @param type [Symbol, :variable]
821
+ end
822
+
823
+ class StringLiteralExpression < Telnyx::Internal::Type::BaseModel
824
+ # @!attribute type
825
+ #
826
+ # @return [Symbol, :string_literal]
827
+ required :type, const: :string_literal
828
+
829
+ # @!attribute value
830
+ # Literal string value.
831
+ #
832
+ # @return [String]
833
+ required :value, String
834
+
835
+ # @!method initialize(value:, type: :string_literal)
836
+ # Constant string value.
837
+ #
838
+ # @param value [String] Literal string value.
839
+ #
840
+ # @param type [Symbol, :string_literal]
841
+ end
842
+
843
+ class NumberLiteralExpression < Telnyx::Internal::Type::BaseModel
844
+ # @!attribute type
845
+ #
846
+ # @return [Symbol, :number_literal]
847
+ required :type, const: :number_literal
848
+
849
+ # @!attribute value
850
+ # Literal numeric value.
851
+ #
852
+ # @return [Float]
853
+ required :value, Float
854
+
855
+ # @!method initialize(value:, type: :number_literal)
856
+ # Constant numeric value (float; integers are accepted and stored as float).
857
+ #
858
+ # @param value [Float] Literal numeric value.
859
+ #
860
+ # @param type [Symbol, :number_literal]
861
+ end
862
+
863
+ class BooleanLiteralExpression < Telnyx::Internal::Type::BaseModel
864
+ # @!attribute type
865
+ #
866
+ # @return [Symbol, :bool_literal]
867
+ required :type, const: :bool_literal
868
+
869
+ # @!attribute value
870
+ # Literal boolean value.
871
+ #
872
+ # @return [Boolean]
873
+ required :value, Telnyx::Internal::Type::Boolean
874
+
875
+ # @!method initialize(value:, type: :bool_literal)
876
+ # Constant boolean value. Useful for unconditional ('always') edges.
877
+ #
878
+ # @param value [Boolean] Literal boolean value.
879
+ #
880
+ # @param type [Symbol, :bool_literal]
881
+ end
882
+
883
+ # @!method self.variants
884
+ # @return [Array(Object, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::DynamicVariableExpression, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::StringLiteralExpression, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::NumberLiteralExpression, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::Expression::BooleanLiteralExpression)]
885
+ end
886
+ end
887
+
888
+ # @!method self.variants
889
+ # @return [Array(Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression)]
890
+ end
891
+
892
+ # Destination of the transition. Discriminated by `type`: `node` (jump to another
893
+ # node in this flow) or `assistant` (hand off to a different assistant).
894
+ #
895
+ # @see Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge#target
896
+ module Target
897
+ extend Telnyx::Internal::Type::Union
898
+
899
+ discriminator :type
900
+
901
+ # Edge target referencing another node within the same flow.
902
+ #
903
+ # The runtime transitions the active node to `node_id` and continues
904
+ # processing within the current assistant's flow.
905
+ variant :node, -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Node }
906
+
907
+ # Edge target referencing a different assistant.
908
+ #
909
+ # When the edge fires, the conversation hands off to `assistant_id`: the
910
+ # active assistant on the conversation row is rewritten and the new
911
+ # assistant's flow starts at its own `start_node_id`. The current turn's
912
+ # LLM response is delivered to the user as-is; subsequent turns route
913
+ # to the new assistant.
914
+ variant :assistant, -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant }
915
+
916
+ class Node < Telnyx::Internal::Type::BaseModel
917
+ # @!attribute node_id
918
+ # ID of the node this edge transitions into.
919
+ #
920
+ # @return [String]
921
+ required :node_id, String
922
+
923
+ # @!attribute type
924
+ #
925
+ # @return [Symbol, :node]
926
+ required :type, const: :node
927
+
928
+ # @!method initialize(node_id:, type: :node)
929
+ # Edge target referencing another node within the same flow.
930
+ #
931
+ # The runtime transitions the active node to `node_id` and continues processing
932
+ # within the current assistant's flow.
933
+ #
934
+ # @param node_id [String] ID of the node this edge transitions into.
935
+ #
936
+ # @param type [Symbol, :node]
937
+ end
938
+
939
+ class Assistant < Telnyx::Internal::Type::BaseModel
940
+ # @!attribute assistant_id
941
+ # ID of the assistant the conversation transitions to.
942
+ #
943
+ # @return [String]
944
+ required :assistant_id, String
945
+
946
+ # @!attribute type
947
+ #
948
+ # @return [Symbol, :assistant]
949
+ required :type, const: :assistant
950
+
951
+ # @!attribute position
952
+ # Optional canvas coordinates for rendering the target assistant as a node in
953
+ # authoring UIs. Pure presentation — the runtime ignores it; round-trips so
954
+ # frontends can persist graph layout across reloads. When multiple edges target
955
+ # the same assistant, each edge's `position` is independent (frontends typically
956
+ # use the first non-null one).
957
+ #
958
+ # @return [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant::Position, nil]
959
+ optional :position,
960
+ -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant::Position }
961
+
962
+ # @!attribute voice_mode
963
+ # Voice behavior when handing off to the target assistant, mirroring the handoff
964
+ # tool's `voice_mode`. `unified` (default) keeps the current voice across the
965
+ # handoff; `distinct` lets the target assistant speak with its own configured
966
+ # voice. Only applies to assistant targets — node targets override voice via the
967
+ # node's own `voice_settings`.
968
+ #
969
+ # @return [Symbol, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant::VoiceMode, nil]
970
+ optional :voice_mode,
971
+ enum: -> { Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant::VoiceMode }
972
+
973
+ # @!method initialize(assistant_id:, position: nil, voice_mode: nil, type: :assistant)
974
+ # Some parameter documentations has been truncated, see
975
+ # {Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant}
976
+ # for more details.
977
+ #
978
+ # Edge target referencing a different assistant.
979
+ #
980
+ # When the edge fires, the conversation hands off to `assistant_id`: the active
981
+ # assistant on the conversation row is rewritten and the new assistant's flow
982
+ # starts at its own `start_node_id`. The current turn's LLM response is delivered
983
+ # to the user as-is; subsequent turns route to the new assistant.
984
+ #
985
+ # @param assistant_id [String] ID of the assistant the conversation transitions to.
986
+ #
987
+ # @param position [Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant::Position] Optional canvas coordinates for rendering the target assistant as a node in auth
988
+ #
989
+ # @param voice_mode [Symbol, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant::VoiceMode] Voice behavior when handing off to the target assistant, mirroring the handoff t
990
+ #
991
+ # @param type [Symbol, :assistant]
992
+
993
+ # @see Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant#position
994
+ class Position < Telnyx::Internal::Type::BaseModel
995
+ # @!attribute x
996
+ # Horizontal coordinate in the authoring canvas.
997
+ #
998
+ # @return [Float]
999
+ required :x, Float
1000
+
1001
+ # @!attribute y_
1002
+ # Vertical coordinate in the authoring canvas.
1003
+ #
1004
+ # @return [Float]
1005
+ required :y_, Float, api_name: :y
1006
+
1007
+ # @!method initialize(x:, y_:)
1008
+ # Optional canvas coordinates for rendering the target assistant as a node in
1009
+ # authoring UIs. Pure presentation — the runtime ignores it; round-trips so
1010
+ # frontends can persist graph layout across reloads. When multiple edges target
1011
+ # the same assistant, each edge's `position` is independent (frontends typically
1012
+ # use the first non-null one).
1013
+ #
1014
+ # @param x [Float] Horizontal coordinate in the authoring canvas.
1015
+ #
1016
+ # @param y_ [Float] Vertical coordinate in the authoring canvas.
1017
+ end
1018
+
1019
+ # Voice behavior when handing off to the target assistant, mirroring the handoff
1020
+ # tool's `voice_mode`. `unified` (default) keeps the current voice across the
1021
+ # handoff; `distinct` lets the target assistant speak with its own configured
1022
+ # voice. Only applies to assistant targets — node targets override voice via the
1023
+ # node's own `voice_settings`.
1024
+ #
1025
+ # @see Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant#voice_mode
1026
+ module VoiceMode
1027
+ extend Telnyx::Internal::Type::Enum
1028
+
1029
+ UNIFIED = :unified
1030
+ DISTINCT = :distinct
1031
+
1032
+ # @!method self.values
1033
+ # @return [Array<Symbol>]
1034
+ end
1035
+ end
1036
+
1037
+ # @!method self.variants
1038
+ # @return [Array(Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Node, Telnyx::Models::AI::AssistantCreateParams::ConversationFlow::Edge::Target::Assistant)]
1039
+ end
1040
+ end
1041
+ end
263
1042
  end
264
1043
  end
265
1044
  end