telnyx 5.99.0 → 5.101.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +5 -0
  5. data/lib/telnyx/models/ai/assistants/canary_deploy.rb +128 -7
  6. data/lib/telnyx/models/ai/assistants/canary_deploy_response.rb +131 -7
  7. data/lib/telnyx/models/ai/chat_create_completion_params.rb +36 -1
  8. data/lib/telnyx/models/ai/openai/chat_create_completion_params.rb +458 -0
  9. data/lib/telnyx/models/ai/openai/chat_create_completion_response.rb +12 -0
  10. data/lib/telnyx/models/ai/openai_list_models_params.rb +16 -0
  11. data/lib/telnyx/models/ai/openai_list_models_response.rb +52 -0
  12. data/lib/telnyx/models/uac_connection_create_params.rb +738 -0
  13. data/lib/telnyx/models/uac_connection_create_response.rb +898 -0
  14. data/lib/telnyx/models/uac_connection_delete_params.rb +20 -0
  15. data/lib/telnyx/models/uac_connection_delete_response.rb +898 -0
  16. data/lib/telnyx/models/uac_connection_list_params.rb +143 -0
  17. data/lib/telnyx/models/uac_connection_list_response.rb +876 -0
  18. data/lib/telnyx/models/uac_connection_retrieve_params.rb +20 -0
  19. data/lib/telnyx/models/uac_connection_retrieve_response.rb +899 -0
  20. data/lib/telnyx/models/uac_connection_update_params.rb +740 -0
  21. data/lib/telnyx/models/uac_connection_update_response.rb +898 -0
  22. data/lib/telnyx/models/uac_connections/action_check_registration_status_params.rb +22 -0
  23. data/lib/telnyx/models/uac_connections/action_check_registration_status_response.rb +104 -0
  24. data/lib/telnyx/models.rb +12 -0
  25. data/lib/telnyx/resources/ai/assistants/canary_deploys.rb +6 -10
  26. data/lib/telnyx/resources/ai/chat.rb +9 -2
  27. data/lib/telnyx/resources/ai/openai/chat.rb +96 -0
  28. data/lib/telnyx/resources/ai/openai.rb +26 -0
  29. data/lib/telnyx/resources/ai.rb +7 -5
  30. data/lib/telnyx/resources/uac_connections/actions.rb +39 -0
  31. data/lib/telnyx/resources/uac_connections.rb +256 -0
  32. data/lib/telnyx/version.rb +1 -1
  33. data/lib/telnyx.rb +19 -1
  34. data/rbi/telnyx/client.rbi +4 -0
  35. data/rbi/telnyx/models/ai/assistants/canary_deploy.rbi +303 -10
  36. data/rbi/telnyx/models/ai/assistants/canary_deploy_response.rbi +309 -9
  37. data/rbi/telnyx/models/ai/chat_create_completion_params.rbi +58 -0
  38. data/rbi/telnyx/models/ai/openai/chat_create_completion_params.rbi +963 -0
  39. data/rbi/telnyx/models/ai/openai/chat_create_completion_response.rbi +15 -0
  40. data/rbi/telnyx/models/ai/openai_list_models_params.rbi +29 -0
  41. data/rbi/telnyx/models/ai/openai_list_models_response.rbi +96 -0
  42. data/rbi/telnyx/models/uac_connection_create_params.rbi +1465 -0
  43. data/rbi/telnyx/models/uac_connection_create_response.rbi +1793 -0
  44. data/rbi/telnyx/models/uac_connection_delete_params.rbi +35 -0
  45. data/rbi/telnyx/models/uac_connection_delete_response.rbi +1793 -0
  46. data/rbi/telnyx/models/uac_connection_list_params.rbi +261 -0
  47. data/rbi/telnyx/models/uac_connection_list_response.rbi +1727 -0
  48. data/rbi/telnyx/models/uac_connection_retrieve_params.rbi +35 -0
  49. data/rbi/telnyx/models/uac_connection_retrieve_response.rbi +1793 -0
  50. data/rbi/telnyx/models/uac_connection_update_params.rbi +1463 -0
  51. data/rbi/telnyx/models/uac_connection_update_response.rbi +1793 -0
  52. data/rbi/telnyx/models/uac_connections/action_check_registration_status_params.rbi +40 -0
  53. data/rbi/telnyx/models/uac_connections/action_check_registration_status_response.rbi +237 -0
  54. data/rbi/telnyx/models.rbi +12 -0
  55. data/rbi/telnyx/resources/ai/assistants/canary_deploys.rbi +6 -14
  56. data/rbi/telnyx/resources/ai/chat.rbi +11 -1
  57. data/rbi/telnyx/resources/ai/openai/chat.rbi +147 -0
  58. data/rbi/telnyx/resources/ai/openai.rbi +16 -0
  59. data/rbi/telnyx/resources/ai.rbi +5 -5
  60. data/rbi/telnyx/resources/uac_connections/actions.rbi +33 -0
  61. data/rbi/telnyx/resources/uac_connections.rbi +348 -0
  62. data/sig/telnyx/client.rbs +2 -0
  63. data/sig/telnyx/models/ai/assistants/canary_deploy.rbs +113 -4
  64. data/sig/telnyx/models/ai/assistants/canary_deploy_response.rbs +113 -8
  65. data/sig/telnyx/models/ai/chat_create_completion_params.rbs +26 -0
  66. data/sig/telnyx/models/ai/openai/chat_create_completion_params.rbs +434 -0
  67. data/sig/telnyx/models/ai/openai/chat_create_completion_response.rbs +11 -0
  68. data/sig/telnyx/models/ai/openai_list_models_params.rbs +17 -0
  69. data/sig/telnyx/models/ai/openai_list_models_response.rbs +58 -0
  70. data/sig/telnyx/models/uac_connection_create_params.rbs +609 -0
  71. data/sig/telnyx/models/uac_connection_create_response.rbs +741 -0
  72. data/sig/telnyx/models/uac_connection_delete_params.rbs +20 -0
  73. data/sig/telnyx/models/uac_connection_delete_response.rbs +741 -0
  74. data/sig/telnyx/models/uac_connection_list_params.rbs +112 -0
  75. data/sig/telnyx/models/uac_connection_list_response.rbs +722 -0
  76. data/sig/telnyx/models/uac_connection_retrieve_params.rbs +20 -0
  77. data/sig/telnyx/models/uac_connection_retrieve_response.rbs +741 -0
  78. data/sig/telnyx/models/uac_connection_update_params.rbs +615 -0
  79. data/sig/telnyx/models/uac_connection_update_response.rbs +741 -0
  80. data/sig/telnyx/models/uac_connections/action_check_registration_status_params.rbs +22 -0
  81. data/sig/telnyx/models/uac_connections/action_check_registration_status_response.rbs +117 -0
  82. data/sig/telnyx/models.rbs +12 -0
  83. data/sig/telnyx/resources/ai/assistants/canary_deploys.rbs +2 -2
  84. data/sig/telnyx/resources/ai/chat.rbs +2 -0
  85. data/sig/telnyx/resources/ai/openai/chat.rbs +41 -0
  86. data/sig/telnyx/resources/ai/openai.rbs +6 -0
  87. data/sig/telnyx/resources/uac_connections/actions.rbs +14 -0
  88. data/sig/telnyx/resources/uac_connections.rbs +90 -0
  89. metadata +59 -5
  90. data/lib/telnyx/models/ai/assistants/version_config.rb +0 -30
  91. data/rbi/telnyx/models/ai/assistants/version_config.rbi +0 -45
  92. data/sig/telnyx/models/ai/assistants/version_config.rbs +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc569d102597936e9a6c73c0deaa2511beb3d2febb2c05d76871c72705b02f78
4
- data.tar.gz: a6842c07dcfeeaec595415dd65ff740767678d05370fb6082c8b1d18ead625fc
3
+ metadata.gz: b788d1ec382c32e4625205edebf53eb059dc17bcd9d695140ba97acb0d79364c
4
+ data.tar.gz: 4c680da1dbfbce503ac6fd68ad1367a3c1c357746df9fcbbc9cc487860bf15e2
5
5
  SHA512:
6
- metadata.gz: d9580f23f1138595528cf1af1525245d95a11204c18252628fd7767247f816031646e1ba9dfff94d2e92b7fe2710f231d4dd7814bf2d358428856708795f73a2
7
- data.tar.gz: f2dd33b1ad31c203390819a10b51e9b5527990302eaf32e252e681e8040be01ebc7a6b815ee6f3b43ae0fc4ae6c62aaa5e70be39675a7c450a40a0a621d67a46
6
+ metadata.gz: 45db13e01d2bd85f40ca9ef2f070a632f9cd5028431a4509ad05084b9a0f5ba9184080eddda29402b2fbe254830f646101c44325d285d2f8c5dfb16f97c5bc54
7
+ data.tar.gz: 77978113e121bd4d8b47893dc143d54a04b4cc9ad28b79ce77d56d50b570fc7d4d45172d529ac5d550505881c5332887bc1f94685cf8e0ad3ef2daf1d782a043
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.101.0 (2026-05-07)
4
+
5
+ Full Changelog: [v5.100.0...v5.101.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.100.0...v5.101.0)
6
+
7
+ ### Features
8
+
9
+ * inference: expose chat completions and models under /ai/openai ([4711564](https://github.com/team-telnyx/telnyx-ruby/commit/47115648db8895fabe3913e086b23705c8a1851a))
10
+
11
+ ## 5.100.0 (2026-05-06)
12
+
13
+ Full Changelog: [v5.99.0...v5.100.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.99.0...v5.100.0)
14
+
15
+ ### Features
16
+
17
+ * Ai-assistants: support pattern in canary deploy ([4dafaec](https://github.com/team-telnyx/telnyx-ruby/commit/4dafaeca303f3ac584fad93b4729e69298e64610))
18
+
19
+
20
+ ### Documentation
21
+
22
+ * add UAC connection OpenAPI docs ([3f543c6](https://github.com/team-telnyx/telnyx-ruby/commit/3f543c6f2131a0964676c1427e7e3885f91527d5))
23
+
3
24
  ## 5.99.0 (2026-05-04)
4
25
 
5
26
  Full Changelog: [v5.98.0...v5.99.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.98.0...v5.99.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.99.0"
27
+ gem "telnyx", "~> 5.101.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
data/lib/telnyx/client.rb CHANGED
@@ -659,6 +659,10 @@ module Telnyx
659
659
  # @return [Telnyx::Resources::PronunciationDicts]
660
660
  attr_reader :pronunciation_dicts
661
661
 
662
+ # UAC connection operations
663
+ # @return [Telnyx::Resources::UacConnections]
664
+ attr_reader :uac_connections
665
+
662
666
  # @api private
663
667
  #
664
668
  # @return [Hash{String=>String}]
@@ -931,6 +935,7 @@ module Telnyx
931
935
  @reputation = Telnyx::Resources::Reputation.new(client: self)
932
936
  @terms_of_service = Telnyx::Resources::TermsOfService.new(client: self)
933
937
  @pronunciation_dicts = Telnyx::Resources::PronunciationDicts.new(client: self)
938
+ @uac_connections = Telnyx::Resources::UacConnections.new(client: self)
934
939
  end
935
940
  end
936
941
  end
@@ -5,16 +5,137 @@ module Telnyx
5
5
  module AI
6
6
  module Assistants
7
7
  class CanaryDeploy < Telnyx::Internal::Type::BaseModel
8
- # @!attribute versions
9
- # List of version configurations
8
+ # @!attribute rules
10
9
  #
11
- # @return [Array<Telnyx::Models::AI::Assistants::VersionConfig>]
12
- required :versions, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::VersionConfig] }
10
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule>, nil]
11
+ optional :rules, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeploy::Rule] }
13
12
 
14
- # @!method initialize(versions:)
15
- # Request model for creating or updating canary deploys.
13
+ # @!method initialize(rules: nil)
14
+ # Create/update request body. Accepts:
16
15
  #
17
- # @param versions [Array<Telnyx::Models::AI::Assistants::VersionConfig>] List of version configurations
16
+ # - `rules` canonical ordered list of routing rules
17
+ #
18
+ # @param rules [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule>]
19
+
20
+ class Rule < Telnyx::Internal::Type::BaseModel
21
+ # @!attribute serve
22
+ # What a rule serves when matched.
23
+ #
24
+ # Exactly one of:
25
+ #
26
+ # - `version_id` — serve a specific version
27
+ # - `rollout` — weighted random across versions; weights must sum to less than
28
+ # 100, with the leftover routing to the main version
29
+ #
30
+ # @return [Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve]
31
+ required :serve, -> { Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve }
32
+
33
+ # @!attribute match
34
+ #
35
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match>, nil]
36
+ optional :match, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeploy::Rule::Match] }
37
+
38
+ # @!method initialize(serve:, match: nil)
39
+ # Some parameter documentations has been truncated, see
40
+ # {Telnyx::Models::AI::Assistants::CanaryDeploy::Rule} for more details.
41
+ #
42
+ # A targeting rule: `match` clauses (AND) gate `serve`.
43
+ #
44
+ # An empty `match` is a catch-all (always fires).
45
+ #
46
+ # @param serve [Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve] What a rule serves when matched.
47
+ #
48
+ # @param match [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match>]
49
+
50
+ # @see Telnyx::Models::AI::Assistants::CanaryDeploy::Rule#serve
51
+ class Serve < Telnyx::Internal::Type::BaseModel
52
+ # @!attribute rollout
53
+ #
54
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout>, nil]
55
+ optional :rollout,
56
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout] }
57
+
58
+ # @!attribute version_id
59
+ #
60
+ # @return [String, nil]
61
+ optional :version_id, String
62
+
63
+ # @!method initialize(rollout: nil, version_id: nil)
64
+ # What a rule serves when matched.
65
+ #
66
+ # Exactly one of:
67
+ #
68
+ # - `version_id` — serve a specific version
69
+ # - `rollout` — weighted random across versions; weights must sum to less than
70
+ # 100, with the leftover routing to the main version
71
+ #
72
+ # @param rollout [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout>]
73
+ # @param version_id [String]
74
+
75
+ class Rollout < Telnyx::Internal::Type::BaseModel
76
+ # @!attribute version_id
77
+ #
78
+ # @return [String]
79
+ required :version_id, String
80
+
81
+ # @!attribute weight
82
+ #
83
+ # @return [Float]
84
+ required :weight, Float
85
+
86
+ # @!method initialize(version_id:, weight:)
87
+ # One slot in a percentage rollout.
88
+ #
89
+ # @param version_id [String]
90
+ # @param weight [Float]
91
+ end
92
+ end
93
+
94
+ class Match < Telnyx::Internal::Type::BaseModel
95
+ # @!attribute attribute
96
+ # Attribute name from the routing context
97
+ #
98
+ # @return [String]
99
+ required :attribute, String
100
+
101
+ # @!attribute operator
102
+ # Match operator
103
+ #
104
+ # @return [Symbol, Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match::Operator]
105
+ required :operator, enum: -> { Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::Operator }
106
+
107
+ # @!attribute values
108
+ #
109
+ # @return [Array<String>]
110
+ required :values, Telnyx::Internal::Type::ArrayOf[String]
111
+
112
+ # @!method initialize(attribute:, operator:, values:)
113
+ # A single attribute/operator/values check.
114
+ #
115
+ # A clause matches when the routing context's value for `attribute` satisfies
116
+ # `operator` against any of `values`.
117
+ #
118
+ # @param attribute [String] Attribute name from the routing context
119
+ #
120
+ # @param operator [Symbol, Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match::Operator] Match operator
121
+ #
122
+ # @param values [Array<String>]
123
+
124
+ # Match operator
125
+ #
126
+ # @see Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match#operator
127
+ module Operator
128
+ extend Telnyx::Internal::Type::Enum
129
+
130
+ IN = :in
131
+ NOT_IN = :not_in
132
+ STARTS_WITH = :starts_with
133
+
134
+ # @!method self.values
135
+ # @return [Array<Symbol>]
136
+ end
137
+ end
138
+ end
18
139
  end
19
140
  end
20
141
  end
@@ -16,23 +16,147 @@ module Telnyx
16
16
  # @return [Time]
17
17
  required :created_at, Time
18
18
 
19
+ # @!attribute rules
20
+ #
21
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule>]
22
+ required :rules,
23
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeployResponse::Rule] }
24
+
19
25
  # @!attribute updated_at
20
26
  #
21
27
  # @return [Time]
22
28
  required :updated_at, Time
23
29
 
24
- # @!attribute versions
30
+ # @!method initialize(assistant_id:, created_at:, rules:, updated_at:)
31
+ # Response shape.
25
32
  #
26
- # @return [Array<Telnyx::Models::AI::Assistants::VersionConfig>]
27
- required :versions, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::VersionConfig] }
28
-
29
- # @!method initialize(assistant_id:, created_at:, updated_at:, versions:)
30
- # Response model for canary deploy operations.
33
+ # Always carries `rules` (canonical).
31
34
  #
32
35
  # @param assistant_id [String]
33
36
  # @param created_at [Time]
37
+ # @param rules [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule>]
34
38
  # @param updated_at [Time]
35
- # @param versions [Array<Telnyx::Models::AI::Assistants::VersionConfig>]
39
+
40
+ class Rule < Telnyx::Internal::Type::BaseModel
41
+ # @!attribute serve
42
+ # What a rule serves when matched.
43
+ #
44
+ # Exactly one of:
45
+ #
46
+ # - `version_id` — serve a specific version
47
+ # - `rollout` — weighted random across versions; weights must sum to less than
48
+ # 100, with the leftover routing to the main version
49
+ #
50
+ # @return [Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve]
51
+ required :serve, -> { Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve }
52
+
53
+ # @!attribute match
54
+ #
55
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match>, nil]
56
+ optional :match,
57
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match] }
58
+
59
+ # @!method initialize(serve:, match: nil)
60
+ # Some parameter documentations has been truncated, see
61
+ # {Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule} for more details.
62
+ #
63
+ # A targeting rule: `match` clauses (AND) gate `serve`.
64
+ #
65
+ # An empty `match` is a catch-all (always fires).
66
+ #
67
+ # @param serve [Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve] What a rule serves when matched.
68
+ #
69
+ # @param match [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match>]
70
+
71
+ # @see Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule#serve
72
+ class Serve < Telnyx::Internal::Type::BaseModel
73
+ # @!attribute rollout
74
+ #
75
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout>, nil]
76
+ optional :rollout,
77
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout] }
78
+
79
+ # @!attribute version_id
80
+ #
81
+ # @return [String, nil]
82
+ optional :version_id, String
83
+
84
+ # @!method initialize(rollout: nil, version_id: nil)
85
+ # What a rule serves when matched.
86
+ #
87
+ # Exactly one of:
88
+ #
89
+ # - `version_id` — serve a specific version
90
+ # - `rollout` — weighted random across versions; weights must sum to less than
91
+ # 100, with the leftover routing to the main version
92
+ #
93
+ # @param rollout [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout>]
94
+ # @param version_id [String]
95
+
96
+ class Rollout < Telnyx::Internal::Type::BaseModel
97
+ # @!attribute version_id
98
+ #
99
+ # @return [String]
100
+ required :version_id, String
101
+
102
+ # @!attribute weight
103
+ #
104
+ # @return [Float]
105
+ required :weight, Float
106
+
107
+ # @!method initialize(version_id:, weight:)
108
+ # One slot in a percentage rollout.
109
+ #
110
+ # @param version_id [String]
111
+ # @param weight [Float]
112
+ end
113
+ end
114
+
115
+ class Match < Telnyx::Internal::Type::BaseModel
116
+ # @!attribute attribute
117
+ # Attribute name from the routing context
118
+ #
119
+ # @return [String]
120
+ required :attribute, String
121
+
122
+ # @!attribute operator
123
+ # Match operator
124
+ #
125
+ # @return [Symbol, Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator]
126
+ required :operator, enum: -> { Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator }
127
+
128
+ # @!attribute values
129
+ #
130
+ # @return [Array<String>]
131
+ required :values, Telnyx::Internal::Type::ArrayOf[String]
132
+
133
+ # @!method initialize(attribute:, operator:, values:)
134
+ # A single attribute/operator/values check.
135
+ #
136
+ # A clause matches when the routing context's value for `attribute` satisfies
137
+ # `operator` against any of `values`.
138
+ #
139
+ # @param attribute [String] Attribute name from the routing context
140
+ #
141
+ # @param operator [Symbol, Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator] Match operator
142
+ #
143
+ # @param values [Array<String>]
144
+
145
+ # Match operator
146
+ #
147
+ # @see Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match#operator
148
+ module Operator
149
+ extend Telnyx::Internal::Type::Enum
150
+
151
+ IN = :in
152
+ NOT_IN = :not_in
153
+ STARTS_WITH = :starts_with
154
+
155
+ # @!method self.values
156
+ # @return [Array<Symbol>]
157
+ end
158
+ end
159
+ end
36
160
  end
37
161
  end
38
162
  end
@@ -125,6 +125,21 @@ module Telnyx
125
125
  # @return [Telnyx::Models::AI::ChatCreateCompletionParams::ResponseFormat, nil]
126
126
  optional :response_format, -> { Telnyx::AI::ChatCreateCompletionParams::ResponseFormat }
127
127
 
128
+ # @!attribute seed
129
+ # If specified, the system will make a best effort to sample deterministically,
130
+ # such that repeated requests with the same `seed` and parameters should return
131
+ # the same result.
132
+ #
133
+ # @return [Integer, nil]
134
+ optional :seed, Integer
135
+
136
+ # @!attribute stop
137
+ # Up to 4 sequences where the API will stop generating further tokens. The
138
+ # returned text will not contain the stop sequence.
139
+ #
140
+ # @return [String, Array<String>, nil]
141
+ optional :stop, union: -> { Telnyx::AI::ChatCreateCompletionParams::Stop }
142
+
128
143
  # @!attribute stream
129
144
  # Whether or not to stream data-only server-sent events as they become available.
130
145
  #
@@ -178,7 +193,7 @@ module Telnyx
178
193
  # @return [Boolean, nil]
179
194
  optional :use_beam_search, Telnyx::Internal::Type::Boolean
180
195
 
181
- # @!method initialize(messages:, api_key_ref: nil, best_of: nil, early_stopping: nil, enable_thinking: nil, frequency_penalty: nil, guided_choice: nil, guided_json: nil, guided_regex: nil, length_penalty: nil, logprobs: nil, max_tokens: nil, min_p: nil, model: nil, n: nil, presence_penalty: nil, response_format: nil, stream: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, use_beam_search: nil, request_options: {})
196
+ # @!method initialize(messages:, api_key_ref: nil, best_of: nil, early_stopping: nil, enable_thinking: nil, frequency_penalty: nil, guided_choice: nil, guided_json: nil, guided_regex: nil, length_penalty: nil, logprobs: nil, max_tokens: nil, min_p: nil, model: nil, n: nil, presence_penalty: nil, response_format: nil, seed: nil, stop: nil, stream: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, use_beam_search: nil, request_options: {})
182
197
  # Some parameter documentations has been truncated, see
183
198
  # {Telnyx::Models::AI::ChatCreateCompletionParams} for more details.
184
199
  #
@@ -216,6 +231,10 @@ module Telnyx
216
231
  #
217
232
  # @param response_format [Telnyx::Models::AI::ChatCreateCompletionParams::ResponseFormat] Use this is you want to guarantee a JSON output without defining a schema. For c
218
233
  #
234
+ # @param seed [Integer] If specified, the system will make a best effort to sample deterministically, su
235
+ #
236
+ # @param stop [String, Array<String>] Up to 4 sequences where the API will stop generating further tokens. The returne
237
+ #
219
238
  # @param stream [Boolean] Whether or not to stream data-only server-sent events as they become available.
220
239
  #
221
240
  # @param temperature [Float] Adjusts the "creativity" of the model. Lower values make the model more determin
@@ -337,6 +356,22 @@ module Telnyx
337
356
  end
338
357
  end
339
358
 
359
+ # Up to 4 sequences where the API will stop generating further tokens. The
360
+ # returned text will not contain the stop sequence.
361
+ module Stop
362
+ extend Telnyx::Internal::Type::Union
363
+
364
+ variant String
365
+
366
+ variant -> { Telnyx::Models::AI::ChatCreateCompletionParams::Stop::StringArray }
367
+
368
+ # @!method self.variants
369
+ # @return [Array(String, Array<String>)]
370
+
371
+ # @type [Telnyx::Internal::Type::Converter]
372
+ StringArray = Telnyx::Internal::Type::ArrayOf[String]
373
+ end
374
+
340
375
  module ToolChoice
341
376
  extend Telnyx::Internal::Type::Enum
342
377