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