telnyx 5.125.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 +8 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/assistant_create_params.rb +142 -6
- 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_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_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
|
@@ -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
|
@@ -542,7 +542,8 @@ module Telnyx
|
|
|
542
542
|
T::Array[
|
|
543
543
|
T.any(
|
|
544
544
|
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Prompt,
|
|
545
|
-
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Tool
|
|
545
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Tool,
|
|
546
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak
|
|
546
547
|
)
|
|
547
548
|
]
|
|
548
549
|
)
|
|
@@ -586,7 +587,8 @@ module Telnyx
|
|
|
586
587
|
T::Array[
|
|
587
588
|
T.any(
|
|
588
589
|
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Prompt::OrHash,
|
|
589
|
-
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Tool::OrHash
|
|
590
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Tool::OrHash,
|
|
591
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::OrHash
|
|
590
592
|
)
|
|
591
593
|
],
|
|
592
594
|
start_node_id: String,
|
|
@@ -614,7 +616,8 @@ module Telnyx
|
|
|
614
616
|
T::Array[
|
|
615
617
|
T.any(
|
|
616
618
|
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Prompt,
|
|
617
|
-
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Tool
|
|
619
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Tool,
|
|
620
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak
|
|
618
621
|
)
|
|
619
622
|
],
|
|
620
623
|
start_node_id: String,
|
|
@@ -639,7 +642,8 @@ module Telnyx
|
|
|
639
642
|
T.type_alias do
|
|
640
643
|
T.any(
|
|
641
644
|
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Prompt,
|
|
642
|
-
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Tool
|
|
645
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Tool,
|
|
646
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak
|
|
643
647
|
)
|
|
644
648
|
end
|
|
645
649
|
|
|
@@ -1234,6 +1238,192 @@ module Telnyx
|
|
|
1234
1238
|
end
|
|
1235
1239
|
end
|
|
1236
1240
|
|
|
1241
|
+
class Speak < Telnyx::Internal::Type::BaseModel
|
|
1242
|
+
OrHash =
|
|
1243
|
+
T.type_alias do
|
|
1244
|
+
T.any(
|
|
1245
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak,
|
|
1246
|
+
Telnyx::Internal::AnyHash
|
|
1247
|
+
)
|
|
1248
|
+
end
|
|
1249
|
+
|
|
1250
|
+
# Caller-supplied unique identifier for this node within the flow.
|
|
1251
|
+
sig { returns(String) }
|
|
1252
|
+
attr_accessor :id
|
|
1253
|
+
|
|
1254
|
+
# Message delivered to the user verbatim when the flow reaches this node. No LLM
|
|
1255
|
+
# turn — the text is spoken/sent exactly as written. `{{variable}}` placeholders
|
|
1256
|
+
# are interpolated from the conversation's dynamic variables; an unresolved
|
|
1257
|
+
# placeholder renders as an empty string. After delivering, the flow routes via
|
|
1258
|
+
# the node's outgoing `llm` / `expression` edges (commonly a single unconditional
|
|
1259
|
+
# edge).
|
|
1260
|
+
sig { returns(String) }
|
|
1261
|
+
attr_accessor :message
|
|
1262
|
+
|
|
1263
|
+
# Optional human-readable label, displayed in authoring UIs.
|
|
1264
|
+
sig { returns(T.nilable(String)) }
|
|
1265
|
+
attr_reader :name
|
|
1266
|
+
|
|
1267
|
+
sig { params(name: String).void }
|
|
1268
|
+
attr_writer :name
|
|
1269
|
+
|
|
1270
|
+
# Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
|
|
1271
|
+
# by the runtime; round-trips so frontends can persist graph layout across
|
|
1272
|
+
# reloads.
|
|
1273
|
+
sig do
|
|
1274
|
+
returns(
|
|
1275
|
+
T.nilable(
|
|
1276
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Position
|
|
1277
|
+
)
|
|
1278
|
+
)
|
|
1279
|
+
end
|
|
1280
|
+
attr_reader :position
|
|
1281
|
+
|
|
1282
|
+
sig do
|
|
1283
|
+
params(
|
|
1284
|
+
position:
|
|
1285
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Position::OrHash
|
|
1286
|
+
).void
|
|
1287
|
+
end
|
|
1288
|
+
attr_writer :position
|
|
1289
|
+
|
|
1290
|
+
# Node kind discriminator. Always `speak` for a speak node.
|
|
1291
|
+
sig do
|
|
1292
|
+
returns(
|
|
1293
|
+
T.nilable(
|
|
1294
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Type::OrSymbol
|
|
1295
|
+
)
|
|
1296
|
+
)
|
|
1297
|
+
end
|
|
1298
|
+
attr_reader :type
|
|
1299
|
+
|
|
1300
|
+
sig do
|
|
1301
|
+
params(
|
|
1302
|
+
type:
|
|
1303
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Type::OrSymbol
|
|
1304
|
+
).void
|
|
1305
|
+
end
|
|
1306
|
+
attr_writer :type
|
|
1307
|
+
|
|
1308
|
+
# A standalone scripted-message step in a flow, as supplied by clients.
|
|
1309
|
+
#
|
|
1310
|
+
# Unlike a prompt node, a speak node has no instructions or model — it isn't an
|
|
1311
|
+
# LLM turn. Reaching it delivers `message` to the user verbatim (with
|
|
1312
|
+
# `{{variable}}` interpolation), then routes via outgoing `llm` / `expression`
|
|
1313
|
+
# edges.
|
|
1314
|
+
sig do
|
|
1315
|
+
params(
|
|
1316
|
+
id: String,
|
|
1317
|
+
message: String,
|
|
1318
|
+
name: String,
|
|
1319
|
+
position:
|
|
1320
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Position::OrHash,
|
|
1321
|
+
type:
|
|
1322
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Type::OrSymbol
|
|
1323
|
+
).returns(T.attached_class)
|
|
1324
|
+
end
|
|
1325
|
+
def self.new(
|
|
1326
|
+
# Caller-supplied unique identifier for this node within the flow.
|
|
1327
|
+
id:,
|
|
1328
|
+
# Message delivered to the user verbatim when the flow reaches this node. No LLM
|
|
1329
|
+
# turn — the text is spoken/sent exactly as written. `{{variable}}` placeholders
|
|
1330
|
+
# are interpolated from the conversation's dynamic variables; an unresolved
|
|
1331
|
+
# placeholder renders as an empty string. After delivering, the flow routes via
|
|
1332
|
+
# the node's outgoing `llm` / `expression` edges (commonly a single unconditional
|
|
1333
|
+
# edge).
|
|
1334
|
+
message:,
|
|
1335
|
+
# Optional human-readable label, displayed in authoring UIs.
|
|
1336
|
+
name: nil,
|
|
1337
|
+
# Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
|
|
1338
|
+
# by the runtime; round-trips so frontends can persist graph layout across
|
|
1339
|
+
# reloads.
|
|
1340
|
+
position: nil,
|
|
1341
|
+
# Node kind discriminator. Always `speak` for a speak node.
|
|
1342
|
+
type: nil
|
|
1343
|
+
)
|
|
1344
|
+
end
|
|
1345
|
+
|
|
1346
|
+
sig do
|
|
1347
|
+
override.returns(
|
|
1348
|
+
{
|
|
1349
|
+
id: String,
|
|
1350
|
+
message: String,
|
|
1351
|
+
name: String,
|
|
1352
|
+
position:
|
|
1353
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Position,
|
|
1354
|
+
type:
|
|
1355
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Type::OrSymbol
|
|
1356
|
+
}
|
|
1357
|
+
)
|
|
1358
|
+
end
|
|
1359
|
+
def to_hash
|
|
1360
|
+
end
|
|
1361
|
+
|
|
1362
|
+
class Position < Telnyx::Internal::Type::BaseModel
|
|
1363
|
+
OrHash =
|
|
1364
|
+
T.type_alias do
|
|
1365
|
+
T.any(
|
|
1366
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Position,
|
|
1367
|
+
Telnyx::Internal::AnyHash
|
|
1368
|
+
)
|
|
1369
|
+
end
|
|
1370
|
+
|
|
1371
|
+
# Horizontal coordinate in the authoring canvas.
|
|
1372
|
+
sig { returns(Float) }
|
|
1373
|
+
attr_accessor :x
|
|
1374
|
+
|
|
1375
|
+
# Vertical coordinate in the authoring canvas.
|
|
1376
|
+
sig { returns(Float) }
|
|
1377
|
+
attr_accessor :y_
|
|
1378
|
+
|
|
1379
|
+
# Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored
|
|
1380
|
+
# by the runtime; round-trips so frontends can persist graph layout across
|
|
1381
|
+
# reloads.
|
|
1382
|
+
sig { params(x: Float, y_: Float).returns(T.attached_class) }
|
|
1383
|
+
def self.new(
|
|
1384
|
+
# Horizontal coordinate in the authoring canvas.
|
|
1385
|
+
x:,
|
|
1386
|
+
# Vertical coordinate in the authoring canvas.
|
|
1387
|
+
y_:
|
|
1388
|
+
)
|
|
1389
|
+
end
|
|
1390
|
+
|
|
1391
|
+
sig { override.returns({ x: Float, y_: Float }) }
|
|
1392
|
+
def to_hash
|
|
1393
|
+
end
|
|
1394
|
+
end
|
|
1395
|
+
|
|
1396
|
+
# Node kind discriminator. Always `speak` for a speak node.
|
|
1397
|
+
module Type
|
|
1398
|
+
extend Telnyx::Internal::Type::Enum
|
|
1399
|
+
|
|
1400
|
+
TaggedSymbol =
|
|
1401
|
+
T.type_alias do
|
|
1402
|
+
T.all(
|
|
1403
|
+
Symbol,
|
|
1404
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Type
|
|
1405
|
+
)
|
|
1406
|
+
end
|
|
1407
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1408
|
+
|
|
1409
|
+
SPEAK =
|
|
1410
|
+
T.let(
|
|
1411
|
+
:speak,
|
|
1412
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Type::TaggedSymbol
|
|
1413
|
+
)
|
|
1414
|
+
|
|
1415
|
+
sig do
|
|
1416
|
+
override.returns(
|
|
1417
|
+
T::Array[
|
|
1418
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Node::Speak::Type::TaggedSymbol
|
|
1419
|
+
]
|
|
1420
|
+
)
|
|
1421
|
+
end
|
|
1422
|
+
def self.values
|
|
1423
|
+
end
|
|
1424
|
+
end
|
|
1425
|
+
end
|
|
1426
|
+
|
|
1237
1427
|
sig do
|
|
1238
1428
|
override.returns(
|
|
1239
1429
|
T::Array[
|
|
@@ -1264,7 +1454,8 @@ module Telnyx
|
|
|
1264
1454
|
returns(
|
|
1265
1455
|
T.any(
|
|
1266
1456
|
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Llm,
|
|
1267
|
-
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression
|
|
1457
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression,
|
|
1458
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Default
|
|
1268
1459
|
)
|
|
1269
1460
|
)
|
|
1270
1461
|
end
|
|
@@ -1298,7 +1489,8 @@ module Telnyx
|
|
|
1298
1489
|
condition:
|
|
1299
1490
|
T.any(
|
|
1300
1491
|
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Llm::OrHash,
|
|
1301
|
-
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::OrHash
|
|
1492
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression::OrHash,
|
|
1493
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Default::OrHash
|
|
1302
1494
|
),
|
|
1303
1495
|
start_node_id: String,
|
|
1304
1496
|
target:
|
|
@@ -1329,7 +1521,8 @@ module Telnyx
|
|
|
1329
1521
|
condition:
|
|
1330
1522
|
T.any(
|
|
1331
1523
|
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Llm,
|
|
1332
|
-
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression
|
|
1524
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression,
|
|
1525
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Default
|
|
1333
1526
|
),
|
|
1334
1527
|
start_node_id: String,
|
|
1335
1528
|
target:
|
|
@@ -1352,7 +1545,8 @@ module Telnyx
|
|
|
1352
1545
|
T.type_alias do
|
|
1353
1546
|
T.any(
|
|
1354
1547
|
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Llm,
|
|
1355
|
-
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression
|
|
1548
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Expression,
|
|
1549
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Default
|
|
1356
1550
|
)
|
|
1357
1551
|
end
|
|
1358
1552
|
|
|
@@ -1647,6 +1841,36 @@ module Telnyx
|
|
|
1647
1841
|
end
|
|
1648
1842
|
end
|
|
1649
1843
|
|
|
1844
|
+
class Default < Telnyx::Internal::Type::BaseModel
|
|
1845
|
+
OrHash =
|
|
1846
|
+
T.type_alias do
|
|
1847
|
+
T.any(
|
|
1848
|
+
Telnyx::AI::AssistantCreateParams::ConversationFlow::Edge::Condition::Default,
|
|
1849
|
+
Telnyx::Internal::AnyHash
|
|
1850
|
+
)
|
|
1851
|
+
end
|
|
1852
|
+
|
|
1853
|
+
sig { returns(Symbol) }
|
|
1854
|
+
attr_accessor :type
|
|
1855
|
+
|
|
1856
|
+
# Fallback edge condition: fires only when no other edge's condition is true.
|
|
1857
|
+
#
|
|
1858
|
+
# Evaluated after every conditioned (`llm` / `expression`) edge regardless of
|
|
1859
|
+
# declaration order, so it routes the flow whenever none of the node's other
|
|
1860
|
+
# outgoing edges match. Valid **only** on edges leaving a `tool` or `speak` node,
|
|
1861
|
+
# where the deterministic step auto-advances and must always have somewhere to go.
|
|
1862
|
+
# A tool/speak node with any outgoing edge is required to carry exactly one
|
|
1863
|
+
# `default` edge so it never dead-ends; a tool/speak node with no outgoing edges
|
|
1864
|
+
# is a valid terminal step. Carries no parameters.
|
|
1865
|
+
sig { params(type: Symbol).returns(T.attached_class) }
|
|
1866
|
+
def self.new(type: :default)
|
|
1867
|
+
end
|
|
1868
|
+
|
|
1869
|
+
sig { override.returns({ type: Symbol }) }
|
|
1870
|
+
def to_hash
|
|
1871
|
+
end
|
|
1872
|
+
end
|
|
1873
|
+
|
|
1650
1874
|
sig do
|
|
1651
1875
|
override.returns(
|
|
1652
1876
|
T::Array[
|