telnyx 5.124.0 → 5.126.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 +16 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/assistant_create_params.rb +142 -6
- data/lib/telnyx/models/ai/assistant_tool.rb +13 -1
- data/lib/telnyx/models/ai/assistant_update_params.rb +142 -6
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +144 -6
- data/lib/telnyx/models/ai/inference_embedding.rb +132 -6
- data/lib/telnyx/version.rb +1 -1
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +232 -8
- data/rbi/telnyx/models/ai/assistant_tool.rbi +19 -0
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +232 -8
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +232 -8
- data/rbi/telnyx/models/ai/inference_embedding.rbi +219 -4
- data/sig/telnyx/models/ai/assistant_create_params.rbs +81 -0
- data/sig/telnyx/models/ai/assistant_tool.rbs +7 -0
- data/sig/telnyx/models/ai/assistant_update_params.rbs +81 -0
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +81 -0
- data/sig/telnyx/models/ai/inference_embedding.rbs +81 -0
- metadata +2 -2
|
@@ -282,7 +282,7 @@ module Telnyx
|
|
|
282
282
|
# All nodes in the flow. Must contain `start_node_id`. Each node is a prompt node
|
|
283
283
|
# (`type: prompt`) or a tool node (`type: tool`).
|
|
284
284
|
#
|
|
285
|
-
# @return [Array<Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Prompt, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Tool>]
|
|
285
|
+
# @return [Array<Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Prompt, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Tool, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak>]
|
|
286
286
|
required :nodes,
|
|
287
287
|
-> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::Assistants::UpdateAssistant::ConversationFlow::Node] }
|
|
288
288
|
|
|
@@ -310,7 +310,7 @@ module Telnyx
|
|
|
310
310
|
# unique node/edge IDs, that `start_node_id` references a real node, and that
|
|
311
311
|
# every edge's endpoints reference real nodes.
|
|
312
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
|
|
313
|
+
# @param nodes [Array<Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Prompt, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Tool, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak>] All nodes in the flow. Must contain `start_node_id`. Each node is a prompt node
|
|
314
314
|
#
|
|
315
315
|
# @param start_node_id [String] ID of the node where the conversation begins.
|
|
316
316
|
#
|
|
@@ -339,6 +339,14 @@ module Telnyx
|
|
|
339
339
|
# on the result via outgoing `tool_result` edges.
|
|
340
340
|
variant :tool, -> { Telnyx::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Tool }
|
|
341
341
|
|
|
342
|
+
# A standalone scripted-message step in a flow, as supplied by clients.
|
|
343
|
+
#
|
|
344
|
+
# Unlike a prompt node, a speak node has no instructions or model — it isn't
|
|
345
|
+
# an LLM turn. Reaching it delivers `message` to the user verbatim (with
|
|
346
|
+
# `{{variable}}` interpolation), then routes via outgoing `llm` /
|
|
347
|
+
# `expression` edges.
|
|
348
|
+
variant :speak, -> { Telnyx::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak }
|
|
349
|
+
|
|
342
350
|
class Prompt < Telnyx::Internal::Type::BaseModel
|
|
343
351
|
# @!attribute id
|
|
344
352
|
# Caller-supplied unique identifier for this node within the flow.
|
|
@@ -641,8 +649,106 @@ module Telnyx
|
|
|
641
649
|
end
|
|
642
650
|
end
|
|
643
651
|
|
|
652
|
+
class Speak < Telnyx::Internal::Type::BaseModel
|
|
653
|
+
# @!attribute id
|
|
654
|
+
# Caller-supplied unique identifier for this node within the flow.
|
|
655
|
+
#
|
|
656
|
+
# @return [String]
|
|
657
|
+
required :id, String
|
|
658
|
+
|
|
659
|
+
# @!attribute message
|
|
660
|
+
# Message delivered to the user verbatim when the flow reaches this node. No LLM
|
|
661
|
+
# turn — the text is spoken/sent exactly as written. `{{variable}}` placeholders
|
|
662
|
+
# are interpolated from the conversation's dynamic variables; an unresolved
|
|
663
|
+
# placeholder renders as an empty string. After delivering, the flow routes via
|
|
664
|
+
# the node's outgoing `llm` / `expression` edges (commonly a single unconditional
|
|
665
|
+
# edge).
|
|
666
|
+
#
|
|
667
|
+
# @return [String]
|
|
668
|
+
required :message, String
|
|
669
|
+
|
|
670
|
+
# @!attribute name
|
|
671
|
+
# Optional human-readable label, displayed in authoring UIs.
|
|
672
|
+
#
|
|
673
|
+
# @return [String, nil]
|
|
674
|
+
optional :name, String
|
|
675
|
+
|
|
676
|
+
# @!attribute position
|
|
677
|
+
# Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
|
|
678
|
+
# by the runtime; round-trips so frontends can persist graph layout across
|
|
679
|
+
# reloads.
|
|
680
|
+
#
|
|
681
|
+
# @return [Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak::Position, nil]
|
|
682
|
+
optional :position,
|
|
683
|
+
-> { Telnyx::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak::Position }
|
|
684
|
+
|
|
685
|
+
# @!attribute type
|
|
686
|
+
# Node kind discriminator. Always `speak` for a speak node.
|
|
687
|
+
#
|
|
688
|
+
# @return [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak::Type, nil]
|
|
689
|
+
optional :type, enum: -> { Telnyx::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak::Type }
|
|
690
|
+
|
|
691
|
+
# @!method initialize(id:, message:, name: nil, position: nil, type: nil)
|
|
692
|
+
# Some parameter documentations has been truncated, see
|
|
693
|
+
# {Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak}
|
|
694
|
+
# for more details.
|
|
695
|
+
#
|
|
696
|
+
# A standalone scripted-message step in a flow, as supplied by clients.
|
|
697
|
+
#
|
|
698
|
+
# Unlike a prompt node, a speak node has no instructions or model — it isn't an
|
|
699
|
+
# LLM turn. Reaching it delivers `message` to the user verbatim (with
|
|
700
|
+
# `{{variable}}` interpolation), then routes via outgoing `llm` / `expression`
|
|
701
|
+
# edges.
|
|
702
|
+
#
|
|
703
|
+
# @param id [String] Caller-supplied unique identifier for this node within the flow.
|
|
704
|
+
#
|
|
705
|
+
# @param message [String] Message delivered to the user verbatim when the flow reaches this node. No LLM t
|
|
706
|
+
#
|
|
707
|
+
# @param name [String] Optional human-readable label, displayed in authoring UIs.
|
|
708
|
+
#
|
|
709
|
+
# @param position [Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak::Position] Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
|
|
710
|
+
#
|
|
711
|
+
# @param type [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak::Type] Node kind discriminator. Always `speak` for a speak node.
|
|
712
|
+
|
|
713
|
+
# @see Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak#position
|
|
714
|
+
class Position < Telnyx::Internal::Type::BaseModel
|
|
715
|
+
# @!attribute x
|
|
716
|
+
# Horizontal coordinate in the authoring canvas.
|
|
717
|
+
#
|
|
718
|
+
# @return [Float]
|
|
719
|
+
required :x, Float
|
|
720
|
+
|
|
721
|
+
# @!attribute y_
|
|
722
|
+
# Vertical coordinate in the authoring canvas.
|
|
723
|
+
#
|
|
724
|
+
# @return [Float]
|
|
725
|
+
required :y_, Float, api_name: :y
|
|
726
|
+
|
|
727
|
+
# @!method initialize(x:, y_:)
|
|
728
|
+
# Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
|
|
729
|
+
# by the runtime; round-trips so frontends can persist graph layout across
|
|
730
|
+
# reloads.
|
|
731
|
+
#
|
|
732
|
+
# @param x [Float] Horizontal coordinate in the authoring canvas.
|
|
733
|
+
#
|
|
734
|
+
# @param y_ [Float] Vertical coordinate in the authoring canvas.
|
|
735
|
+
end
|
|
736
|
+
|
|
737
|
+
# Node kind discriminator. Always `speak` for a speak node.
|
|
738
|
+
#
|
|
739
|
+
# @see Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak#type
|
|
740
|
+
module Type
|
|
741
|
+
extend Telnyx::Internal::Type::Enum
|
|
742
|
+
|
|
743
|
+
SPEAK = :speak
|
|
744
|
+
|
|
745
|
+
# @!method self.values
|
|
746
|
+
# @return [Array<Symbol>]
|
|
747
|
+
end
|
|
748
|
+
end
|
|
749
|
+
|
|
644
750
|
# @!method self.variants
|
|
645
|
-
# @return [Array(Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Prompt, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Tool)]
|
|
751
|
+
# @return [Array(Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Prompt, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Tool, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Node::Speak)]
|
|
646
752
|
end
|
|
647
753
|
|
|
648
754
|
class Edge < Telnyx::Internal::Type::BaseModel
|
|
@@ -656,7 +762,7 @@ module Telnyx
|
|
|
656
762
|
# Condition that gates the transition. Discriminated by `type`: `llm`,
|
|
657
763
|
# `expression`.
|
|
658
764
|
#
|
|
659
|
-
# @return [Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Expression]
|
|
765
|
+
# @return [Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Expression, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Default]
|
|
660
766
|
required :condition,
|
|
661
767
|
union: -> { Telnyx::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition }
|
|
662
768
|
|
|
@@ -687,7 +793,7 @@ module Telnyx
|
|
|
687
793
|
#
|
|
688
794
|
# @param id [String] Caller-supplied unique identifier for this edge within the flow.
|
|
689
795
|
#
|
|
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
|
|
796
|
+
# @param condition [Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Expression, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Default] Condition that gates the transition. Discriminated by `type`: `llm`, `expression
|
|
691
797
|
#
|
|
692
798
|
# @param start_node_id [String] ID of the node this edge transitions away from.
|
|
693
799
|
#
|
|
@@ -717,6 +823,18 @@ module Telnyx
|
|
|
717
823
|
variant :expression,
|
|
718
824
|
-> { Telnyx::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Expression }
|
|
719
825
|
|
|
826
|
+
# Fallback edge condition: fires only when no other edge's condition is true.
|
|
827
|
+
#
|
|
828
|
+
# Evaluated after every conditioned (`llm` / `expression`) edge regardless
|
|
829
|
+
# of declaration order, so it routes the flow whenever none of the node's
|
|
830
|
+
# other outgoing edges match. Valid **only** on edges leaving a `tool` or
|
|
831
|
+
# `speak` node, where the deterministic step auto-advances and must always
|
|
832
|
+
# have somewhere to go. A tool/speak node with any outgoing edge is required
|
|
833
|
+
# to carry exactly one `default` edge so it never dead-ends; a tool/speak
|
|
834
|
+
# node with no outgoing edges is a valid terminal step. Carries no parameters.
|
|
835
|
+
variant :default,
|
|
836
|
+
-> { Telnyx::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Default }
|
|
837
|
+
|
|
720
838
|
class Llm < Telnyx::Internal::Type::BaseModel
|
|
721
839
|
# @!attribute prompt
|
|
722
840
|
# Natural-language criterion the LLM judges as true/false.
|
|
@@ -892,8 +1010,28 @@ module Telnyx
|
|
|
892
1010
|
end
|
|
893
1011
|
end
|
|
894
1012
|
|
|
1013
|
+
class Default < Telnyx::Internal::Type::BaseModel
|
|
1014
|
+
# @!attribute type
|
|
1015
|
+
#
|
|
1016
|
+
# @return [Symbol, :default]
|
|
1017
|
+
required :type, const: :default
|
|
1018
|
+
|
|
1019
|
+
# @!method initialize(type: :default)
|
|
1020
|
+
# Fallback edge condition: fires only when no other edge's condition is true.
|
|
1021
|
+
#
|
|
1022
|
+
# Evaluated after every conditioned (`llm` / `expression`) edge regardless of
|
|
1023
|
+
# declaration order, so it routes the flow whenever none of the node's other
|
|
1024
|
+
# outgoing edges match. Valid **only** on edges leaving a `tool` or `speak` node,
|
|
1025
|
+
# where the deterministic step auto-advances and must always have somewhere to go.
|
|
1026
|
+
# A tool/speak node with any outgoing edge is required to carry exactly one
|
|
1027
|
+
# `default` edge so it never dead-ends; a tool/speak node with no outgoing edges
|
|
1028
|
+
# is a valid terminal step. Carries no parameters.
|
|
1029
|
+
#
|
|
1030
|
+
# @param type [Symbol, :default]
|
|
1031
|
+
end
|
|
1032
|
+
|
|
895
1033
|
# @!method self.variants
|
|
896
|
-
# @return [Array(Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Expression)]
|
|
1034
|
+
# @return [Array(Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Expression, Telnyx::Models::AI::Assistants::UpdateAssistant::ConversationFlow::Edge::Condition::Default)]
|
|
897
1035
|
end
|
|
898
1036
|
|
|
899
1037
|
# Destination of the transition. Discriminated by `type`: `node` (jump to another
|
|
@@ -314,7 +314,7 @@ module Telnyx
|
|
|
314
314
|
# @!attribute nodes
|
|
315
315
|
# All nodes in the flow.
|
|
316
316
|
#
|
|
317
|
-
# @return [Array<Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Prompt, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Tool>]
|
|
317
|
+
# @return [Array<Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Prompt, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Tool, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Speak>]
|
|
318
318
|
required :nodes,
|
|
319
319
|
-> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::InferenceEmbedding::ConversationFlow::Node] }
|
|
320
320
|
|
|
@@ -334,7 +334,7 @@ module Telnyx
|
|
|
334
334
|
# @!method initialize(nodes:, start_node_id:, edges: nil)
|
|
335
335
|
# Conversation flow as returned by the API.
|
|
336
336
|
#
|
|
337
|
-
# @param nodes [Array<Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Prompt, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Tool>] All nodes in the flow.
|
|
337
|
+
# @param nodes [Array<Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Prompt, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Tool, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Speak>] All nodes in the flow.
|
|
338
338
|
#
|
|
339
339
|
# @param start_node_id [String] ID of the node where the conversation begins.
|
|
340
340
|
#
|
|
@@ -352,6 +352,9 @@ module Telnyx
|
|
|
352
352
|
# A standalone tool step in a conversation flow, as returned by the API.
|
|
353
353
|
variant :tool, -> { Telnyx::AI::InferenceEmbedding::ConversationFlow::Node::Tool }
|
|
354
354
|
|
|
355
|
+
# A standalone scripted-message step in a flow, as returned by the API.
|
|
356
|
+
variant :speak, -> { Telnyx::AI::InferenceEmbedding::ConversationFlow::Node::Speak }
|
|
357
|
+
|
|
355
358
|
class Prompt < Telnyx::Internal::Type::BaseModel
|
|
356
359
|
# @!attribute id
|
|
357
360
|
# Caller-supplied unique identifier for this node within the flow.
|
|
@@ -663,8 +666,100 @@ module Telnyx
|
|
|
663
666
|
end
|
|
664
667
|
end
|
|
665
668
|
|
|
669
|
+
class Speak < Telnyx::Internal::Type::BaseModel
|
|
670
|
+
# @!attribute id
|
|
671
|
+
# Caller-supplied unique identifier for this node within the flow.
|
|
672
|
+
#
|
|
673
|
+
# @return [String]
|
|
674
|
+
required :id, String
|
|
675
|
+
|
|
676
|
+
# @!attribute message
|
|
677
|
+
# Message delivered to the user verbatim when the flow reaches this node. No LLM
|
|
678
|
+
# turn — the text is spoken/sent exactly as written. `{{variable}}` placeholders
|
|
679
|
+
# are interpolated from the conversation's dynamic variables; an unresolved
|
|
680
|
+
# placeholder renders as an empty string. After delivering, the flow routes via
|
|
681
|
+
# the node's outgoing `llm` / `expression` edges (commonly a single unconditional
|
|
682
|
+
# edge).
|
|
683
|
+
#
|
|
684
|
+
# @return [String]
|
|
685
|
+
required :message, String
|
|
686
|
+
|
|
687
|
+
# @!attribute name
|
|
688
|
+
# Optional human-readable label, displayed in authoring UIs.
|
|
689
|
+
#
|
|
690
|
+
# @return [String, nil]
|
|
691
|
+
optional :name, String
|
|
692
|
+
|
|
693
|
+
# @!attribute position
|
|
694
|
+
# Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
|
|
695
|
+
# by the runtime; round-trips so frontends can persist graph layout across
|
|
696
|
+
# reloads.
|
|
697
|
+
#
|
|
698
|
+
# @return [Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Speak::Position, nil]
|
|
699
|
+
optional :position, -> { Telnyx::AI::InferenceEmbedding::ConversationFlow::Node::Speak::Position }
|
|
700
|
+
|
|
701
|
+
# @!attribute type
|
|
702
|
+
# Node kind discriminator. Always `speak` for a speak node.
|
|
703
|
+
#
|
|
704
|
+
# @return [Symbol, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Speak::Type, nil]
|
|
705
|
+
optional :type, enum: -> { Telnyx::AI::InferenceEmbedding::ConversationFlow::Node::Speak::Type }
|
|
706
|
+
|
|
707
|
+
# @!method initialize(id:, message:, name: nil, position: nil, type: nil)
|
|
708
|
+
# Some parameter documentations has been truncated, see
|
|
709
|
+
# {Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Speak} for more
|
|
710
|
+
# details.
|
|
711
|
+
#
|
|
712
|
+
# A standalone scripted-message step in a flow, as returned by the API.
|
|
713
|
+
#
|
|
714
|
+
# @param id [String] Caller-supplied unique identifier for this node within the flow.
|
|
715
|
+
#
|
|
716
|
+
# @param message [String] Message delivered to the user verbatim when the flow reaches this node. No LLM t
|
|
717
|
+
#
|
|
718
|
+
# @param name [String] Optional human-readable label, displayed in authoring UIs.
|
|
719
|
+
#
|
|
720
|
+
# @param position [Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Speak::Position] Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
|
|
721
|
+
#
|
|
722
|
+
# @param type [Symbol, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Speak::Type] Node kind discriminator. Always `speak` for a speak node.
|
|
723
|
+
|
|
724
|
+
# @see Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Speak#position
|
|
725
|
+
class Position < Telnyx::Internal::Type::BaseModel
|
|
726
|
+
# @!attribute x
|
|
727
|
+
# Horizontal coordinate in the authoring canvas.
|
|
728
|
+
#
|
|
729
|
+
# @return [Float]
|
|
730
|
+
required :x, Float
|
|
731
|
+
|
|
732
|
+
# @!attribute y_
|
|
733
|
+
# Vertical coordinate in the authoring canvas.
|
|
734
|
+
#
|
|
735
|
+
# @return [Float]
|
|
736
|
+
required :y_, Float, api_name: :y
|
|
737
|
+
|
|
738
|
+
# @!method initialize(x:, y_:)
|
|
739
|
+
# Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
|
|
740
|
+
# by the runtime; round-trips so frontends can persist graph layout across
|
|
741
|
+
# reloads.
|
|
742
|
+
#
|
|
743
|
+
# @param x [Float] Horizontal coordinate in the authoring canvas.
|
|
744
|
+
#
|
|
745
|
+
# @param y_ [Float] Vertical coordinate in the authoring canvas.
|
|
746
|
+
end
|
|
747
|
+
|
|
748
|
+
# Node kind discriminator. Always `speak` for a speak node.
|
|
749
|
+
#
|
|
750
|
+
# @see Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Speak#type
|
|
751
|
+
module Type
|
|
752
|
+
extend Telnyx::Internal::Type::Enum
|
|
753
|
+
|
|
754
|
+
SPEAK = :speak
|
|
755
|
+
|
|
756
|
+
# @!method self.values
|
|
757
|
+
# @return [Array<Symbol>]
|
|
758
|
+
end
|
|
759
|
+
end
|
|
760
|
+
|
|
666
761
|
# @!method self.variants
|
|
667
|
-
# @return [Array(Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Prompt, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Tool)]
|
|
762
|
+
# @return [Array(Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Prompt, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Tool, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Node::Speak)]
|
|
668
763
|
end
|
|
669
764
|
|
|
670
765
|
class Edge < Telnyx::Internal::Type::BaseModel
|
|
@@ -678,7 +773,7 @@ module Telnyx
|
|
|
678
773
|
# Condition that gates the transition. Discriminated by `type`: `llm`,
|
|
679
774
|
# `expression`.
|
|
680
775
|
#
|
|
681
|
-
# @return [Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Expression]
|
|
776
|
+
# @return [Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Expression, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Default]
|
|
682
777
|
required :condition, union: -> { Telnyx::AI::InferenceEmbedding::ConversationFlow::Edge::Condition }
|
|
683
778
|
|
|
684
779
|
# @!attribute start_node_id
|
|
@@ -708,7 +803,7 @@ module Telnyx
|
|
|
708
803
|
#
|
|
709
804
|
# @param id [String] Caller-supplied unique identifier for this edge within the flow.
|
|
710
805
|
#
|
|
711
|
-
# @param condition [Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Expression] Condition that gates the transition. Discriminated by `type`: `llm`, `expression
|
|
806
|
+
# @param condition [Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Expression, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Default] Condition that gates the transition. Discriminated by `type`: `llm`, `expression
|
|
712
807
|
#
|
|
713
808
|
# @param start_node_id [String] ID of the node this edge transitions away from.
|
|
714
809
|
#
|
|
@@ -737,6 +832,17 @@ module Telnyx
|
|
|
737
832
|
# a clean function of known variables — it's cheaper and predictable.
|
|
738
833
|
variant :expression, -> { Telnyx::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Expression }
|
|
739
834
|
|
|
835
|
+
# Fallback edge condition: fires only when no other edge's condition is true.
|
|
836
|
+
#
|
|
837
|
+
# Evaluated after every conditioned (`llm` / `expression`) edge regardless
|
|
838
|
+
# of declaration order, so it routes the flow whenever none of the node's
|
|
839
|
+
# other outgoing edges match. Valid **only** on edges leaving a `tool` or
|
|
840
|
+
# `speak` node, where the deterministic step auto-advances and must always
|
|
841
|
+
# have somewhere to go. A tool/speak node with any outgoing edge is required
|
|
842
|
+
# to carry exactly one `default` edge so it never dead-ends; a tool/speak
|
|
843
|
+
# node with no outgoing edges is a valid terminal step. Carries no parameters.
|
|
844
|
+
variant :default, -> { Telnyx::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Default }
|
|
845
|
+
|
|
740
846
|
class Llm < Telnyx::Internal::Type::BaseModel
|
|
741
847
|
# @!attribute prompt
|
|
742
848
|
# Natural-language criterion the LLM judges as true/false.
|
|
@@ -912,8 +1018,28 @@ module Telnyx
|
|
|
912
1018
|
end
|
|
913
1019
|
end
|
|
914
1020
|
|
|
1021
|
+
class Default < Telnyx::Internal::Type::BaseModel
|
|
1022
|
+
# @!attribute type
|
|
1023
|
+
#
|
|
1024
|
+
# @return [Symbol, :default]
|
|
1025
|
+
required :type, const: :default
|
|
1026
|
+
|
|
1027
|
+
# @!method initialize(type: :default)
|
|
1028
|
+
# Fallback edge condition: fires only when no other edge's condition is true.
|
|
1029
|
+
#
|
|
1030
|
+
# Evaluated after every conditioned (`llm` / `expression`) edge regardless of
|
|
1031
|
+
# declaration order, so it routes the flow whenever none of the node's other
|
|
1032
|
+
# outgoing edges match. Valid **only** on edges leaving a `tool` or `speak` node,
|
|
1033
|
+
# where the deterministic step auto-advances and must always have somewhere to go.
|
|
1034
|
+
# A tool/speak node with any outgoing edge is required to carry exactly one
|
|
1035
|
+
# `default` edge so it never dead-ends; a tool/speak node with no outgoing edges
|
|
1036
|
+
# is a valid terminal step. Carries no parameters.
|
|
1037
|
+
#
|
|
1038
|
+
# @param type [Symbol, :default]
|
|
1039
|
+
end
|
|
1040
|
+
|
|
915
1041
|
# @!method self.variants
|
|
916
|
-
# @return [Array(Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Expression)]
|
|
1042
|
+
# @return [Array(Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Llm, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Expression, Telnyx::Models::AI::InferenceEmbedding::ConversationFlow::Edge::Condition::Default)]
|
|
917
1043
|
end
|
|
918
1044
|
|
|
919
1045
|
# Destination of the transition. Discriminated by `type`: `node` (jump to another
|
data/lib/telnyx/version.rb
CHANGED