telnyx 5.100.0 → 5.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/chat_create_completion_params.rb +36 -1
- data/lib/telnyx/models/ai/openai/chat_create_completion_params.rb +458 -0
- data/lib/telnyx/models/ai/openai/chat_create_completion_response.rb +12 -0
- data/lib/telnyx/models/ai/openai_list_models_params.rb +16 -0
- data/lib/telnyx/models/ai/openai_list_models_response.rb +52 -0
- data/lib/telnyx/resources/ai/chat.rb +9 -2
- data/lib/telnyx/resources/ai/openai/chat.rb +96 -0
- data/lib/telnyx/resources/ai/openai.rb +26 -0
- data/lib/telnyx/resources/ai.rb +7 -5
- data/lib/telnyx/resources/messaging_10dlc/brand/external_vetting.rb +5 -1
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +5 -0
- data/rbi/telnyx/models/ai/chat_create_completion_params.rbi +58 -0
- data/rbi/telnyx/models/ai/openai/chat_create_completion_params.rbi +963 -0
- data/rbi/telnyx/models/ai/openai/chat_create_completion_response.rbi +15 -0
- data/rbi/telnyx/models/ai/openai_list_models_params.rbi +29 -0
- data/rbi/telnyx/models/ai/openai_list_models_response.rbi +96 -0
- data/rbi/telnyx/resources/ai/chat.rbi +11 -1
- data/rbi/telnyx/resources/ai/openai/chat.rbi +147 -0
- data/rbi/telnyx/resources/ai/openai.rbi +16 -0
- data/rbi/telnyx/resources/ai.rbi +5 -5
- data/rbi/telnyx/resources/messaging_10dlc/brand/external_vetting.rbi +5 -1
- data/sig/telnyx/models/ai/chat_create_completion_params.rbs +26 -0
- data/sig/telnyx/models/ai/openai/chat_create_completion_params.rbs +434 -0
- data/sig/telnyx/models/ai/openai/chat_create_completion_response.rbs +11 -0
- data/sig/telnyx/models/ai/openai_list_models_params.rbs +17 -0
- data/sig/telnyx/models/ai/openai_list_models_response.rbs +58 -0
- data/sig/telnyx/resources/ai/chat.rbs +2 -0
- data/sig/telnyx/resources/ai/openai/chat.rbs +41 -0
- data/sig/telnyx/resources/ai/openai.rbs +6 -0
- metadata +17 -2
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
module Telnyx
|
|
2
|
+
module Models
|
|
3
|
+
module AI
|
|
4
|
+
module OpenAI
|
|
5
|
+
type chat_create_completion_params =
|
|
6
|
+
{
|
|
7
|
+
messages: ::Array[Telnyx::AI::OpenAI::ChatCreateCompletionParams::Message],
|
|
8
|
+
api_key_ref: String,
|
|
9
|
+
best_of: Integer,
|
|
10
|
+
early_stopping: bool,
|
|
11
|
+
enable_thinking: bool,
|
|
12
|
+
frequency_penalty: Float,
|
|
13
|
+
guided_choice: ::Array[String],
|
|
14
|
+
guided_json: ::Hash[Symbol, top],
|
|
15
|
+
guided_regex: String,
|
|
16
|
+
length_penalty: Float,
|
|
17
|
+
logprobs: bool,
|
|
18
|
+
max_tokens: Integer,
|
|
19
|
+
min_p: Float,
|
|
20
|
+
model: String,
|
|
21
|
+
n: Float,
|
|
22
|
+
presence_penalty: Float,
|
|
23
|
+
response_format: Telnyx::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat,
|
|
24
|
+
seed: Integer,
|
|
25
|
+
stop: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::stop,
|
|
26
|
+
stream: bool,
|
|
27
|
+
temperature: Float,
|
|
28
|
+
tool_choice: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool_choice,
|
|
29
|
+
tools: ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool],
|
|
30
|
+
top_logprobs: Integer,
|
|
31
|
+
top_p: Float,
|
|
32
|
+
use_beam_search: bool
|
|
33
|
+
}
|
|
34
|
+
& Telnyx::Internal::Type::request_parameters
|
|
35
|
+
|
|
36
|
+
class ChatCreateCompletionParams < Telnyx::Internal::Type::BaseModel
|
|
37
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
38
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
39
|
+
|
|
40
|
+
attr_accessor messages: ::Array[Telnyx::AI::OpenAI::ChatCreateCompletionParams::Message]
|
|
41
|
+
|
|
42
|
+
attr_reader api_key_ref: String?
|
|
43
|
+
|
|
44
|
+
def api_key_ref=: (String) -> String
|
|
45
|
+
|
|
46
|
+
attr_reader best_of: Integer?
|
|
47
|
+
|
|
48
|
+
def best_of=: (Integer) -> Integer
|
|
49
|
+
|
|
50
|
+
attr_reader early_stopping: bool?
|
|
51
|
+
|
|
52
|
+
def early_stopping=: (bool) -> bool
|
|
53
|
+
|
|
54
|
+
attr_reader enable_thinking: bool?
|
|
55
|
+
|
|
56
|
+
def enable_thinking=: (bool) -> bool
|
|
57
|
+
|
|
58
|
+
attr_reader frequency_penalty: Float?
|
|
59
|
+
|
|
60
|
+
def frequency_penalty=: (Float) -> Float
|
|
61
|
+
|
|
62
|
+
attr_reader guided_choice: ::Array[String]?
|
|
63
|
+
|
|
64
|
+
def guided_choice=: (::Array[String]) -> ::Array[String]
|
|
65
|
+
|
|
66
|
+
attr_reader guided_json: ::Hash[Symbol, top]?
|
|
67
|
+
|
|
68
|
+
def guided_json=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
69
|
+
|
|
70
|
+
attr_reader guided_regex: String?
|
|
71
|
+
|
|
72
|
+
def guided_regex=: (String) -> String
|
|
73
|
+
|
|
74
|
+
attr_reader length_penalty: Float?
|
|
75
|
+
|
|
76
|
+
def length_penalty=: (Float) -> Float
|
|
77
|
+
|
|
78
|
+
attr_reader logprobs: bool?
|
|
79
|
+
|
|
80
|
+
def logprobs=: (bool) -> bool
|
|
81
|
+
|
|
82
|
+
attr_reader max_tokens: Integer?
|
|
83
|
+
|
|
84
|
+
def max_tokens=: (Integer) -> Integer
|
|
85
|
+
|
|
86
|
+
attr_reader min_p: Float?
|
|
87
|
+
|
|
88
|
+
def min_p=: (Float) -> Float
|
|
89
|
+
|
|
90
|
+
attr_reader model: String?
|
|
91
|
+
|
|
92
|
+
def model=: (String) -> String
|
|
93
|
+
|
|
94
|
+
attr_reader n: Float?
|
|
95
|
+
|
|
96
|
+
def n=: (Float) -> Float
|
|
97
|
+
|
|
98
|
+
attr_reader presence_penalty: Float?
|
|
99
|
+
|
|
100
|
+
def presence_penalty=: (Float) -> Float
|
|
101
|
+
|
|
102
|
+
attr_reader response_format: Telnyx::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat?
|
|
103
|
+
|
|
104
|
+
def response_format=: (
|
|
105
|
+
Telnyx::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat
|
|
106
|
+
) -> Telnyx::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat
|
|
107
|
+
|
|
108
|
+
attr_reader seed: Integer?
|
|
109
|
+
|
|
110
|
+
def seed=: (Integer) -> Integer
|
|
111
|
+
|
|
112
|
+
attr_reader stop: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::stop?
|
|
113
|
+
|
|
114
|
+
def stop=: (
|
|
115
|
+
Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::stop
|
|
116
|
+
) -> Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::stop
|
|
117
|
+
|
|
118
|
+
attr_reader stream: bool?
|
|
119
|
+
|
|
120
|
+
def stream=: (bool) -> bool
|
|
121
|
+
|
|
122
|
+
attr_reader temperature: Float?
|
|
123
|
+
|
|
124
|
+
def temperature=: (Float) -> Float
|
|
125
|
+
|
|
126
|
+
attr_reader tool_choice: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool_choice?
|
|
127
|
+
|
|
128
|
+
def tool_choice=: (
|
|
129
|
+
Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool_choice
|
|
130
|
+
) -> Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool_choice
|
|
131
|
+
|
|
132
|
+
attr_reader tools: ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool]?
|
|
133
|
+
|
|
134
|
+
def tools=: (
|
|
135
|
+
::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool]
|
|
136
|
+
) -> ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool]
|
|
137
|
+
|
|
138
|
+
attr_reader top_logprobs: Integer?
|
|
139
|
+
|
|
140
|
+
def top_logprobs=: (Integer) -> Integer
|
|
141
|
+
|
|
142
|
+
attr_reader top_p: Float?
|
|
143
|
+
|
|
144
|
+
def top_p=: (Float) -> Float
|
|
145
|
+
|
|
146
|
+
attr_reader use_beam_search: bool?
|
|
147
|
+
|
|
148
|
+
def use_beam_search=: (bool) -> bool
|
|
149
|
+
|
|
150
|
+
def initialize: (
|
|
151
|
+
messages: ::Array[Telnyx::AI::OpenAI::ChatCreateCompletionParams::Message],
|
|
152
|
+
?api_key_ref: String,
|
|
153
|
+
?best_of: Integer,
|
|
154
|
+
?early_stopping: bool,
|
|
155
|
+
?enable_thinking: bool,
|
|
156
|
+
?frequency_penalty: Float,
|
|
157
|
+
?guided_choice: ::Array[String],
|
|
158
|
+
?guided_json: ::Hash[Symbol, top],
|
|
159
|
+
?guided_regex: String,
|
|
160
|
+
?length_penalty: Float,
|
|
161
|
+
?logprobs: bool,
|
|
162
|
+
?max_tokens: Integer,
|
|
163
|
+
?min_p: Float,
|
|
164
|
+
?model: String,
|
|
165
|
+
?n: Float,
|
|
166
|
+
?presence_penalty: Float,
|
|
167
|
+
?response_format: Telnyx::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat,
|
|
168
|
+
?seed: Integer,
|
|
169
|
+
?stop: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::stop,
|
|
170
|
+
?stream: bool,
|
|
171
|
+
?temperature: Float,
|
|
172
|
+
?tool_choice: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool_choice,
|
|
173
|
+
?tools: ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool],
|
|
174
|
+
?top_logprobs: Integer,
|
|
175
|
+
?top_p: Float,
|
|
176
|
+
?use_beam_search: bool,
|
|
177
|
+
?request_options: Telnyx::request_opts
|
|
178
|
+
) -> void
|
|
179
|
+
|
|
180
|
+
def to_hash: -> {
|
|
181
|
+
messages: ::Array[Telnyx::AI::OpenAI::ChatCreateCompletionParams::Message],
|
|
182
|
+
api_key_ref: String,
|
|
183
|
+
best_of: Integer,
|
|
184
|
+
early_stopping: bool,
|
|
185
|
+
enable_thinking: bool,
|
|
186
|
+
frequency_penalty: Float,
|
|
187
|
+
guided_choice: ::Array[String],
|
|
188
|
+
guided_json: ::Hash[Symbol, top],
|
|
189
|
+
guided_regex: String,
|
|
190
|
+
length_penalty: Float,
|
|
191
|
+
logprobs: bool,
|
|
192
|
+
max_tokens: Integer,
|
|
193
|
+
min_p: Float,
|
|
194
|
+
model: String,
|
|
195
|
+
n: Float,
|
|
196
|
+
presence_penalty: Float,
|
|
197
|
+
response_format: Telnyx::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat,
|
|
198
|
+
seed: Integer,
|
|
199
|
+
stop: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::stop,
|
|
200
|
+
stream: bool,
|
|
201
|
+
temperature: Float,
|
|
202
|
+
tool_choice: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool_choice,
|
|
203
|
+
tools: ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool],
|
|
204
|
+
top_logprobs: Integer,
|
|
205
|
+
top_p: Float,
|
|
206
|
+
use_beam_search: bool,
|
|
207
|
+
request_options: Telnyx::RequestOptions
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
type message =
|
|
211
|
+
{
|
|
212
|
+
content: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::content,
|
|
213
|
+
role: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::role
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
class Message < Telnyx::Internal::Type::BaseModel
|
|
217
|
+
attr_accessor content: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::content
|
|
218
|
+
|
|
219
|
+
attr_accessor role: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::role
|
|
220
|
+
|
|
221
|
+
def initialize: (
|
|
222
|
+
content: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::content,
|
|
223
|
+
role: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::role
|
|
224
|
+
) -> void
|
|
225
|
+
|
|
226
|
+
def to_hash: -> {
|
|
227
|
+
content: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::content,
|
|
228
|
+
role: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::role
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
type content =
|
|
232
|
+
String
|
|
233
|
+
| ::Array[Telnyx::AI::OpenAI::ChatCreateCompletionParams::Message::Content::TextAndImageArray]
|
|
234
|
+
|
|
235
|
+
module Content
|
|
236
|
+
extend Telnyx::Internal::Type::Union
|
|
237
|
+
|
|
238
|
+
type text_and_image_array =
|
|
239
|
+
{
|
|
240
|
+
type: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::Content::TextAndImageArray::type_,
|
|
241
|
+
image_url: String,
|
|
242
|
+
text: String
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
class TextAndImageArray < Telnyx::Internal::Type::BaseModel
|
|
246
|
+
attr_accessor type: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::Content::TextAndImageArray::type_
|
|
247
|
+
|
|
248
|
+
attr_reader image_url: String?
|
|
249
|
+
|
|
250
|
+
def image_url=: (String) -> String
|
|
251
|
+
|
|
252
|
+
attr_reader text: String?
|
|
253
|
+
|
|
254
|
+
def text=: (String) -> String
|
|
255
|
+
|
|
256
|
+
def initialize: (
|
|
257
|
+
type: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::Content::TextAndImageArray::type_,
|
|
258
|
+
?image_url: String,
|
|
259
|
+
?text: String
|
|
260
|
+
) -> void
|
|
261
|
+
|
|
262
|
+
def to_hash: -> {
|
|
263
|
+
type: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::Content::TextAndImageArray::type_,
|
|
264
|
+
image_url: String,
|
|
265
|
+
text: String
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
type type_ = :text | :image_url
|
|
269
|
+
|
|
270
|
+
module Type
|
|
271
|
+
extend Telnyx::Internal::Type::Enum
|
|
272
|
+
|
|
273
|
+
TEXT: :text
|
|
274
|
+
IMAGE_URL: :image_url
|
|
275
|
+
|
|
276
|
+
def self?.values: -> ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::Content::TextAndImageArray::type_]
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
def self?.variants: -> ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::content]
|
|
281
|
+
|
|
282
|
+
TextAndImage2DArray: Telnyx::Internal::Type::Converter
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
type role = :system | :user | :assistant | :tool
|
|
286
|
+
|
|
287
|
+
module Role
|
|
288
|
+
extend Telnyx::Internal::Type::Enum
|
|
289
|
+
|
|
290
|
+
SYSTEM: :system
|
|
291
|
+
USER: :user
|
|
292
|
+
ASSISTANT: :assistant
|
|
293
|
+
TOOL: :tool
|
|
294
|
+
|
|
295
|
+
def self?.values: -> ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::Message::role]
|
|
296
|
+
end
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
type response_format =
|
|
300
|
+
{
|
|
301
|
+
type: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat::type_
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
class ResponseFormat < Telnyx::Internal::Type::BaseModel
|
|
305
|
+
attr_accessor type: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat::type_
|
|
306
|
+
|
|
307
|
+
def initialize: (
|
|
308
|
+
type: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat::type_
|
|
309
|
+
) -> void
|
|
310
|
+
|
|
311
|
+
def to_hash: -> {
|
|
312
|
+
type: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat::type_
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
type type_ = :text | :json_object
|
|
316
|
+
|
|
317
|
+
module Type
|
|
318
|
+
extend Telnyx::Internal::Type::Enum
|
|
319
|
+
|
|
320
|
+
TEXT: :text
|
|
321
|
+
JSON_OBJECT: :json_object
|
|
322
|
+
|
|
323
|
+
def self?.values: -> ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat::type_]
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
type stop = String | ::Array[String]
|
|
328
|
+
|
|
329
|
+
module Stop
|
|
330
|
+
extend Telnyx::Internal::Type::Union
|
|
331
|
+
|
|
332
|
+
def self?.variants: -> ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::stop]
|
|
333
|
+
|
|
334
|
+
StringArray: Telnyx::Internal::Type::Converter
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
type tool_choice = :none | :auto | :required
|
|
338
|
+
|
|
339
|
+
module ToolChoice
|
|
340
|
+
extend Telnyx::Internal::Type::Enum
|
|
341
|
+
|
|
342
|
+
NONE: :none
|
|
343
|
+
AUTO: :auto
|
|
344
|
+
REQUIRED: :required
|
|
345
|
+
|
|
346
|
+
def self?.values: -> ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool_choice]
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
type tool =
|
|
350
|
+
Telnyx::AI::OpenAI::ChatCreateCompletionParams::Tool::Function
|
|
351
|
+
| Telnyx::AI::OpenAI::ChatCreateCompletionParams::Tool::Retrieval
|
|
352
|
+
|
|
353
|
+
module Tool
|
|
354
|
+
extend Telnyx::Internal::Type::Union
|
|
355
|
+
|
|
356
|
+
type function =
|
|
357
|
+
{
|
|
358
|
+
function: Telnyx::AI::OpenAI::ChatCreateCompletionParams::Tool::Function::Function,
|
|
359
|
+
type: :function
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
class Function < Telnyx::Internal::Type::BaseModel
|
|
363
|
+
attr_accessor function: Telnyx::AI::OpenAI::ChatCreateCompletionParams::Tool::Function::Function
|
|
364
|
+
|
|
365
|
+
attr_accessor type: :function
|
|
366
|
+
|
|
367
|
+
def initialize: (
|
|
368
|
+
function: Telnyx::AI::OpenAI::ChatCreateCompletionParams::Tool::Function::Function,
|
|
369
|
+
?type: :function
|
|
370
|
+
) -> void
|
|
371
|
+
|
|
372
|
+
def to_hash: -> {
|
|
373
|
+
function: Telnyx::AI::OpenAI::ChatCreateCompletionParams::Tool::Function::Function,
|
|
374
|
+
type: :function
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
type function =
|
|
378
|
+
{
|
|
379
|
+
name: String,
|
|
380
|
+
description: String,
|
|
381
|
+
parameters: ::Hash[Symbol, top]
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
class Function < Telnyx::Internal::Type::BaseModel
|
|
385
|
+
attr_accessor name: String
|
|
386
|
+
|
|
387
|
+
attr_reader description: String?
|
|
388
|
+
|
|
389
|
+
def description=: (String) -> String
|
|
390
|
+
|
|
391
|
+
attr_reader parameters: ::Hash[Symbol, top]?
|
|
392
|
+
|
|
393
|
+
def parameters=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
394
|
+
|
|
395
|
+
def initialize: (
|
|
396
|
+
name: String,
|
|
397
|
+
?description: String,
|
|
398
|
+
?parameters: ::Hash[Symbol, top]
|
|
399
|
+
) -> void
|
|
400
|
+
|
|
401
|
+
def to_hash: -> {
|
|
402
|
+
name: String,
|
|
403
|
+
description: String,
|
|
404
|
+
parameters: ::Hash[Symbol, top]
|
|
405
|
+
}
|
|
406
|
+
end
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
type retrieval =
|
|
410
|
+
{ retrieval: Telnyx::AI::BucketIDs, type: :retrieval }
|
|
411
|
+
|
|
412
|
+
class Retrieval < Telnyx::Internal::Type::BaseModel
|
|
413
|
+
attr_accessor retrieval: Telnyx::AI::BucketIDs
|
|
414
|
+
|
|
415
|
+
attr_accessor type: :retrieval
|
|
416
|
+
|
|
417
|
+
def initialize: (
|
|
418
|
+
retrieval: Telnyx::AI::BucketIDs,
|
|
419
|
+
?type: :retrieval
|
|
420
|
+
) -> void
|
|
421
|
+
|
|
422
|
+
def to_hash: -> {
|
|
423
|
+
retrieval: Telnyx::AI::BucketIDs,
|
|
424
|
+
type: :retrieval
|
|
425
|
+
}
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
def self?.variants: -> ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool]
|
|
429
|
+
end
|
|
430
|
+
end
|
|
431
|
+
end
|
|
432
|
+
end
|
|
433
|
+
end
|
|
434
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Telnyx
|
|
2
|
+
module Models
|
|
3
|
+
module AI
|
|
4
|
+
type openai_list_models_params =
|
|
5
|
+
{ } & Telnyx::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class OpenAIListModelsParams < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
def initialize: (?request_options: Telnyx::request_opts) -> void
|
|
12
|
+
|
|
13
|
+
def to_hash: -> { request_options: Telnyx::RequestOptions }
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
module Telnyx
|
|
2
|
+
module Models
|
|
3
|
+
module AI
|
|
4
|
+
type openai_list_models_response =
|
|
5
|
+
{
|
|
6
|
+
data: ::Array[Telnyx::Models::AI::OpenAIListModelsResponse::Data],
|
|
7
|
+
object: String
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class OpenAIListModelsResponse < Telnyx::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor data: ::Array[Telnyx::Models::AI::OpenAIListModelsResponse::Data]
|
|
12
|
+
|
|
13
|
+
attr_reader object: String?
|
|
14
|
+
|
|
15
|
+
def object=: (String) -> String
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
data: ::Array[Telnyx::Models::AI::OpenAIListModelsResponse::Data],
|
|
19
|
+
?object: String
|
|
20
|
+
) -> void
|
|
21
|
+
|
|
22
|
+
def to_hash: -> {
|
|
23
|
+
data: ::Array[Telnyx::Models::AI::OpenAIListModelsResponse::Data],
|
|
24
|
+
object: String
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type data =
|
|
28
|
+
{ id: String, created: Integer, owned_by: String, object: String }
|
|
29
|
+
|
|
30
|
+
class Data < Telnyx::Internal::Type::BaseModel
|
|
31
|
+
attr_accessor id: String
|
|
32
|
+
|
|
33
|
+
attr_accessor created: Integer
|
|
34
|
+
|
|
35
|
+
attr_accessor owned_by: String
|
|
36
|
+
|
|
37
|
+
attr_reader object: String?
|
|
38
|
+
|
|
39
|
+
def object=: (String) -> String
|
|
40
|
+
|
|
41
|
+
def initialize: (
|
|
42
|
+
id: String,
|
|
43
|
+
created: Integer,
|
|
44
|
+
owned_by: String,
|
|
45
|
+
?object: String
|
|
46
|
+
) -> void
|
|
47
|
+
|
|
48
|
+
def to_hash: -> {
|
|
49
|
+
id: String,
|
|
50
|
+
created: Integer,
|
|
51
|
+
owned_by: String,
|
|
52
|
+
object: String
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -20,6 +20,8 @@ module Telnyx
|
|
|
20
20
|
?n: Float,
|
|
21
21
|
?presence_penalty: Float,
|
|
22
22
|
?response_format: Telnyx::AI::ChatCreateCompletionParams::ResponseFormat,
|
|
23
|
+
?seed: Integer,
|
|
24
|
+
?stop: Telnyx::Models::AI::ChatCreateCompletionParams::stop,
|
|
23
25
|
?stream: bool,
|
|
24
26
|
?temperature: Float,
|
|
25
27
|
?tool_choice: Telnyx::Models::AI::ChatCreateCompletionParams::tool_choice,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module Telnyx
|
|
2
|
+
module Resources
|
|
3
|
+
class AI
|
|
4
|
+
class OpenAI
|
|
5
|
+
class Chat
|
|
6
|
+
def create_completion: (
|
|
7
|
+
messages: ::Array[Telnyx::AI::OpenAI::ChatCreateCompletionParams::Message],
|
|
8
|
+
?api_key_ref: String,
|
|
9
|
+
?best_of: Integer,
|
|
10
|
+
?early_stopping: bool,
|
|
11
|
+
?enable_thinking: bool,
|
|
12
|
+
?frequency_penalty: Float,
|
|
13
|
+
?guided_choice: ::Array[String],
|
|
14
|
+
?guided_json: ::Hash[Symbol, top],
|
|
15
|
+
?guided_regex: String,
|
|
16
|
+
?length_penalty: Float,
|
|
17
|
+
?logprobs: bool,
|
|
18
|
+
?max_tokens: Integer,
|
|
19
|
+
?min_p: Float,
|
|
20
|
+
?model: String,
|
|
21
|
+
?n: Float,
|
|
22
|
+
?presence_penalty: Float,
|
|
23
|
+
?response_format: Telnyx::AI::OpenAI::ChatCreateCompletionParams::ResponseFormat,
|
|
24
|
+
?seed: Integer,
|
|
25
|
+
?stop: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::stop,
|
|
26
|
+
?stream: bool,
|
|
27
|
+
?temperature: Float,
|
|
28
|
+
?tool_choice: Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool_choice,
|
|
29
|
+
?tools: ::Array[Telnyx::Models::AI::OpenAI::ChatCreateCompletionParams::tool],
|
|
30
|
+
?top_logprobs: Integer,
|
|
31
|
+
?top_p: Float,
|
|
32
|
+
?use_beam_search: bool,
|
|
33
|
+
?request_options: Telnyx::request_opts
|
|
34
|
+
) -> Telnyx::Models::AI::OpenAI::chat_create_completion_response
|
|
35
|
+
|
|
36
|
+
def initialize: (client: Telnyx::Client) -> void
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -4,6 +4,12 @@ module Telnyx
|
|
|
4
4
|
class OpenAI
|
|
5
5
|
attr_reader embeddings: Telnyx::Resources::AI::OpenAI::Embeddings
|
|
6
6
|
|
|
7
|
+
attr_reader chat: Telnyx::Resources::AI::OpenAI::Chat
|
|
8
|
+
|
|
9
|
+
def list_models: (
|
|
10
|
+
?request_options: Telnyx::request_opts
|
|
11
|
+
) -> Telnyx::Models::AI::OpenAIListModelsResponse
|
|
12
|
+
|
|
7
13
|
def initialize: (client: Telnyx::Client) -> void
|
|
8
14
|
end
|
|
9
15
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: telnyx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.102.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Telnyx
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -387,10 +387,14 @@ files:
|
|
|
387
387
|
- lib/telnyx/models/ai/missions/tool_update_tool_response.rb
|
|
388
388
|
- lib/telnyx/models/ai/observability.rb
|
|
389
389
|
- lib/telnyx/models/ai/observability_req.rb
|
|
390
|
+
- lib/telnyx/models/ai/openai/chat_create_completion_params.rb
|
|
391
|
+
- lib/telnyx/models/ai/openai/chat_create_completion_response.rb
|
|
390
392
|
- lib/telnyx/models/ai/openai/embedding_create_embeddings_params.rb
|
|
391
393
|
- lib/telnyx/models/ai/openai/embedding_create_embeddings_response.rb
|
|
392
394
|
- lib/telnyx/models/ai/openai/embedding_list_embedding_models_params.rb
|
|
393
395
|
- lib/telnyx/models/ai/openai/embedding_list_embedding_models_response.rb
|
|
396
|
+
- lib/telnyx/models/ai/openai_list_models_params.rb
|
|
397
|
+
- lib/telnyx/models/ai/openai_list_models_response.rb
|
|
394
398
|
- lib/telnyx/models/ai/post_conversation_settings.rb
|
|
395
399
|
- lib/telnyx/models/ai/post_conversation_settings_req.rb
|
|
396
400
|
- lib/telnyx/models/ai/privacy_settings.rb
|
|
@@ -2495,6 +2499,7 @@ files:
|
|
|
2495
2499
|
- lib/telnyx/resources/ai/missions/runs/telnyx_agents.rb
|
|
2496
2500
|
- lib/telnyx/resources/ai/missions/tools.rb
|
|
2497
2501
|
- lib/telnyx/resources/ai/openai.rb
|
|
2502
|
+
- lib/telnyx/resources/ai/openai/chat.rb
|
|
2498
2503
|
- lib/telnyx/resources/ai/openai/embeddings.rb
|
|
2499
2504
|
- lib/telnyx/resources/ai/tools.rb
|
|
2500
2505
|
- lib/telnyx/resources/alphanumeric_sender_ids.rb
|
|
@@ -3091,10 +3096,14 @@ files:
|
|
|
3091
3096
|
- rbi/telnyx/models/ai/missions/tool_update_tool_response.rbi
|
|
3092
3097
|
- rbi/telnyx/models/ai/observability.rbi
|
|
3093
3098
|
- rbi/telnyx/models/ai/observability_req.rbi
|
|
3099
|
+
- rbi/telnyx/models/ai/openai/chat_create_completion_params.rbi
|
|
3100
|
+
- rbi/telnyx/models/ai/openai/chat_create_completion_response.rbi
|
|
3094
3101
|
- rbi/telnyx/models/ai/openai/embedding_create_embeddings_params.rbi
|
|
3095
3102
|
- rbi/telnyx/models/ai/openai/embedding_create_embeddings_response.rbi
|
|
3096
3103
|
- rbi/telnyx/models/ai/openai/embedding_list_embedding_models_params.rbi
|
|
3097
3104
|
- rbi/telnyx/models/ai/openai/embedding_list_embedding_models_response.rbi
|
|
3105
|
+
- rbi/telnyx/models/ai/openai_list_models_params.rbi
|
|
3106
|
+
- rbi/telnyx/models/ai/openai_list_models_response.rbi
|
|
3098
3107
|
- rbi/telnyx/models/ai/post_conversation_settings.rbi
|
|
3099
3108
|
- rbi/telnyx/models/ai/post_conversation_settings_req.rbi
|
|
3100
3109
|
- rbi/telnyx/models/ai/privacy_settings.rbi
|
|
@@ -5199,6 +5208,7 @@ files:
|
|
|
5199
5208
|
- rbi/telnyx/resources/ai/missions/runs/telnyx_agents.rbi
|
|
5200
5209
|
- rbi/telnyx/resources/ai/missions/tools.rbi
|
|
5201
5210
|
- rbi/telnyx/resources/ai/openai.rbi
|
|
5211
|
+
- rbi/telnyx/resources/ai/openai/chat.rbi
|
|
5202
5212
|
- rbi/telnyx/resources/ai/openai/embeddings.rbi
|
|
5203
5213
|
- rbi/telnyx/resources/ai/tools.rbi
|
|
5204
5214
|
- rbi/telnyx/resources/alphanumeric_sender_ids.rbi
|
|
@@ -5786,10 +5796,14 @@ files:
|
|
|
5786
5796
|
- sig/telnyx/models/ai/missions/tool_update_tool_response.rbs
|
|
5787
5797
|
- sig/telnyx/models/ai/observability.rbs
|
|
5788
5798
|
- sig/telnyx/models/ai/observability_req.rbs
|
|
5799
|
+
- sig/telnyx/models/ai/openai/chat_create_completion_params.rbs
|
|
5800
|
+
- sig/telnyx/models/ai/openai/chat_create_completion_response.rbs
|
|
5789
5801
|
- sig/telnyx/models/ai/openai/embedding_create_embeddings_params.rbs
|
|
5790
5802
|
- sig/telnyx/models/ai/openai/embedding_create_embeddings_response.rbs
|
|
5791
5803
|
- sig/telnyx/models/ai/openai/embedding_list_embedding_models_params.rbs
|
|
5792
5804
|
- sig/telnyx/models/ai/openai/embedding_list_embedding_models_response.rbs
|
|
5805
|
+
- sig/telnyx/models/ai/openai_list_models_params.rbs
|
|
5806
|
+
- sig/telnyx/models/ai/openai_list_models_response.rbs
|
|
5793
5807
|
- sig/telnyx/models/ai/post_conversation_settings.rbs
|
|
5794
5808
|
- sig/telnyx/models/ai/post_conversation_settings_req.rbs
|
|
5795
5809
|
- sig/telnyx/models/ai/privacy_settings.rbs
|
|
@@ -7894,6 +7908,7 @@ files:
|
|
|
7894
7908
|
- sig/telnyx/resources/ai/missions/runs/telnyx_agents.rbs
|
|
7895
7909
|
- sig/telnyx/resources/ai/missions/tools.rbs
|
|
7896
7910
|
- sig/telnyx/resources/ai/openai.rbs
|
|
7911
|
+
- sig/telnyx/resources/ai/openai/chat.rbs
|
|
7897
7912
|
- sig/telnyx/resources/ai/openai/embeddings.rbs
|
|
7898
7913
|
- sig/telnyx/resources/ai/tools.rbs
|
|
7899
7914
|
- sig/telnyx/resources/alphanumeric_sender_ids.rbs
|