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