telnyx 5.104.0 → 5.106.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/call_dial_params.rb +21 -5
- data/lib/telnyx/models/calls/action_transfer_params.rb +17 -5
- data/lib/telnyx/models/model_metadata.rb +184 -7
- data/lib/telnyx/resources/ai/openai.rb +15 -5
- data/lib/telnyx/resources/ai.rb +9 -5
- data/lib/telnyx/resources/calls/actions.rb +2 -2
- data/lib/telnyx/resources/calls.rb +1 -1
- data/lib/telnyx/version.rb +1 -1
- data/rbi/telnyx/models/call_dial_params.rbi +30 -6
- data/rbi/telnyx/models/calls/action_transfer_params.rbi +25 -5
- data/rbi/telnyx/models/model_metadata.rbi +228 -4
- data/rbi/telnyx/resources/ai/openai.rbi +15 -5
- data/rbi/telnyx/resources/ai.rbi +9 -5
- data/rbi/telnyx/resources/calls/actions.rbi +10 -2
- data/rbi/telnyx/resources/calls.rbi +10 -2
- data/sig/telnyx/models/model_metadata.rbs +116 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c40ebb14623acd3df51f2cd6eb3c5b1978936b42835dbf93f611e8a0a599ff7a
|
|
4
|
+
data.tar.gz: 936c360c1278f930e62111b8957b6f594ebd53be542f99983c12956f2ce0caf1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4da3bea0b147d4c8084e9f86a4aa4328348e5020a8a60d4487c3b8954165fccdb661dd8d326da264852249c27b77cde02e7bba4de97dbd224531b5280cadef72
|
|
7
|
+
data.tar.gz: b5919a5f7b79f7fea42fc6e99f5d708dae9655d8b5838db050707464a677d4128b5be6278059a4de3060b93f001dc01fbe849f2d5b24e4d5bf2829e74ba67b13
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.106.0 (2026-05-08)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v5.105.0...v5.106.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.105.0...v5.106.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* AI-2294: document /ai/openai/models response and refresh LLM examples ([fe820e3](https://github.com/team-telnyx/telnyx-ruby/commit/fe820e34daed754d06fb23d9667442e154fe51c9))
|
|
10
|
+
|
|
11
|
+
## 5.105.0 (2026-05-08)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v5.104.0...v5.105.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.104.0...v5.105.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* Document per-endpoint media encryption for call control ([3423cf7](https://github.com/team-telnyx/telnyx-ruby/commit/3423cf75cd3f3102fced8d3e69c794159211f0b1))
|
|
18
|
+
|
|
3
19
|
## 5.104.0 (2026-05-08)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v5.103.1...v5.104.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.103.1...v5.104.0)
|
data/README.md
CHANGED
|
@@ -23,7 +23,11 @@ module Telnyx
|
|
|
23
23
|
|
|
24
24
|
# @!attribute to
|
|
25
25
|
# The DID or SIP URI to dial out to. Multiple DID or SIP URIs can be provided
|
|
26
|
-
# using an array of strings
|
|
26
|
+
# using an array of strings. For SIP URI destinations, append `;secure=true` or
|
|
27
|
+
# `;secure=srtp` to enable SRTP media encryption for that endpoint, or
|
|
28
|
+
# `;secure=dtls` to enable DTLS media encryption for that endpoint. If
|
|
29
|
+
# `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
|
|
30
|
+
# per-endpoint `secure` URI parameter.
|
|
27
31
|
#
|
|
28
32
|
# @return [String, Array<String>]
|
|
29
33
|
required :to, union: -> { Telnyx::CallDialParams::To }
|
|
@@ -161,7 +165,11 @@ module Telnyx
|
|
|
161
165
|
optional :link_to, String
|
|
162
166
|
|
|
163
167
|
# @!attribute media_encryption
|
|
164
|
-
# Defines whether media should be encrypted on the call.
|
|
168
|
+
# Defines whether media should be encrypted on the call. For SIP URI destinations,
|
|
169
|
+
# media encryption can also be requested per endpoint with the `secure` URI
|
|
170
|
+
# parameter: `;secure=true` or `;secure=srtp` enables SRTP, and `;secure=dtls`
|
|
171
|
+
# enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes precedence
|
|
172
|
+
# over the per-endpoint `secure` value.
|
|
165
173
|
#
|
|
166
174
|
# @return [Symbol, Telnyx::Models::CallDialParams::MediaEncryption, nil]
|
|
167
175
|
optional :media_encryption, enum: -> { Telnyx::CallDialParams::MediaEncryption }
|
|
@@ -492,7 +500,7 @@ module Telnyx
|
|
|
492
500
|
#
|
|
493
501
|
# @param link_to [String] Use another call's control id for sharing the same call session id
|
|
494
502
|
#
|
|
495
|
-
# @param media_encryption [Symbol, Telnyx::Models::CallDialParams::MediaEncryption] Defines whether media should be encrypted on the call.
|
|
503
|
+
# @param media_encryption [Symbol, Telnyx::Models::CallDialParams::MediaEncryption] Defines whether media should be encrypted on the call. For SIP URI destinations,
|
|
496
504
|
#
|
|
497
505
|
# @param media_name [String] The media_name of a file to be played back to the callee when the call is answer
|
|
498
506
|
#
|
|
@@ -578,7 +586,11 @@ module Telnyx
|
|
|
578
586
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
579
587
|
|
|
580
588
|
# The DID or SIP URI to dial out to. Multiple DID or SIP URIs can be provided
|
|
581
|
-
# using an array of strings
|
|
589
|
+
# using an array of strings. For SIP URI destinations, append `;secure=true` or
|
|
590
|
+
# `;secure=srtp` to enable SRTP media encryption for that endpoint, or
|
|
591
|
+
# `;secure=dtls` to enable DTLS media encryption for that endpoint. If
|
|
592
|
+
# `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
|
|
593
|
+
# per-endpoint `secure` URI parameter.
|
|
582
594
|
module To
|
|
583
595
|
extend Telnyx::Internal::Type::Union
|
|
584
596
|
|
|
@@ -937,7 +949,11 @@ module Telnyx
|
|
|
937
949
|
# @param timeout [Integer] Maximum time in seconds to wait for a detection result before timing out.
|
|
938
950
|
end
|
|
939
951
|
|
|
940
|
-
# Defines whether media should be encrypted on the call.
|
|
952
|
+
# Defines whether media should be encrypted on the call. For SIP URI destinations,
|
|
953
|
+
# media encryption can also be requested per endpoint with the `secure` URI
|
|
954
|
+
# parameter: `;secure=true` or `;secure=srtp` enables SRTP, and `;secure=dtls`
|
|
955
|
+
# enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes precedence
|
|
956
|
+
# over the per-endpoint `secure` value.
|
|
941
957
|
module MediaEncryption
|
|
942
958
|
extend Telnyx::Internal::Type::Enum
|
|
943
959
|
|
|
@@ -14,7 +14,11 @@ module Telnyx
|
|
|
14
14
|
required :call_control_id, String
|
|
15
15
|
|
|
16
16
|
# @!attribute to
|
|
17
|
-
# The DID or SIP URI to dial out to.
|
|
17
|
+
# The DID or SIP URI to dial out to. For SIP URI destinations, append
|
|
18
|
+
# `;secure=true` or `;secure=srtp` to enable SRTP media encryption for that
|
|
19
|
+
# endpoint, or `;secure=dtls` to enable DTLS media encryption for that endpoint.
|
|
20
|
+
# If `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
|
|
21
|
+
# per-endpoint `secure` URI parameter.
|
|
18
22
|
#
|
|
19
23
|
# @return [String]
|
|
20
24
|
required :to, String
|
|
@@ -95,7 +99,11 @@ module Telnyx
|
|
|
95
99
|
optional :from_display_name, String
|
|
96
100
|
|
|
97
101
|
# @!attribute media_encryption
|
|
98
|
-
# Defines whether media should be encrypted on the new call leg.
|
|
102
|
+
# Defines whether media should be encrypted on the new call leg. For SIP URI
|
|
103
|
+
# destinations, media encryption can also be requested per endpoint with the
|
|
104
|
+
# `secure` URI parameter: `;secure=true` or `;secure=srtp` enables SRTP, and
|
|
105
|
+
# `;secure=dtls` enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes
|
|
106
|
+
# precedence over the per-endpoint `secure` value.
|
|
99
107
|
#
|
|
100
108
|
# @return [Symbol, Telnyx::Models::Calls::ActionTransferParams::MediaEncryption, nil]
|
|
101
109
|
optional :media_encryption, enum: -> { Telnyx::Calls::ActionTransferParams::MediaEncryption }
|
|
@@ -306,7 +314,7 @@ module Telnyx
|
|
|
306
314
|
#
|
|
307
315
|
# @param call_control_id [String]
|
|
308
316
|
#
|
|
309
|
-
# @param to [String] The DID or SIP URI to dial out to.
|
|
317
|
+
# @param to [String] The DID or SIP URI to dial out to. For SIP URI destinations, append `;secure=tru
|
|
310
318
|
#
|
|
311
319
|
# @param answering_machine_detection [Symbol, Telnyx::Models::Calls::ActionTransferParams::AnsweringMachineDetection] Enables Answering Machine Detection. When a call is answered, Telnyx runs real-t
|
|
312
320
|
#
|
|
@@ -326,7 +334,7 @@ module Telnyx
|
|
|
326
334
|
#
|
|
327
335
|
# @param from_display_name [String] The `from_display_name` string to be used as the caller id name (SIP From Displa
|
|
328
336
|
#
|
|
329
|
-
# @param media_encryption [Symbol, Telnyx::Models::Calls::ActionTransferParams::MediaEncryption] Defines whether media should be encrypted on the new call leg.
|
|
337
|
+
# @param media_encryption [Symbol, Telnyx::Models::Calls::ActionTransferParams::MediaEncryption] Defines whether media should be encrypted on the new call leg. For SIP URI desti
|
|
330
338
|
#
|
|
331
339
|
# @param media_name [String] The media_name of a file to be played back when the transfer destination answers
|
|
332
340
|
#
|
|
@@ -501,7 +509,11 @@ module Telnyx
|
|
|
501
509
|
# @param total_analysis_time_millis [Integer] Maximum timeout threshold for overall detection.
|
|
502
510
|
end
|
|
503
511
|
|
|
504
|
-
# Defines whether media should be encrypted on the new call leg.
|
|
512
|
+
# Defines whether media should be encrypted on the new call leg. For SIP URI
|
|
513
|
+
# destinations, media encryption can also be requested per endpoint with the
|
|
514
|
+
# `secure` URI parameter: `;secure=true` or `;secure=srtp` enables SRTP, and
|
|
515
|
+
# `;secure=dtls` enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes
|
|
516
|
+
# precedence over the per-endpoint `secure` value.
|
|
505
517
|
module MediaEncryption
|
|
506
518
|
extend Telnyx::Internal::Type::Enum
|
|
507
519
|
|
|
@@ -4,30 +4,207 @@ module Telnyx
|
|
|
4
4
|
module Models
|
|
5
5
|
class ModelMetadata < Telnyx::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute id
|
|
7
|
+
# Model identifier. For open-source models, follows the
|
|
8
|
+
# `{organization}/{model_name}` convention from Hugging Face (e.g.
|
|
9
|
+
# `moonshotai/Kimi-K2.6`).
|
|
7
10
|
#
|
|
8
11
|
# @return [String]
|
|
9
12
|
required :id, String
|
|
10
13
|
|
|
11
|
-
# @!attribute
|
|
14
|
+
# @!attribute context_length
|
|
15
|
+
# Maximum total tokens (prompt + completion) supported by the model in a single
|
|
16
|
+
# request.
|
|
12
17
|
#
|
|
13
18
|
# @return [Integer]
|
|
14
|
-
required :
|
|
19
|
+
required :context_length, Integer
|
|
20
|
+
|
|
21
|
+
# @!attribute created
|
|
22
|
+
# Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
|
|
23
|
+
#
|
|
24
|
+
# @return [Time]
|
|
25
|
+
required :created, Time
|
|
26
|
+
|
|
27
|
+
# @!attribute languages
|
|
28
|
+
# ISO language codes the model supports (e.g. `en`, `es`).
|
|
29
|
+
#
|
|
30
|
+
# @return [Array<String>]
|
|
31
|
+
required :languages, Telnyx::Internal::Type::ArrayOf[String]
|
|
32
|
+
|
|
33
|
+
# @!attribute license
|
|
34
|
+
# License the model is distributed under, e.g. `Apache 2.0`, `MIT`,
|
|
35
|
+
# `Llama 3 Community License`.
|
|
36
|
+
#
|
|
37
|
+
# @return [String]
|
|
38
|
+
required :license, String
|
|
39
|
+
|
|
40
|
+
# @!attribute organization
|
|
41
|
+
# Organization that originally published the model, matching the prefix of `id`
|
|
42
|
+
# for open-source models.
|
|
43
|
+
#
|
|
44
|
+
# @return [String]
|
|
45
|
+
required :organization, String
|
|
15
46
|
|
|
16
47
|
# @!attribute owned_by
|
|
48
|
+
# Owner of the model. `Telnyx` for Telnyx-hosted open-source models, the upstream
|
|
49
|
+
# provider name for proxied models, or the Telnyx organization id for fine-tuned
|
|
50
|
+
# models.
|
|
17
51
|
#
|
|
18
52
|
# @return [String]
|
|
19
53
|
required :owned_by, String
|
|
20
54
|
|
|
55
|
+
# @!attribute parameters
|
|
56
|
+
# Total parameter count of the model.
|
|
57
|
+
#
|
|
58
|
+
# @return [Integer]
|
|
59
|
+
required :parameters, Integer
|
|
60
|
+
|
|
61
|
+
# @!attribute tier
|
|
62
|
+
# Billing tier the model belongs to. Used together with `pricing` to determine
|
|
63
|
+
# cost per 1M tokens.
|
|
64
|
+
#
|
|
65
|
+
# @return [Symbol, Telnyx::Models::ModelMetadata::Tier]
|
|
66
|
+
required :tier, enum: -> { Telnyx::ModelMetadata::Tier }
|
|
67
|
+
|
|
68
|
+
# @!attribute base_model
|
|
69
|
+
# Base model the fine-tuned model was trained from. Only set for fine-tuned
|
|
70
|
+
# models.
|
|
71
|
+
#
|
|
72
|
+
# @return [String, nil]
|
|
73
|
+
optional :base_model, String, nil?: true
|
|
74
|
+
|
|
75
|
+
# @!attribute description
|
|
76
|
+
# Short, human-readable summary of what the model is best suited for.
|
|
77
|
+
#
|
|
78
|
+
# @return [String, nil]
|
|
79
|
+
optional :description, String, nil?: true
|
|
80
|
+
|
|
81
|
+
# @!attribute is_fine_tunable
|
|
82
|
+
# Whether the model can be used as a base for a fine-tuning job via
|
|
83
|
+
# `POST /v2/ai/fine_tuning/jobs`.
|
|
84
|
+
#
|
|
85
|
+
# @return [Boolean, nil]
|
|
86
|
+
optional :is_fine_tunable, Telnyx::Internal::Type::Boolean
|
|
87
|
+
|
|
88
|
+
# @!attribute is_vision_supported
|
|
89
|
+
# Whether the model accepts image inputs in chat completions (multimodal vision
|
|
90
|
+
# support).
|
|
91
|
+
#
|
|
92
|
+
# @return [Boolean, nil]
|
|
93
|
+
optional :is_vision_supported, Telnyx::Internal::Type::Boolean
|
|
94
|
+
|
|
95
|
+
# @!attribute max_completion_tokens
|
|
96
|
+
# Maximum number of completion (output) tokens the model will generate per
|
|
97
|
+
# request. `null` if unconstrained beyond `context_length`.
|
|
98
|
+
#
|
|
99
|
+
# @return [Integer, nil]
|
|
100
|
+
optional :max_completion_tokens, Integer, nil?: true
|
|
101
|
+
|
|
21
102
|
# @!attribute object
|
|
103
|
+
# Object type. Always `model`.
|
|
22
104
|
#
|
|
23
105
|
# @return [String, nil]
|
|
24
106
|
optional :object, String
|
|
25
107
|
|
|
26
|
-
# @!
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
# @
|
|
30
|
-
|
|
108
|
+
# @!attribute parameters_str
|
|
109
|
+
# Human-readable parameter count, e.g. `1.0T`, `753.9B`, `8B`.
|
|
110
|
+
#
|
|
111
|
+
# @return [String, nil]
|
|
112
|
+
optional :parameters_str, String, nil?: true
|
|
113
|
+
|
|
114
|
+
# @!attribute pricing
|
|
115
|
+
# Mapping of token kind to price in USD per 1M tokens, as a string. Typical keys
|
|
116
|
+
# are `input` and `output`; embedding models expose `embedding`. Empty object when
|
|
117
|
+
# pricing is not yet published for the model.
|
|
118
|
+
#
|
|
119
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
120
|
+
optional :pricing, Telnyx::Internal::Type::HashOf[String]
|
|
121
|
+
|
|
122
|
+
# @!attribute recommended_for_assistants
|
|
123
|
+
# Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI
|
|
124
|
+
# Assistant.
|
|
125
|
+
#
|
|
126
|
+
# @return [Boolean, nil]
|
|
127
|
+
optional :recommended_for_assistants, Telnyx::Internal::Type::Boolean
|
|
128
|
+
|
|
129
|
+
# @!attribute regions
|
|
130
|
+
# Public region names where the model is currently deployed (e.g. `us-central-1`,
|
|
131
|
+
# `eu-central-1`).
|
|
132
|
+
#
|
|
133
|
+
# @return [Array<String>, nil]
|
|
134
|
+
optional :regions, Telnyx::Internal::Type::ArrayOf[String]
|
|
135
|
+
|
|
136
|
+
# @!attribute task
|
|
137
|
+
# Primary task the model is intended for, e.g. `text-generation`,
|
|
138
|
+
# `audio-text-to-text`, `feature-extraction` (embeddings).
|
|
139
|
+
#
|
|
140
|
+
# @return [String, nil]
|
|
141
|
+
optional :task, String
|
|
142
|
+
|
|
143
|
+
# @!method initialize(id:, context_length:, created:, languages:, license:, organization:, owned_by:, parameters:, tier:, base_model: nil, description: nil, is_fine_tunable: nil, is_vision_supported: nil, max_completion_tokens: nil, object: nil, parameters_str: nil, pricing: nil, recommended_for_assistants: nil, regions: nil, task: nil)
|
|
144
|
+
# Some parameter documentations has been truncated, see
|
|
145
|
+
# {Telnyx::Models::ModelMetadata} for more details.
|
|
146
|
+
#
|
|
147
|
+
# Metadata for a model available on Telnyx Inference. Returned by
|
|
148
|
+
# `GET /v2/ai/openai/models` (and the deprecated `GET /v2/ai/models`). Open-source
|
|
149
|
+
# models live under their Hugging Face organization (e.g. `moonshotai/Kimi-K2.6`,
|
|
150
|
+
# `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`); fine-tuned models are owned by
|
|
151
|
+
# the Telnyx organization that trained them.
|
|
152
|
+
#
|
|
153
|
+
# @param id [String] Model identifier. For open-source models, follows the `{organization}/{model_nam
|
|
154
|
+
#
|
|
155
|
+
# @param context_length [Integer] Maximum total tokens (prompt + completion) supported by the model in a single re
|
|
156
|
+
#
|
|
157
|
+
# @param created [Time] Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
|
|
158
|
+
#
|
|
159
|
+
# @param languages [Array<String>] ISO language codes the model supports (e.g. `en`, `es`).
|
|
160
|
+
#
|
|
161
|
+
# @param license [String] License the model is distributed under, e.g. `Apache 2.0`, `MIT`, `Llama 3 Commu
|
|
162
|
+
#
|
|
163
|
+
# @param organization [String] Organization that originally published the model, matching the prefix of `id` fo
|
|
164
|
+
#
|
|
165
|
+
# @param owned_by [String] Owner of the model. `Telnyx` for Telnyx-hosted open-source models, the upstream
|
|
166
|
+
#
|
|
167
|
+
# @param parameters [Integer] Total parameter count of the model.
|
|
168
|
+
#
|
|
169
|
+
# @param tier [Symbol, Telnyx::Models::ModelMetadata::Tier] Billing tier the model belongs to. Used together with `pricing` to determine cos
|
|
170
|
+
#
|
|
171
|
+
# @param base_model [String, nil] Base model the fine-tuned model was trained from. Only set for fine-tuned models
|
|
172
|
+
#
|
|
173
|
+
# @param description [String, nil] Short, human-readable summary of what the model is best suited for.
|
|
174
|
+
#
|
|
175
|
+
# @param is_fine_tunable [Boolean] Whether the model can be used as a base for a fine-tuning job via `POST /v2/ai/f
|
|
176
|
+
#
|
|
177
|
+
# @param is_vision_supported [Boolean] Whether the model accepts image inputs in chat completions (multimodal vision su
|
|
178
|
+
#
|
|
179
|
+
# @param max_completion_tokens [Integer, nil] Maximum number of completion (output) tokens the model will generate per request
|
|
180
|
+
#
|
|
181
|
+
# @param object [String] Object type. Always `model`.
|
|
182
|
+
#
|
|
183
|
+
# @param parameters_str [String, nil] Human-readable parameter count, e.g. `1.0T`, `753.9B`, `8B`.
|
|
184
|
+
#
|
|
185
|
+
# @param pricing [Hash{Symbol=>String}] Mapping of token kind to price in USD per 1M tokens, as a string. Typical keys a
|
|
186
|
+
#
|
|
187
|
+
# @param recommended_for_assistants [Boolean] Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI A
|
|
188
|
+
#
|
|
189
|
+
# @param regions [Array<String>] Public region names where the model is currently deployed (e.g. `us-central-1`,
|
|
190
|
+
#
|
|
191
|
+
# @param task [String] Primary task the model is intended for, e.g. `text-generation`, `audio-text-to-t
|
|
192
|
+
|
|
193
|
+
# Billing tier the model belongs to. Used together with `pricing` to determine
|
|
194
|
+
# cost per 1M tokens.
|
|
195
|
+
#
|
|
196
|
+
# @see Telnyx::Models::ModelMetadata#tier
|
|
197
|
+
module Tier
|
|
198
|
+
extend Telnyx::Internal::Type::Enum
|
|
199
|
+
|
|
200
|
+
SMALL = :small
|
|
201
|
+
MEDIUM = :medium
|
|
202
|
+
LARGE = :large
|
|
203
|
+
UNLISTED = :unlisted
|
|
204
|
+
|
|
205
|
+
# @!method self.values
|
|
206
|
+
# @return [Array<Symbol>]
|
|
207
|
+
end
|
|
31
208
|
end
|
|
32
209
|
end
|
|
33
210
|
end
|
|
@@ -12,11 +12,21 @@ module Telnyx
|
|
|
12
12
|
# @return [Telnyx::Resources::AI::OpenAI::Chat]
|
|
13
13
|
attr_reader :chat
|
|
14
14
|
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
# `
|
|
18
|
-
#
|
|
19
|
-
#
|
|
15
|
+
# Lists every model currently available to your account on Telnyx Inference,
|
|
16
|
+
# including SOTA open-source LLMs hosted on Telnyx GPUs (for example
|
|
17
|
+
# `moonshotai/Kimi-K2.6`, `zai-org/GLM-5.1-FP8`, and `MiniMaxAI/MiniMax-M2.7`),
|
|
18
|
+
# embedding models, and any fine-tuned models you have created.
|
|
19
|
+
#
|
|
20
|
+
# Each entry is a `ModelMetadata` object describing the model id, owner, task,
|
|
21
|
+
# context length, supported languages, billing tier, pricing per 1M tokens,
|
|
22
|
+
# deployment regions, and whether the model supports vision or fine-tuning. Use
|
|
23
|
+
# this endpoint to discover model ids you can pass to
|
|
24
|
+
# `POST /v2/ai/openai/chat/completions`.
|
|
25
|
+
#
|
|
26
|
+
# Model ids follow the `{organization}/{model_name}` convention from Hugging Face
|
|
27
|
+
# (for example `moonshotai/Kimi-K2.6`). This endpoint is OpenAI-compatible:
|
|
28
|
+
# clients pointed at `https://api.telnyx.com/v2/ai/openai` can call
|
|
29
|
+
# `client.models.list()` to retrieve the same payload.
|
|
20
30
|
#
|
|
21
31
|
# @overload list_models(request_options: {})
|
|
22
32
|
#
|
data/lib/telnyx/resources/ai.rb
CHANGED
|
@@ -48,11 +48,15 @@ module Telnyx
|
|
|
48
48
|
|
|
49
49
|
# @deprecated
|
|
50
50
|
#
|
|
51
|
-
# **Deprecated**: Use `GET /v2/ai/openai/models` instead.
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
#
|
|
51
|
+
# **Deprecated**: Use `GET /v2/ai/openai/models` instead.
|
|
52
|
+
#
|
|
53
|
+
# Returns the same `ModelsResponse` payload as the OpenAI-compatible endpoint —
|
|
54
|
+
# open-source LLMs hosted on Telnyx (e.g. `moonshotai/Kimi-K2.6`,
|
|
55
|
+
# `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`), embedding models, and
|
|
56
|
+
# fine-tuned models — kept around for backwards compatibility. New integrations
|
|
57
|
+
# should use `/v2/ai/openai/models`.
|
|
58
|
+
#
|
|
59
|
+
# Model ids follow the `{organization}/{model_name}` convention from Hugging Face.
|
|
56
60
|
#
|
|
57
61
|
# @overload retrieve_models(request_options: {})
|
|
58
62
|
#
|
|
@@ -1625,7 +1625,7 @@ module Telnyx
|
|
|
1625
1625
|
#
|
|
1626
1626
|
# @param call_control_id [String] Unique identifier and token for controlling the call
|
|
1627
1627
|
#
|
|
1628
|
-
# @param to [String] The DID or SIP URI to dial out to.
|
|
1628
|
+
# @param to [String] The DID or SIP URI to dial out to. For SIP URI destinations, append `;secure=tru
|
|
1629
1629
|
#
|
|
1630
1630
|
# @param answering_machine_detection [Symbol, Telnyx::Models::Calls::ActionTransferParams::AnsweringMachineDetection] Enables Answering Machine Detection. When a call is answered, Telnyx runs real-t
|
|
1631
1631
|
#
|
|
@@ -1645,7 +1645,7 @@ module Telnyx
|
|
|
1645
1645
|
#
|
|
1646
1646
|
# @param from_display_name [String] The `from_display_name` string to be used as the caller id name (SIP From Displa
|
|
1647
1647
|
#
|
|
1648
|
-
# @param media_encryption [Symbol, Telnyx::Models::Calls::ActionTransferParams::MediaEncryption] Defines whether media should be encrypted on the new call leg.
|
|
1648
|
+
# @param media_encryption [Symbol, Telnyx::Models::Calls::ActionTransferParams::MediaEncryption] Defines whether media should be encrypted on the new call leg. For SIP URI desti
|
|
1649
1649
|
#
|
|
1650
1650
|
# @param media_name [String] The media_name of a file to be played back when the transfer destination answers
|
|
1651
1651
|
#
|
|
@@ -75,7 +75,7 @@ module Telnyx
|
|
|
75
75
|
#
|
|
76
76
|
# @param link_to [String] Use another call's control id for sharing the same call session id
|
|
77
77
|
#
|
|
78
|
-
# @param media_encryption [Symbol, Telnyx::Models::CallDialParams::MediaEncryption] Defines whether media should be encrypted on the call.
|
|
78
|
+
# @param media_encryption [Symbol, Telnyx::Models::CallDialParams::MediaEncryption] Defines whether media should be encrypted on the call. For SIP URI destinations,
|
|
79
79
|
#
|
|
80
80
|
# @param media_name [String] The media_name of a file to be played back to the callee when the call is answer
|
|
81
81
|
#
|
data/lib/telnyx/version.rb
CHANGED
|
@@ -22,7 +22,11 @@ module Telnyx
|
|
|
22
22
|
attr_accessor :from
|
|
23
23
|
|
|
24
24
|
# The DID or SIP URI to dial out to. Multiple DID or SIP URIs can be provided
|
|
25
|
-
# using an array of strings
|
|
25
|
+
# using an array of strings. For SIP URI destinations, append `;secure=true` or
|
|
26
|
+
# `;secure=srtp` to enable SRTP media encryption for that endpoint, or
|
|
27
|
+
# `;secure=dtls` to enable DTLS media encryption for that endpoint. If
|
|
28
|
+
# `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
|
|
29
|
+
# per-endpoint `secure` URI parameter.
|
|
26
30
|
sig { returns(Telnyx::CallDialParams::To::Variants) }
|
|
27
31
|
attr_accessor :to
|
|
28
32
|
|
|
@@ -201,7 +205,11 @@ module Telnyx
|
|
|
201
205
|
sig { params(link_to: String).void }
|
|
202
206
|
attr_writer :link_to
|
|
203
207
|
|
|
204
|
-
# Defines whether media should be encrypted on the call.
|
|
208
|
+
# Defines whether media should be encrypted on the call. For SIP URI destinations,
|
|
209
|
+
# media encryption can also be requested per endpoint with the `secure` URI
|
|
210
|
+
# parameter: `;secure=true` or `;secure=srtp` enables SRTP, and `;secure=dtls`
|
|
211
|
+
# enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes precedence
|
|
212
|
+
# over the per-endpoint `secure` value.
|
|
205
213
|
sig do
|
|
206
214
|
returns(T.nilable(Telnyx::CallDialParams::MediaEncryption::OrSymbol))
|
|
207
215
|
end
|
|
@@ -711,7 +719,11 @@ module Telnyx
|
|
|
711
719
|
# number). The number should be in +E164 format.
|
|
712
720
|
from:,
|
|
713
721
|
# The DID or SIP URI to dial out to. Multiple DID or SIP URIs can be provided
|
|
714
|
-
# using an array of strings
|
|
722
|
+
# using an array of strings. For SIP URI destinations, append `;secure=true` or
|
|
723
|
+
# `;secure=srtp` to enable SRTP media encryption for that endpoint, or
|
|
724
|
+
# `;secure=dtls` to enable DTLS media encryption for that endpoint. If
|
|
725
|
+
# `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
|
|
726
|
+
# per-endpoint `secure` URI parameter.
|
|
715
727
|
to:,
|
|
716
728
|
# Enables Answering Machine Detection. Telnyx offers Premium and Standard
|
|
717
729
|
# detections. With Premium detection, when a call is answered, Telnyx runs
|
|
@@ -780,7 +792,11 @@ module Telnyx
|
|
|
780
792
|
from_display_name: nil,
|
|
781
793
|
# Use another call's control id for sharing the same call session id
|
|
782
794
|
link_to: nil,
|
|
783
|
-
# Defines whether media should be encrypted on the call.
|
|
795
|
+
# Defines whether media should be encrypted on the call. For SIP URI destinations,
|
|
796
|
+
# media encryption can also be requested per endpoint with the `secure` URI
|
|
797
|
+
# parameter: `;secure=true` or `;secure=srtp` enables SRTP, and `;secure=dtls`
|
|
798
|
+
# enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes precedence
|
|
799
|
+
# over the per-endpoint `secure` value.
|
|
784
800
|
media_encryption: nil,
|
|
785
801
|
# The media_name of a file to be played back to the callee when the call is
|
|
786
802
|
# answered. The media_name must point to a file previously uploaded to
|
|
@@ -990,7 +1006,11 @@ module Telnyx
|
|
|
990
1006
|
end
|
|
991
1007
|
|
|
992
1008
|
# The DID or SIP URI to dial out to. Multiple DID or SIP URIs can be provided
|
|
993
|
-
# using an array of strings
|
|
1009
|
+
# using an array of strings. For SIP URI destinations, append `;secure=true` or
|
|
1010
|
+
# `;secure=srtp` to enable SRTP media encryption for that endpoint, or
|
|
1011
|
+
# `;secure=dtls` to enable DTLS media encryption for that endpoint. If
|
|
1012
|
+
# `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
|
|
1013
|
+
# per-endpoint `secure` URI parameter.
|
|
994
1014
|
module To
|
|
995
1015
|
extend Telnyx::Internal::Type::Union
|
|
996
1016
|
|
|
@@ -1637,7 +1657,11 @@ module Telnyx
|
|
|
1637
1657
|
end
|
|
1638
1658
|
end
|
|
1639
1659
|
|
|
1640
|
-
# Defines whether media should be encrypted on the call.
|
|
1660
|
+
# Defines whether media should be encrypted on the call. For SIP URI destinations,
|
|
1661
|
+
# media encryption can also be requested per endpoint with the `secure` URI
|
|
1662
|
+
# parameter: `;secure=true` or `;secure=srtp` enables SRTP, and `;secure=dtls`
|
|
1663
|
+
# enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes precedence
|
|
1664
|
+
# over the per-endpoint `secure` value.
|
|
1641
1665
|
module MediaEncryption
|
|
1642
1666
|
extend Telnyx::Internal::Type::Enum
|
|
1643
1667
|
|
|
@@ -18,7 +18,11 @@ module Telnyx
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :call_control_id
|
|
20
20
|
|
|
21
|
-
# The DID or SIP URI to dial out to.
|
|
21
|
+
# The DID or SIP URI to dial out to. For SIP URI destinations, append
|
|
22
|
+
# `;secure=true` or `;secure=srtp` to enable SRTP media encryption for that
|
|
23
|
+
# endpoint, or `;secure=dtls` to enable DTLS media encryption for that endpoint.
|
|
24
|
+
# If `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
|
|
25
|
+
# per-endpoint `secure` URI parameter.
|
|
22
26
|
sig { returns(String) }
|
|
23
27
|
attr_accessor :to
|
|
24
28
|
|
|
@@ -128,7 +132,11 @@ module Telnyx
|
|
|
128
132
|
sig { params(from_display_name: String).void }
|
|
129
133
|
attr_writer :from_display_name
|
|
130
134
|
|
|
131
|
-
# Defines whether media should be encrypted on the new call leg.
|
|
135
|
+
# Defines whether media should be encrypted on the new call leg. For SIP URI
|
|
136
|
+
# destinations, media encryption can also be requested per endpoint with the
|
|
137
|
+
# `secure` URI parameter: `;secure=true` or `;secure=srtp` enables SRTP, and
|
|
138
|
+
# `;secure=dtls` enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes
|
|
139
|
+
# precedence over the per-endpoint `secure` value.
|
|
132
140
|
sig do
|
|
133
141
|
returns(
|
|
134
142
|
T.nilable(
|
|
@@ -559,7 +567,11 @@ module Telnyx
|
|
|
559
567
|
end
|
|
560
568
|
def self.new(
|
|
561
569
|
call_control_id:,
|
|
562
|
-
# The DID or SIP URI to dial out to.
|
|
570
|
+
# The DID or SIP URI to dial out to. For SIP URI destinations, append
|
|
571
|
+
# `;secure=true` or `;secure=srtp` to enable SRTP media encryption for that
|
|
572
|
+
# endpoint, or `;secure=dtls` to enable DTLS media encryption for that endpoint.
|
|
573
|
+
# If `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
|
|
574
|
+
# per-endpoint `secure` URI parameter.
|
|
563
575
|
to:,
|
|
564
576
|
# Enables Answering Machine Detection. When a call is answered, Telnyx runs
|
|
565
577
|
# real-time detection to determine if it was picked up by a human or a machine and
|
|
@@ -598,7 +610,11 @@ module Telnyx
|
|
|
598
610
|
# -\_~!.+ special characters. If ommited, the display name will be the same as the
|
|
599
611
|
# number in the `from` field.
|
|
600
612
|
from_display_name: nil,
|
|
601
|
-
# Defines whether media should be encrypted on the new call leg.
|
|
613
|
+
# Defines whether media should be encrypted on the new call leg. For SIP URI
|
|
614
|
+
# destinations, media encryption can also be requested per endpoint with the
|
|
615
|
+
# `secure` URI parameter: `;secure=true` or `;secure=srtp` enables SRTP, and
|
|
616
|
+
# `;secure=dtls` enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes
|
|
617
|
+
# precedence over the per-endpoint `secure` value.
|
|
602
618
|
media_encryption: nil,
|
|
603
619
|
# The media_name of a file to be played back when the transfer destination answers
|
|
604
620
|
# before bridging the call. The media_name must point to a file previously
|
|
@@ -970,7 +986,11 @@ module Telnyx
|
|
|
970
986
|
end
|
|
971
987
|
end
|
|
972
988
|
|
|
973
|
-
# Defines whether media should be encrypted on the new call leg.
|
|
989
|
+
# Defines whether media should be encrypted on the new call leg. For SIP URI
|
|
990
|
+
# destinations, media encryption can also be requested per endpoint with the
|
|
991
|
+
# `secure` URI parameter: `;secure=true` or `;secure=srtp` enables SRTP, and
|
|
992
|
+
# `;secure=dtls` enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes
|
|
993
|
+
# precedence over the per-endpoint `secure` value.
|
|
974
994
|
module MediaEncryption
|
|
975
995
|
extend Telnyx::Internal::Type::Enum
|
|
976
996
|
|
|
@@ -6,39 +6,263 @@ module Telnyx
|
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias { T.any(Telnyx::ModelMetadata, Telnyx::Internal::AnyHash) }
|
|
8
8
|
|
|
9
|
+
# Model identifier. For open-source models, follows the
|
|
10
|
+
# `{organization}/{model_name}` convention from Hugging Face (e.g.
|
|
11
|
+
# `moonshotai/Kimi-K2.6`).
|
|
9
12
|
sig { returns(String) }
|
|
10
13
|
attr_accessor :id
|
|
11
14
|
|
|
15
|
+
# Maximum total tokens (prompt + completion) supported by the model in a single
|
|
16
|
+
# request.
|
|
12
17
|
sig { returns(Integer) }
|
|
18
|
+
attr_accessor :context_length
|
|
19
|
+
|
|
20
|
+
# Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
|
|
21
|
+
sig { returns(Time) }
|
|
13
22
|
attr_accessor :created
|
|
14
23
|
|
|
24
|
+
# ISO language codes the model supports (e.g. `en`, `es`).
|
|
25
|
+
sig { returns(T::Array[String]) }
|
|
26
|
+
attr_accessor :languages
|
|
27
|
+
|
|
28
|
+
# License the model is distributed under, e.g. `Apache 2.0`, `MIT`,
|
|
29
|
+
# `Llama 3 Community License`.
|
|
30
|
+
sig { returns(String) }
|
|
31
|
+
attr_accessor :license
|
|
32
|
+
|
|
33
|
+
# Organization that originally published the model, matching the prefix of `id`
|
|
34
|
+
# for open-source models.
|
|
35
|
+
sig { returns(String) }
|
|
36
|
+
attr_accessor :organization
|
|
37
|
+
|
|
38
|
+
# Owner of the model. `Telnyx` for Telnyx-hosted open-source models, the upstream
|
|
39
|
+
# provider name for proxied models, or the Telnyx organization id for fine-tuned
|
|
40
|
+
# models.
|
|
15
41
|
sig { returns(String) }
|
|
16
42
|
attr_accessor :owned_by
|
|
17
43
|
|
|
44
|
+
# Total parameter count of the model.
|
|
45
|
+
sig { returns(Integer) }
|
|
46
|
+
attr_accessor :parameters
|
|
47
|
+
|
|
48
|
+
# Billing tier the model belongs to. Used together with `pricing` to determine
|
|
49
|
+
# cost per 1M tokens.
|
|
50
|
+
sig { returns(Telnyx::ModelMetadata::Tier::TaggedSymbol) }
|
|
51
|
+
attr_accessor :tier
|
|
52
|
+
|
|
53
|
+
# Base model the fine-tuned model was trained from. Only set for fine-tuned
|
|
54
|
+
# models.
|
|
55
|
+
sig { returns(T.nilable(String)) }
|
|
56
|
+
attr_accessor :base_model
|
|
57
|
+
|
|
58
|
+
# Short, human-readable summary of what the model is best suited for.
|
|
59
|
+
sig { returns(T.nilable(String)) }
|
|
60
|
+
attr_accessor :description
|
|
61
|
+
|
|
62
|
+
# Whether the model can be used as a base for a fine-tuning job via
|
|
63
|
+
# `POST /v2/ai/fine_tuning/jobs`.
|
|
64
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
65
|
+
attr_reader :is_fine_tunable
|
|
66
|
+
|
|
67
|
+
sig { params(is_fine_tunable: T::Boolean).void }
|
|
68
|
+
attr_writer :is_fine_tunable
|
|
69
|
+
|
|
70
|
+
# Whether the model accepts image inputs in chat completions (multimodal vision
|
|
71
|
+
# support).
|
|
72
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
73
|
+
attr_reader :is_vision_supported
|
|
74
|
+
|
|
75
|
+
sig { params(is_vision_supported: T::Boolean).void }
|
|
76
|
+
attr_writer :is_vision_supported
|
|
77
|
+
|
|
78
|
+
# Maximum number of completion (output) tokens the model will generate per
|
|
79
|
+
# request. `null` if unconstrained beyond `context_length`.
|
|
80
|
+
sig { returns(T.nilable(Integer)) }
|
|
81
|
+
attr_accessor :max_completion_tokens
|
|
82
|
+
|
|
83
|
+
# Object type. Always `model`.
|
|
18
84
|
sig { returns(T.nilable(String)) }
|
|
19
85
|
attr_reader :object
|
|
20
86
|
|
|
21
87
|
sig { params(object: String).void }
|
|
22
88
|
attr_writer :object
|
|
23
89
|
|
|
90
|
+
# Human-readable parameter count, e.g. `1.0T`, `753.9B`, `8B`.
|
|
91
|
+
sig { returns(T.nilable(String)) }
|
|
92
|
+
attr_accessor :parameters_str
|
|
93
|
+
|
|
94
|
+
# Mapping of token kind to price in USD per 1M tokens, as a string. Typical keys
|
|
95
|
+
# are `input` and `output`; embedding models expose `embedding`. Empty object when
|
|
96
|
+
# pricing is not yet published for the model.
|
|
97
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
98
|
+
attr_reader :pricing
|
|
99
|
+
|
|
100
|
+
sig { params(pricing: T::Hash[Symbol, String]).void }
|
|
101
|
+
attr_writer :pricing
|
|
102
|
+
|
|
103
|
+
# Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI
|
|
104
|
+
# Assistant.
|
|
105
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
106
|
+
attr_reader :recommended_for_assistants
|
|
107
|
+
|
|
108
|
+
sig { params(recommended_for_assistants: T::Boolean).void }
|
|
109
|
+
attr_writer :recommended_for_assistants
|
|
110
|
+
|
|
111
|
+
# Public region names where the model is currently deployed (e.g. `us-central-1`,
|
|
112
|
+
# `eu-central-1`).
|
|
113
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
114
|
+
attr_reader :regions
|
|
115
|
+
|
|
116
|
+
sig { params(regions: T::Array[String]).void }
|
|
117
|
+
attr_writer :regions
|
|
118
|
+
|
|
119
|
+
# Primary task the model is intended for, e.g. `text-generation`,
|
|
120
|
+
# `audio-text-to-text`, `feature-extraction` (embeddings).
|
|
121
|
+
sig { returns(T.nilable(String)) }
|
|
122
|
+
attr_reader :task
|
|
123
|
+
|
|
124
|
+
sig { params(task: String).void }
|
|
125
|
+
attr_writer :task
|
|
126
|
+
|
|
127
|
+
# Metadata for a model available on Telnyx Inference. Returned by
|
|
128
|
+
# `GET /v2/ai/openai/models` (and the deprecated `GET /v2/ai/models`). Open-source
|
|
129
|
+
# models live under their Hugging Face organization (e.g. `moonshotai/Kimi-K2.6`,
|
|
130
|
+
# `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`); fine-tuned models are owned by
|
|
131
|
+
# the Telnyx organization that trained them.
|
|
24
132
|
sig do
|
|
25
133
|
params(
|
|
26
134
|
id: String,
|
|
27
|
-
|
|
135
|
+
context_length: Integer,
|
|
136
|
+
created: Time,
|
|
137
|
+
languages: T::Array[String],
|
|
138
|
+
license: String,
|
|
139
|
+
organization: String,
|
|
28
140
|
owned_by: String,
|
|
29
|
-
|
|
141
|
+
parameters: Integer,
|
|
142
|
+
tier: Telnyx::ModelMetadata::Tier::OrSymbol,
|
|
143
|
+
base_model: T.nilable(String),
|
|
144
|
+
description: T.nilable(String),
|
|
145
|
+
is_fine_tunable: T::Boolean,
|
|
146
|
+
is_vision_supported: T::Boolean,
|
|
147
|
+
max_completion_tokens: T.nilable(Integer),
|
|
148
|
+
object: String,
|
|
149
|
+
parameters_str: T.nilable(String),
|
|
150
|
+
pricing: T::Hash[Symbol, String],
|
|
151
|
+
recommended_for_assistants: T::Boolean,
|
|
152
|
+
regions: T::Array[String],
|
|
153
|
+
task: String
|
|
30
154
|
).returns(T.attached_class)
|
|
31
155
|
end
|
|
32
|
-
def self.new(
|
|
156
|
+
def self.new(
|
|
157
|
+
# Model identifier. For open-source models, follows the
|
|
158
|
+
# `{organization}/{model_name}` convention from Hugging Face (e.g.
|
|
159
|
+
# `moonshotai/Kimi-K2.6`).
|
|
160
|
+
id:,
|
|
161
|
+
# Maximum total tokens (prompt + completion) supported by the model in a single
|
|
162
|
+
# request.
|
|
163
|
+
context_length:,
|
|
164
|
+
# Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
|
|
165
|
+
created:,
|
|
166
|
+
# ISO language codes the model supports (e.g. `en`, `es`).
|
|
167
|
+
languages:,
|
|
168
|
+
# License the model is distributed under, e.g. `Apache 2.0`, `MIT`,
|
|
169
|
+
# `Llama 3 Community License`.
|
|
170
|
+
license:,
|
|
171
|
+
# Organization that originally published the model, matching the prefix of `id`
|
|
172
|
+
# for open-source models.
|
|
173
|
+
organization:,
|
|
174
|
+
# Owner of the model. `Telnyx` for Telnyx-hosted open-source models, the upstream
|
|
175
|
+
# provider name for proxied models, or the Telnyx organization id for fine-tuned
|
|
176
|
+
# models.
|
|
177
|
+
owned_by:,
|
|
178
|
+
# Total parameter count of the model.
|
|
179
|
+
parameters:,
|
|
180
|
+
# Billing tier the model belongs to. Used together with `pricing` to determine
|
|
181
|
+
# cost per 1M tokens.
|
|
182
|
+
tier:,
|
|
183
|
+
# Base model the fine-tuned model was trained from. Only set for fine-tuned
|
|
184
|
+
# models.
|
|
185
|
+
base_model: nil,
|
|
186
|
+
# Short, human-readable summary of what the model is best suited for.
|
|
187
|
+
description: nil,
|
|
188
|
+
# Whether the model can be used as a base for a fine-tuning job via
|
|
189
|
+
# `POST /v2/ai/fine_tuning/jobs`.
|
|
190
|
+
is_fine_tunable: nil,
|
|
191
|
+
# Whether the model accepts image inputs in chat completions (multimodal vision
|
|
192
|
+
# support).
|
|
193
|
+
is_vision_supported: nil,
|
|
194
|
+
# Maximum number of completion (output) tokens the model will generate per
|
|
195
|
+
# request. `null` if unconstrained beyond `context_length`.
|
|
196
|
+
max_completion_tokens: nil,
|
|
197
|
+
# Object type. Always `model`.
|
|
198
|
+
object: nil,
|
|
199
|
+
# Human-readable parameter count, e.g. `1.0T`, `753.9B`, `8B`.
|
|
200
|
+
parameters_str: nil,
|
|
201
|
+
# Mapping of token kind to price in USD per 1M tokens, as a string. Typical keys
|
|
202
|
+
# are `input` and `output`; embedding models expose `embedding`. Empty object when
|
|
203
|
+
# pricing is not yet published for the model.
|
|
204
|
+
pricing: nil,
|
|
205
|
+
# Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI
|
|
206
|
+
# Assistant.
|
|
207
|
+
recommended_for_assistants: nil,
|
|
208
|
+
# Public region names where the model is currently deployed (e.g. `us-central-1`,
|
|
209
|
+
# `eu-central-1`).
|
|
210
|
+
regions: nil,
|
|
211
|
+
# Primary task the model is intended for, e.g. `text-generation`,
|
|
212
|
+
# `audio-text-to-text`, `feature-extraction` (embeddings).
|
|
213
|
+
task: nil
|
|
214
|
+
)
|
|
33
215
|
end
|
|
34
216
|
|
|
35
217
|
sig do
|
|
36
218
|
override.returns(
|
|
37
|
-
{
|
|
219
|
+
{
|
|
220
|
+
id: String,
|
|
221
|
+
context_length: Integer,
|
|
222
|
+
created: Time,
|
|
223
|
+
languages: T::Array[String],
|
|
224
|
+
license: String,
|
|
225
|
+
organization: String,
|
|
226
|
+
owned_by: String,
|
|
227
|
+
parameters: Integer,
|
|
228
|
+
tier: Telnyx::ModelMetadata::Tier::TaggedSymbol,
|
|
229
|
+
base_model: T.nilable(String),
|
|
230
|
+
description: T.nilable(String),
|
|
231
|
+
is_fine_tunable: T::Boolean,
|
|
232
|
+
is_vision_supported: T::Boolean,
|
|
233
|
+
max_completion_tokens: T.nilable(Integer),
|
|
234
|
+
object: String,
|
|
235
|
+
parameters_str: T.nilable(String),
|
|
236
|
+
pricing: T::Hash[Symbol, String],
|
|
237
|
+
recommended_for_assistants: T::Boolean,
|
|
238
|
+
regions: T::Array[String],
|
|
239
|
+
task: String
|
|
240
|
+
}
|
|
38
241
|
)
|
|
39
242
|
end
|
|
40
243
|
def to_hash
|
|
41
244
|
end
|
|
245
|
+
|
|
246
|
+
# Billing tier the model belongs to. Used together with `pricing` to determine
|
|
247
|
+
# cost per 1M tokens.
|
|
248
|
+
module Tier
|
|
249
|
+
extend Telnyx::Internal::Type::Enum
|
|
250
|
+
|
|
251
|
+
TaggedSymbol =
|
|
252
|
+
T.type_alias { T.all(Symbol, Telnyx::ModelMetadata::Tier) }
|
|
253
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
254
|
+
|
|
255
|
+
SMALL = T.let(:small, Telnyx::ModelMetadata::Tier::TaggedSymbol)
|
|
256
|
+
MEDIUM = T.let(:medium, Telnyx::ModelMetadata::Tier::TaggedSymbol)
|
|
257
|
+
LARGE = T.let(:large, Telnyx::ModelMetadata::Tier::TaggedSymbol)
|
|
258
|
+
UNLISTED = T.let(:unlisted, Telnyx::ModelMetadata::Tier::TaggedSymbol)
|
|
259
|
+
|
|
260
|
+
sig do
|
|
261
|
+
override.returns(T::Array[Telnyx::ModelMetadata::Tier::TaggedSymbol])
|
|
262
|
+
end
|
|
263
|
+
def self.values
|
|
264
|
+
end
|
|
265
|
+
end
|
|
42
266
|
end
|
|
43
267
|
end
|
|
44
268
|
end
|
|
@@ -12,11 +12,21 @@ module Telnyx
|
|
|
12
12
|
sig { returns(Telnyx::Resources::AI::OpenAI::Chat) }
|
|
13
13
|
attr_reader :chat
|
|
14
14
|
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
# `
|
|
18
|
-
#
|
|
19
|
-
#
|
|
15
|
+
# Lists every model currently available to your account on Telnyx Inference,
|
|
16
|
+
# including SOTA open-source LLMs hosted on Telnyx GPUs (for example
|
|
17
|
+
# `moonshotai/Kimi-K2.6`, `zai-org/GLM-5.1-FP8`, and `MiniMaxAI/MiniMax-M2.7`),
|
|
18
|
+
# embedding models, and any fine-tuned models you have created.
|
|
19
|
+
#
|
|
20
|
+
# Each entry is a `ModelMetadata` object describing the model id, owner, task,
|
|
21
|
+
# context length, supported languages, billing tier, pricing per 1M tokens,
|
|
22
|
+
# deployment regions, and whether the model supports vision or fine-tuning. Use
|
|
23
|
+
# this endpoint to discover model ids you can pass to
|
|
24
|
+
# `POST /v2/ai/openai/chat/completions`.
|
|
25
|
+
#
|
|
26
|
+
# Model ids follow the `{organization}/{model_name}` convention from Hugging Face
|
|
27
|
+
# (for example `moonshotai/Kimi-K2.6`). This endpoint is OpenAI-compatible:
|
|
28
|
+
# clients pointed at `https://api.telnyx.com/v2/ai/openai` can call
|
|
29
|
+
# `client.models.list()` to retrieve the same payload.
|
|
20
30
|
sig do
|
|
21
31
|
params(request_options: Telnyx::RequestOptions::OrHash).returns(
|
|
22
32
|
Telnyx::Models::AI::OpenAIListModelsResponse
|
data/rbi/telnyx/resources/ai.rbi
CHANGED
|
@@ -46,11 +46,15 @@ module Telnyx
|
|
|
46
46
|
sig { returns(Telnyx::Resources::AI::Tools) }
|
|
47
47
|
attr_reader :tools
|
|
48
48
|
|
|
49
|
-
# **Deprecated**: Use `GET /v2/ai/openai/models` instead.
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
49
|
+
# **Deprecated**: Use `GET /v2/ai/openai/models` instead.
|
|
50
|
+
#
|
|
51
|
+
# Returns the same `ModelsResponse` payload as the OpenAI-compatible endpoint —
|
|
52
|
+
# open-source LLMs hosted on Telnyx (e.g. `moonshotai/Kimi-K2.6`,
|
|
53
|
+
# `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`), embedding models, and
|
|
54
|
+
# fine-tuned models — kept around for backwards compatibility. New integrations
|
|
55
|
+
# should use `/v2/ai/openai/models`.
|
|
56
|
+
#
|
|
57
|
+
# Model ids follow the `{organization}/{model_name}` convention from Hugging Face.
|
|
54
58
|
sig do
|
|
55
59
|
params(request_options: Telnyx::RequestOptions::OrHash).returns(
|
|
56
60
|
Telnyx::Models::AIRetrieveModelsResponse
|
|
@@ -2035,7 +2035,11 @@ module Telnyx
|
|
|
2035
2035
|
def transfer(
|
|
2036
2036
|
# Unique identifier and token for controlling the call
|
|
2037
2037
|
call_control_id,
|
|
2038
|
-
# The DID or SIP URI to dial out to.
|
|
2038
|
+
# The DID or SIP URI to dial out to. For SIP URI destinations, append
|
|
2039
|
+
# `;secure=true` or `;secure=srtp` to enable SRTP media encryption for that
|
|
2040
|
+
# endpoint, or `;secure=dtls` to enable DTLS media encryption for that endpoint.
|
|
2041
|
+
# If `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
|
|
2042
|
+
# per-endpoint `secure` URI parameter.
|
|
2039
2043
|
to:,
|
|
2040
2044
|
# Enables Answering Machine Detection. When a call is answered, Telnyx runs
|
|
2041
2045
|
# real-time detection to determine if it was picked up by a human or a machine and
|
|
@@ -2074,7 +2078,11 @@ module Telnyx
|
|
|
2074
2078
|
# -\_~!.+ special characters. If ommited, the display name will be the same as the
|
|
2075
2079
|
# number in the `from` field.
|
|
2076
2080
|
from_display_name: nil,
|
|
2077
|
-
# Defines whether media should be encrypted on the new call leg.
|
|
2081
|
+
# Defines whether media should be encrypted on the new call leg. For SIP URI
|
|
2082
|
+
# destinations, media encryption can also be requested per endpoint with the
|
|
2083
|
+
# `secure` URI parameter: `;secure=true` or `;secure=srtp` enables SRTP, and
|
|
2084
|
+
# `;secure=dtls` enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes
|
|
2085
|
+
# precedence over the per-endpoint `secure` value.
|
|
2078
2086
|
media_encryption: nil,
|
|
2079
2087
|
# The media_name of a file to be played back when the transfer destination answers
|
|
2080
2088
|
# before bridging the call. The media_name must point to a file previously
|
|
@@ -117,7 +117,11 @@ module Telnyx
|
|
|
117
117
|
# number). The number should be in +E164 format.
|
|
118
118
|
from:,
|
|
119
119
|
# The DID or SIP URI to dial out to. Multiple DID or SIP URIs can be provided
|
|
120
|
-
# using an array of strings
|
|
120
|
+
# using an array of strings. For SIP URI destinations, append `;secure=true` or
|
|
121
|
+
# `;secure=srtp` to enable SRTP media encryption for that endpoint, or
|
|
122
|
+
# `;secure=dtls` to enable DTLS media encryption for that endpoint. If
|
|
123
|
+
# `media_encryption` is set to `SRTP` or `DTLS`, it takes precedence over any
|
|
124
|
+
# per-endpoint `secure` URI parameter.
|
|
121
125
|
to:,
|
|
122
126
|
# Enables Answering Machine Detection. Telnyx offers Premium and Standard
|
|
123
127
|
# detections. With Premium detection, when a call is answered, Telnyx runs
|
|
@@ -186,7 +190,11 @@ module Telnyx
|
|
|
186
190
|
from_display_name: nil,
|
|
187
191
|
# Use another call's control id for sharing the same call session id
|
|
188
192
|
link_to: nil,
|
|
189
|
-
# Defines whether media should be encrypted on the call.
|
|
193
|
+
# Defines whether media should be encrypted on the call. For SIP URI destinations,
|
|
194
|
+
# media encryption can also be requested per endpoint with the `secure` URI
|
|
195
|
+
# parameter: `;secure=true` or `;secure=srtp` enables SRTP, and `;secure=dtls`
|
|
196
|
+
# enables DTLS. This parameter, when set to `SRTP` or `DTLS`, takes precedence
|
|
197
|
+
# over the per-endpoint `secure` value.
|
|
190
198
|
media_encryption: nil,
|
|
191
199
|
# The media_name of a file to be played back to the callee when the call is
|
|
192
200
|
# answered. The media_name must point to a file previously uploaded to
|
|
@@ -1,32 +1,142 @@
|
|
|
1
1
|
module Telnyx
|
|
2
2
|
module Models
|
|
3
3
|
type model_metadata =
|
|
4
|
-
{
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
context_length: Integer,
|
|
7
|
+
created: Time,
|
|
8
|
+
languages: ::Array[String],
|
|
9
|
+
license: String,
|
|
10
|
+
organization: String,
|
|
11
|
+
owned_by: String,
|
|
12
|
+
parameters: Integer,
|
|
13
|
+
tier: Telnyx::Models::ModelMetadata::tier,
|
|
14
|
+
base_model: String?,
|
|
15
|
+
description: String?,
|
|
16
|
+
is_fine_tunable: bool,
|
|
17
|
+
is_vision_supported: bool,
|
|
18
|
+
max_completion_tokens: Integer?,
|
|
19
|
+
object: String,
|
|
20
|
+
parameters_str: String?,
|
|
21
|
+
pricing: ::Hash[Symbol, String],
|
|
22
|
+
recommended_for_assistants: bool,
|
|
23
|
+
regions: ::Array[String],
|
|
24
|
+
task: String
|
|
25
|
+
}
|
|
5
26
|
|
|
6
27
|
class ModelMetadata < Telnyx::Internal::Type::BaseModel
|
|
7
28
|
attr_accessor id: String
|
|
8
29
|
|
|
9
|
-
attr_accessor
|
|
30
|
+
attr_accessor context_length: Integer
|
|
31
|
+
|
|
32
|
+
attr_accessor created: Time
|
|
33
|
+
|
|
34
|
+
attr_accessor languages: ::Array[String]
|
|
35
|
+
|
|
36
|
+
attr_accessor license: String
|
|
37
|
+
|
|
38
|
+
attr_accessor organization: String
|
|
10
39
|
|
|
11
40
|
attr_accessor owned_by: String
|
|
12
41
|
|
|
42
|
+
attr_accessor parameters: Integer
|
|
43
|
+
|
|
44
|
+
attr_accessor tier: Telnyx::Models::ModelMetadata::tier
|
|
45
|
+
|
|
46
|
+
attr_accessor base_model: String?
|
|
47
|
+
|
|
48
|
+
attr_accessor description: String?
|
|
49
|
+
|
|
50
|
+
attr_reader is_fine_tunable: bool?
|
|
51
|
+
|
|
52
|
+
def is_fine_tunable=: (bool) -> bool
|
|
53
|
+
|
|
54
|
+
attr_reader is_vision_supported: bool?
|
|
55
|
+
|
|
56
|
+
def is_vision_supported=: (bool) -> bool
|
|
57
|
+
|
|
58
|
+
attr_accessor max_completion_tokens: Integer?
|
|
59
|
+
|
|
13
60
|
attr_reader object: String?
|
|
14
61
|
|
|
15
62
|
def object=: (String) -> String
|
|
16
63
|
|
|
64
|
+
attr_accessor parameters_str: String?
|
|
65
|
+
|
|
66
|
+
attr_reader pricing: ::Hash[Symbol, String]?
|
|
67
|
+
|
|
68
|
+
def pricing=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
69
|
+
|
|
70
|
+
attr_reader recommended_for_assistants: bool?
|
|
71
|
+
|
|
72
|
+
def recommended_for_assistants=: (bool) -> bool
|
|
73
|
+
|
|
74
|
+
attr_reader regions: ::Array[String]?
|
|
75
|
+
|
|
76
|
+
def regions=: (::Array[String]) -> ::Array[String]
|
|
77
|
+
|
|
78
|
+
attr_reader task: String?
|
|
79
|
+
|
|
80
|
+
def task=: (String) -> String
|
|
81
|
+
|
|
17
82
|
def initialize: (
|
|
18
83
|
id: String,
|
|
19
|
-
|
|
84
|
+
context_length: Integer,
|
|
85
|
+
created: Time,
|
|
86
|
+
languages: ::Array[String],
|
|
87
|
+
license: String,
|
|
88
|
+
organization: String,
|
|
20
89
|
owned_by: String,
|
|
21
|
-
|
|
90
|
+
parameters: Integer,
|
|
91
|
+
tier: Telnyx::Models::ModelMetadata::tier,
|
|
92
|
+
?base_model: String?,
|
|
93
|
+
?description: String?,
|
|
94
|
+
?is_fine_tunable: bool,
|
|
95
|
+
?is_vision_supported: bool,
|
|
96
|
+
?max_completion_tokens: Integer?,
|
|
97
|
+
?object: String,
|
|
98
|
+
?parameters_str: String?,
|
|
99
|
+
?pricing: ::Hash[Symbol, String],
|
|
100
|
+
?recommended_for_assistants: bool,
|
|
101
|
+
?regions: ::Array[String],
|
|
102
|
+
?task: String
|
|
22
103
|
) -> void
|
|
23
104
|
|
|
24
105
|
def to_hash: -> {
|
|
25
106
|
id: String,
|
|
26
|
-
|
|
107
|
+
context_length: Integer,
|
|
108
|
+
created: Time,
|
|
109
|
+
languages: ::Array[String],
|
|
110
|
+
license: String,
|
|
111
|
+
organization: String,
|
|
27
112
|
owned_by: String,
|
|
28
|
-
|
|
113
|
+
parameters: Integer,
|
|
114
|
+
tier: Telnyx::Models::ModelMetadata::tier,
|
|
115
|
+
base_model: String?,
|
|
116
|
+
description: String?,
|
|
117
|
+
is_fine_tunable: bool,
|
|
118
|
+
is_vision_supported: bool,
|
|
119
|
+
max_completion_tokens: Integer?,
|
|
120
|
+
object: String,
|
|
121
|
+
parameters_str: String?,
|
|
122
|
+
pricing: ::Hash[Symbol, String],
|
|
123
|
+
recommended_for_assistants: bool,
|
|
124
|
+
regions: ::Array[String],
|
|
125
|
+
task: String
|
|
29
126
|
}
|
|
127
|
+
|
|
128
|
+
type tier = :small | :medium | :large | :unlisted
|
|
129
|
+
|
|
130
|
+
module Tier
|
|
131
|
+
extend Telnyx::Internal::Type::Enum
|
|
132
|
+
|
|
133
|
+
SMALL: :small
|
|
134
|
+
MEDIUM: :medium
|
|
135
|
+
LARGE: :large
|
|
136
|
+
UNLISTED: :unlisted
|
|
137
|
+
|
|
138
|
+
def self?.values: -> ::Array[Telnyx::Models::ModelMetadata::tier]
|
|
139
|
+
end
|
|
30
140
|
end
|
|
31
141
|
end
|
|
32
142
|
end
|