telnyx 7.7.0 → 7.9.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 (255) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/client.d.mts +9 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +9 -38
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +9 -38
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js +4 -30
  16. package/resources/ai/ai.js.map +1 -1
  17. package/resources/ai/ai.mjs +5 -31
  18. package/resources/ai/ai.mjs.map +1 -1
  19. package/resources/ai/anthropic/anthropic.d.mts +10 -0
  20. package/resources/ai/anthropic/anthropic.d.mts.map +1 -0
  21. package/resources/ai/anthropic/anthropic.d.ts +10 -0
  22. package/resources/ai/anthropic/anthropic.d.ts.map +1 -0
  23. package/resources/ai/anthropic/anthropic.js +17 -0
  24. package/resources/ai/anthropic/anthropic.js.map +1 -0
  25. package/resources/ai/anthropic/anthropic.mjs +12 -0
  26. package/resources/ai/anthropic/anthropic.mjs.map +1 -0
  27. package/resources/ai/anthropic/index.d.mts +3 -0
  28. package/resources/ai/anthropic/index.d.mts.map +1 -0
  29. package/resources/ai/anthropic/index.d.ts +3 -0
  30. package/resources/ai/anthropic/index.d.ts.map +1 -0
  31. package/resources/ai/anthropic/index.js +9 -0
  32. package/resources/ai/anthropic/index.js.map +1 -0
  33. package/resources/ai/anthropic/index.mjs +4 -0
  34. package/resources/ai/anthropic/index.mjs.map +1 -0
  35. package/resources/ai/anthropic/v1.d.mts +148 -0
  36. package/resources/ai/anthropic/v1.d.mts.map +1 -0
  37. package/resources/ai/anthropic/v1.d.ts +148 -0
  38. package/resources/ai/anthropic/v1.d.ts.map +1 -0
  39. package/resources/ai/anthropic/v1.js +35 -0
  40. package/resources/ai/anthropic/v1.js.map +1 -0
  41. package/resources/ai/anthropic/v1.mjs +31 -0
  42. package/resources/ai/anthropic/v1.mjs.map +1 -0
  43. package/resources/ai/anthropic.d.mts +2 -0
  44. package/resources/ai/anthropic.d.mts.map +1 -0
  45. package/resources/ai/anthropic.d.ts +2 -0
  46. package/resources/ai/anthropic.d.ts.map +1 -0
  47. package/resources/ai/anthropic.js +6 -0
  48. package/resources/ai/anthropic.js.map +1 -0
  49. package/resources/ai/anthropic.mjs +3 -0
  50. package/resources/ai/anthropic.mjs.map +1 -0
  51. package/resources/ai/assistants/assistants.d.mts +58 -5
  52. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  53. package/resources/ai/assistants/assistants.d.ts +58 -5
  54. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  55. package/resources/ai/assistants/assistants.js +2 -2
  56. package/resources/ai/assistants/assistants.js.map +1 -1
  57. package/resources/ai/assistants/assistants.mjs +2 -2
  58. package/resources/ai/assistants/assistants.mjs.map +1 -1
  59. package/resources/ai/chat.d.mts +1 -188
  60. package/resources/ai/chat.d.mts.map +1 -1
  61. package/resources/ai/chat.d.ts +1 -188
  62. package/resources/ai/chat.d.ts.map +1 -1
  63. package/resources/ai/chat.js +0 -14
  64. package/resources/ai/chat.js.map +1 -1
  65. package/resources/ai/chat.mjs +0 -14
  66. package/resources/ai/chat.mjs.map +1 -1
  67. package/resources/ai/conversations/conversation-insights.d.mts +105 -0
  68. package/resources/ai/conversations/conversation-insights.d.mts.map +1 -0
  69. package/resources/ai/conversations/conversation-insights.d.ts +105 -0
  70. package/resources/ai/conversations/conversation-insights.d.ts.map +1 -0
  71. package/resources/ai/conversations/conversation-insights.js +24 -0
  72. package/resources/ai/conversations/conversation-insights.js.map +1 -0
  73. package/resources/ai/conversations/conversation-insights.mjs +20 -0
  74. package/resources/ai/conversations/conversation-insights.mjs.map +1 -0
  75. package/resources/ai/conversations/conversations.d.mts +4 -0
  76. package/resources/ai/conversations/conversations.d.mts.map +1 -1
  77. package/resources/ai/conversations/conversations.d.ts +4 -0
  78. package/resources/ai/conversations/conversations.d.ts.map +1 -1
  79. package/resources/ai/conversations/conversations.js +4 -0
  80. package/resources/ai/conversations/conversations.js.map +1 -1
  81. package/resources/ai/conversations/conversations.mjs +4 -0
  82. package/resources/ai/conversations/conversations.mjs.map +1 -1
  83. package/resources/ai/conversations/index.d.mts +1 -0
  84. package/resources/ai/conversations/index.d.mts.map +1 -1
  85. package/resources/ai/conversations/index.d.ts +1 -0
  86. package/resources/ai/conversations/index.d.ts.map +1 -1
  87. package/resources/ai/conversations/index.js +3 -1
  88. package/resources/ai/conversations/index.js.map +1 -1
  89. package/resources/ai/conversations/index.mjs +1 -0
  90. package/resources/ai/conversations/index.mjs.map +1 -1
  91. package/resources/ai/index.d.mts +4 -3
  92. package/resources/ai/index.d.mts.map +1 -1
  93. package/resources/ai/index.d.ts +4 -3
  94. package/resources/ai/index.d.ts.map +1 -1
  95. package/resources/ai/index.js +17 -15
  96. package/resources/ai/index.js.map +1 -1
  97. package/resources/ai/index.mjs +2 -1
  98. package/resources/ai/index.mjs.map +1 -1
  99. package/resources/ai/tools.d.mts +28 -1
  100. package/resources/ai/tools.d.mts.map +1 -1
  101. package/resources/ai/tools.d.ts +28 -1
  102. package/resources/ai/tools.d.ts.map +1 -1
  103. package/resources/calls/actions.d.mts +31 -5
  104. package/resources/calls/actions.d.mts.map +1 -1
  105. package/resources/calls/actions.d.ts +31 -5
  106. package/resources/calls/actions.d.ts.map +1 -1
  107. package/resources/calls/calls.d.mts +11 -0
  108. package/resources/calls/calls.d.mts.map +1 -1
  109. package/resources/calls/calls.d.ts +11 -0
  110. package/resources/calls/calls.d.ts.map +1 -1
  111. package/resources/calls/calls.js.map +1 -1
  112. package/resources/calls/calls.mjs.map +1 -1
  113. package/resources/conferences/actions.d.mts +6 -0
  114. package/resources/conferences/actions.d.mts.map +1 -1
  115. package/resources/conferences/actions.d.ts +6 -0
  116. package/resources/conferences/actions.d.ts.map +1 -1
  117. package/resources/index.d.mts +3 -3
  118. package/resources/index.d.mts.map +1 -1
  119. package/resources/index.d.ts +3 -3
  120. package/resources/index.d.ts.map +1 -1
  121. package/resources/index.js.map +1 -1
  122. package/resources/index.mjs.map +1 -1
  123. package/resources/managed-accounts/managed-accounts.d.mts +11 -2
  124. package/resources/managed-accounts/managed-accounts.d.mts.map +1 -1
  125. package/resources/managed-accounts/managed-accounts.d.ts +11 -2
  126. package/resources/managed-accounts/managed-accounts.d.ts.map +1 -1
  127. package/resources/managed-accounts/managed-accounts.js.map +1 -1
  128. package/resources/managed-accounts/managed-accounts.mjs.map +1 -1
  129. package/resources/messages/index.d.mts +1 -1
  130. package/resources/messages/index.d.mts.map +1 -1
  131. package/resources/messages/index.d.ts +1 -1
  132. package/resources/messages/index.d.ts.map +1 -1
  133. package/resources/messages/index.js.map +1 -1
  134. package/resources/messages/index.mjs.map +1 -1
  135. package/resources/messages/messages.d.mts +4 -82
  136. package/resources/messages/messages.d.mts.map +1 -1
  137. package/resources/messages/messages.d.ts +4 -82
  138. package/resources/messages/messages.d.ts.map +1 -1
  139. package/resources/messages/messages.js +3 -15
  140. package/resources/messages/messages.js.map +1 -1
  141. package/resources/messages/messages.mjs +3 -15
  142. package/resources/messages/messages.mjs.map +1 -1
  143. package/resources/phone-numbers/phone-numbers.d.mts +21 -0
  144. package/resources/phone-numbers/phone-numbers.d.mts.map +1 -1
  145. package/resources/phone-numbers/phone-numbers.d.ts +21 -0
  146. package/resources/phone-numbers/phone-numbers.d.ts.map +1 -1
  147. package/resources/phone-numbers/phone-numbers.js.map +1 -1
  148. package/resources/phone-numbers/phone-numbers.mjs.map +1 -1
  149. package/resources/requirements.d.mts +28 -3
  150. package/resources/requirements.d.mts.map +1 -1
  151. package/resources/requirements.d.ts +28 -3
  152. package/resources/requirements.d.ts.map +1 -1
  153. package/resources/requirements.js +2 -2
  154. package/resources/requirements.js.map +1 -1
  155. package/resources/requirements.mjs +2 -2
  156. package/resources/requirements.mjs.map +1 -1
  157. package/resources/speech-to-text/speech-to-text.d.mts +1 -1
  158. package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
  159. package/resources/speech-to-text/speech-to-text.d.ts +1 -1
  160. package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
  161. package/resources/storage/cloudfs/actions.d.mts +43 -0
  162. package/resources/storage/cloudfs/actions.d.mts.map +1 -0
  163. package/resources/storage/cloudfs/actions.d.ts +43 -0
  164. package/resources/storage/cloudfs/actions.d.ts.map +1 -0
  165. package/resources/storage/cloudfs/actions.js +39 -0
  166. package/resources/storage/cloudfs/actions.js.map +1 -0
  167. package/resources/storage/cloudfs/actions.mjs +35 -0
  168. package/resources/storage/cloudfs/actions.mjs.map +1 -0
  169. package/resources/storage/cloudfs/cloudfs.d.mts +345 -0
  170. package/resources/storage/cloudfs/cloudfs.d.mts.map +1 -0
  171. package/resources/storage/cloudfs/cloudfs.d.ts +345 -0
  172. package/resources/storage/cloudfs/cloudfs.d.ts.map +1 -0
  173. package/resources/storage/cloudfs/cloudfs.js +116 -0
  174. package/resources/storage/cloudfs/cloudfs.js.map +1 -0
  175. package/resources/storage/cloudfs/cloudfs.mjs +111 -0
  176. package/resources/storage/cloudfs/cloudfs.mjs.map +1 -0
  177. package/resources/storage/cloudfs/index.d.mts +3 -0
  178. package/resources/storage/cloudfs/index.d.mts.map +1 -0
  179. package/resources/storage/cloudfs/index.d.ts +3 -0
  180. package/resources/storage/cloudfs/index.d.ts.map +1 -0
  181. package/resources/storage/cloudfs/index.js +9 -0
  182. package/resources/storage/cloudfs/index.js.map +1 -0
  183. package/resources/storage/cloudfs/index.mjs +4 -0
  184. package/resources/storage/cloudfs/index.mjs.map +1 -0
  185. package/resources/storage/cloudfs.d.mts +2 -0
  186. package/resources/storage/cloudfs.d.mts.map +1 -0
  187. package/resources/storage/cloudfs.d.ts +2 -0
  188. package/resources/storage/cloudfs.d.ts.map +1 -0
  189. package/resources/storage/cloudfs.js +6 -0
  190. package/resources/storage/cloudfs.js.map +1 -0
  191. package/resources/storage/cloudfs.mjs +3 -0
  192. package/resources/storage/cloudfs.mjs.map +1 -0
  193. package/resources/storage/index.d.mts +1 -0
  194. package/resources/storage/index.d.mts.map +1 -1
  195. package/resources/storage/index.d.ts +1 -0
  196. package/resources/storage/index.d.ts.map +1 -1
  197. package/resources/storage/index.js +7 -5
  198. package/resources/storage/index.js.map +1 -1
  199. package/resources/storage/index.mjs +1 -0
  200. package/resources/storage/index.mjs.map +1 -1
  201. package/resources/storage/storage.d.mts +4 -0
  202. package/resources/storage/storage.d.mts.map +1 -1
  203. package/resources/storage/storage.d.ts +4 -0
  204. package/resources/storage/storage.d.ts.map +1 -1
  205. package/resources/storage/storage.js +4 -0
  206. package/resources/storage/storage.js.map +1 -1
  207. package/resources/storage/storage.mjs +4 -0
  208. package/resources/storage/storage.mjs.map +1 -1
  209. package/resources/text-to-speech/text-to-speech.d.mts +16 -11
  210. package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
  211. package/resources/text-to-speech/text-to-speech.d.ts +16 -11
  212. package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
  213. package/resources/verify-profiles.d.mts +3 -3
  214. package/resources/verify-profiles.d.ts +3 -3
  215. package/resources/webhooks.d.mts +125 -19
  216. package/resources/webhooks.d.mts.map +1 -1
  217. package/resources/webhooks.d.ts +125 -19
  218. package/resources/webhooks.d.ts.map +1 -1
  219. package/src/client.ts +5 -8
  220. package/src/resources/ai/ai.ts +10 -57
  221. package/src/resources/ai/anthropic/anthropic.ts +19 -0
  222. package/src/resources/ai/anthropic/index.ts +4 -0
  223. package/src/resources/ai/anthropic/v1.ts +157 -0
  224. package/src/resources/ai/anthropic.ts +3 -0
  225. package/src/resources/ai/assistants/assistants.ts +68 -5
  226. package/src/resources/ai/chat.ts +2 -234
  227. package/src/resources/ai/conversations/conversation-insights.ts +125 -0
  228. package/src/resources/ai/conversations/conversations.ts +15 -0
  229. package/src/resources/ai/conversations/index.ts +5 -0
  230. package/src/resources/ai/index.ts +3 -9
  231. package/src/resources/ai/tools.ts +32 -0
  232. package/src/resources/calls/actions.ts +31 -5
  233. package/src/resources/calls/calls.ts +12 -0
  234. package/src/resources/conferences/actions.ts +6 -0
  235. package/src/resources/index.ts +1 -4
  236. package/src/resources/managed-accounts/managed-accounts.ts +13 -2
  237. package/src/resources/messages/index.ts +0 -2
  238. package/src/resources/messages/messages.ts +3 -112
  239. package/src/resources/phone-numbers/phone-numbers.ts +24 -0
  240. package/src/resources/requirements.ts +38 -3
  241. package/src/resources/speech-to-text/speech-to-text.ts +1 -1
  242. package/src/resources/storage/cloudfs/actions.ts +59 -0
  243. package/src/resources/storage/cloudfs/cloudfs.ts +446 -0
  244. package/src/resources/storage/cloudfs/index.ts +13 -0
  245. package/src/resources/storage/cloudfs.ts +3 -0
  246. package/src/resources/storage/index.ts +10 -0
  247. package/src/resources/storage/storage.ts +24 -0
  248. package/src/resources/text-to-speech/text-to-speech.ts +16 -11
  249. package/src/resources/verify-profiles.ts +3 -3
  250. package/src/resources/webhooks.ts +152 -11
  251. package/src/version.ts +1 -1
  252. package/version.d.mts +1 -1
  253. package/version.d.ts +1 -1
  254. package/version.js +1 -1
  255. package/version.mjs +1 -1
@@ -1,20 +1,6 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
2
  import * as ChatAPI from "./chat.mjs";
3
- import { APIPromise } from "../../core/api-promise.mjs";
4
- import { RequestOptions } from "../../internal/request-options.mjs";
5
- /**
6
- * Generate text with LLMs
7
- */
8
3
  export declare class Chat extends APIResource {
9
- /**
10
- * **Deprecated**: Use `POST /v2/ai/openai/chat/completions` instead. Chat with a
11
- * language model. This endpoint is consistent with the
12
- * [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat)
13
- * and may be used with the OpenAI JS or Python SDK.
14
- *
15
- * @deprecated
16
- */
17
- createCompletion(body: ChatCreateCompletionParams, options?: RequestOptions): APIPromise<ChatCreateCompletionResponse>;
18
4
  }
19
5
  export interface BucketIDs {
20
6
  /**
@@ -198,180 +184,7 @@ export declare namespace ChatCompletionRequest {
198
184
  type: 'retrieval';
199
185
  }
200
186
  }
201
- export type ChatCreateCompletionResponse = {
202
- [key: string]: unknown;
203
- };
204
- export interface ChatCreateCompletionParams {
205
- /**
206
- * A list of the previous chat messages for context.
207
- */
208
- messages: Array<ChatCreateCompletionParams.Message>;
209
- /**
210
- * If you are using an external inference provider like xAI or OpenAI, this field
211
- * allows you to pass along a reference to your API key. After creating an
212
- * [integration secret](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
213
- * for you API key, pass the secret's `identifier` in this field.
214
- */
215
- api_key_ref?: string;
216
- /**
217
- * This is used with `use_beam_search` to determine how many candidate beams to
218
- * explore.
219
- */
220
- best_of?: number;
221
- /**
222
- * This is used with `use_beam_search`. If `true`, generation stops as soon as
223
- * there are `best_of` complete candidates; if `false`, a heuristic is applied and
224
- * the generation stops when is it very unlikely to find better candidates.
225
- */
226
- early_stopping?: boolean;
227
- /**
228
- * Whether to enable the thinking/reasoning phase for models that support it (e.g.,
229
- * QwQ, Qwen3). When set to false, the model will skip the internal reasoning step
230
- * and respond directly, which can reduce latency. Defaults to true.
231
- */
232
- enable_thinking?: boolean;
233
- /**
234
- * Higher values will penalize the model from repeating the same output tokens.
235
- */
236
- frequency_penalty?: number;
237
- /**
238
- * If specified, the output will be exactly one of the choices.
239
- */
240
- guided_choice?: Array<string>;
241
- /**
242
- * Must be a valid JSON schema. If specified, the output will follow the JSON
243
- * schema.
244
- */
245
- guided_json?: {
246
- [key: string]: unknown;
247
- };
248
- /**
249
- * If specified, the output will follow the regex pattern.
250
- */
251
- guided_regex?: string;
252
- /**
253
- * This is used with `use_beam_search` to prefer shorter or longer completions.
254
- */
255
- length_penalty?: number;
256
- /**
257
- * Whether to return log probabilities of the output tokens or not. If true,
258
- * returns the log probabilities of each output token returned in the `content` of
259
- * `message`.
260
- */
261
- logprobs?: boolean;
262
- /**
263
- * Maximum number of completion tokens the model should generate.
264
- */
265
- max_tokens?: number;
266
- /**
267
- * This is an alternative to `top_p` that
268
- * [many prefer](https://github.com/huggingface/transformers/issues/27670). Must be
269
- * in [0, 1].
270
- */
271
- min_p?: number;
272
- /**
273
- * The language model to chat with.
274
- */
275
- model?: string;
276
- /**
277
- * This will return multiple choices for you instead of a single chat completion.
278
- */
279
- n?: number;
280
- /**
281
- * Higher values will penalize the model from repeating the same output tokens.
282
- */
283
- presence_penalty?: number;
284
- /**
285
- * Use this is you want to guarantee a JSON output without defining a schema. For
286
- * control over the schema, use `guided_json`.
287
- */
288
- response_format?: ChatCreateCompletionParams.ResponseFormat;
289
- /**
290
- * If specified, the system will make a best effort to sample deterministically,
291
- * such that repeated requests with the same `seed` and parameters should return
292
- * the same result.
293
- */
294
- seed?: number;
295
- /**
296
- * Up to 4 sequences where the API will stop generating further tokens. The
297
- * returned text will not contain the stop sequence.
298
- */
299
- stop?: string | Array<string>;
300
- /**
301
- * Whether or not to stream data-only server-sent events as they become available.
302
- */
303
- stream?: boolean;
304
- /**
305
- * Adjusts the "creativity" of the model. Lower values make the model more
306
- * deterministic and repetitive, while higher values make the model more random and
307
- * creative.
308
- */
309
- temperature?: number;
310
- tool_choice?: 'none' | 'auto' | 'required';
311
- /**
312
- * The `function` tool type follows the same schema as the
313
- * [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat).
314
- * The `retrieval` tool type is unique to Telnyx. You may pass a list of
315
- * [embedded storage buckets](https://developers.telnyx.com/api-reference/embeddings/embed-documents)
316
- * for retrieval-augmented generation.
317
- */
318
- tools?: Array<ChatCreateCompletionParams.Function | ChatCreateCompletionParams.Retrieval>;
319
- /**
320
- * This is used with `logprobs`. An integer between 0 and 20 specifying the number
321
- * of most likely tokens to return at each token position, each with an associated
322
- * log probability.
323
- */
324
- top_logprobs?: number;
325
- /**
326
- * An alternative or complement to `temperature`. This adjusts how many of the top
327
- * possibilities to consider.
328
- */
329
- top_p?: number;
330
- /**
331
- * Setting this to `true` will allow the model to
332
- * [explore more completion options](https://huggingface.co/blog/how-to-generate#beam-search).
333
- * This is not supported by OpenAI.
334
- */
335
- use_beam_search?: boolean;
336
- }
337
- export declare namespace ChatCreateCompletionParams {
338
- interface Message {
339
- content: string | Array<Message.TextAndImageArray>;
340
- role: 'system' | 'user' | 'assistant' | 'tool';
341
- }
342
- namespace Message {
343
- interface TextAndImageArray {
344
- type: 'text' | 'image_url';
345
- image_url?: string;
346
- text?: string;
347
- }
348
- }
349
- /**
350
- * Use this is you want to guarantee a JSON output without defining a schema. For
351
- * control over the schema, use `guided_json`.
352
- */
353
- interface ResponseFormat {
354
- type: 'text' | 'json_object';
355
- }
356
- interface Function {
357
- function: Function.Function;
358
- type: 'function';
359
- }
360
- namespace Function {
361
- interface Function {
362
- name: string;
363
- description?: string;
364
- parameters?: {
365
- [key: string]: unknown;
366
- };
367
- }
368
- }
369
- interface Retrieval {
370
- retrieval: ChatAPI.BucketIDs;
371
- type: 'retrieval';
372
- }
373
- }
374
187
  export declare namespace Chat {
375
- export { type BucketIDs as BucketIDs, type ChatCompletionRequest as ChatCompletionRequest, type ChatCreateCompletionResponse as ChatCreateCompletionResponse, type ChatCreateCompletionParams as ChatCreateCompletionParams, };
188
+ export { type BucketIDs as BucketIDs, type ChatCompletionRequest as ChatCompletionRequest };
376
189
  }
377
190
  //# sourceMappingURL=chat.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.mts","sourceRoot":"","sources":["../../src/resources/ai/chat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,OAAO,mBAAe;AAClC,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;OAOG;IACH,gBAAgB,CACd,IAAI,EA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GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;KAChD;IAED,UAAiB,OAAO,CAAC;QACvB,UAAiB,iBAAiB;YAChC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;YAE3B,SAAS,CAAC,EAAE,MAAM,CAAC;YAEnB,IAAI,CAAC,EAAE,MAAM,CAAC;SACf;KACF;IAED;;;OAGG;IACH,UAAiB,cAAc;QAC7B,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC;KAC9B;IAED,UAAiB,QAAQ;QACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;QAE5B,IAAI,EAAE,UAAU,CAAC;KAClB;IAED,UAAiB,QAAQ,CAAC;QACxB,UAAiB,QAAQ;YACvB,IAAI,EAAE,MAAM,CAAC;YAEb,WAAW,CAAC,EAAE,MAAM,CAAC;YAErB,UAAU,CAAC,EAAE;gBAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;aAAE,CAAC;SACzC;KACF;IAED,UAAiB,SAAS;QACxB,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC;QAE7B,IAAI,EAAE,WAAW,CAAC;KACnB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,SAAS,IAAI,SAAS,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAC7F"}
@@ -1,20 +1,6 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import * as ChatAPI from "./chat.js";
3
- import { APIPromise } from "../../core/api-promise.js";
4
- import { RequestOptions } from "../../internal/request-options.js";
5
- /**
6
- * Generate text with LLMs
7
- */
8
3
  export declare class Chat extends APIResource {
9
- /**
10
- * **Deprecated**: Use `POST /v2/ai/openai/chat/completions` instead. Chat with a
11
- * language model. This endpoint is consistent with the
12
- * [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat)
13
- * and may be used with the OpenAI JS or Python SDK.
14
- *
15
- * @deprecated
16
- */
17
- createCompletion(body: ChatCreateCompletionParams, options?: RequestOptions): APIPromise<ChatCreateCompletionResponse>;
18
4
  }
19
5
  export interface BucketIDs {
20
6
  /**
@@ -198,180 +184,7 @@ export declare namespace ChatCompletionRequest {
198
184
  type: 'retrieval';
199
185
  }
200
186
  }
201
- export type ChatCreateCompletionResponse = {
202
- [key: string]: unknown;
203
- };
204
- export interface ChatCreateCompletionParams {
205
- /**
206
- * A list of the previous chat messages for context.
207
- */
208
- messages: Array<ChatCreateCompletionParams.Message>;
209
- /**
210
- * If you are using an external inference provider like xAI or OpenAI, this field
211
- * allows you to pass along a reference to your API key. After creating an
212
- * [integration secret](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
213
- * for you API key, pass the secret's `identifier` in this field.
214
- */
215
- api_key_ref?: string;
216
- /**
217
- * This is used with `use_beam_search` to determine how many candidate beams to
218
- * explore.
219
- */
220
- best_of?: number;
221
- /**
222
- * This is used with `use_beam_search`. If `true`, generation stops as soon as
223
- * there are `best_of` complete candidates; if `false`, a heuristic is applied and
224
- * the generation stops when is it very unlikely to find better candidates.
225
- */
226
- early_stopping?: boolean;
227
- /**
228
- * Whether to enable the thinking/reasoning phase for models that support it (e.g.,
229
- * QwQ, Qwen3). When set to false, the model will skip the internal reasoning step
230
- * and respond directly, which can reduce latency. Defaults to true.
231
- */
232
- enable_thinking?: boolean;
233
- /**
234
- * Higher values will penalize the model from repeating the same output tokens.
235
- */
236
- frequency_penalty?: number;
237
- /**
238
- * If specified, the output will be exactly one of the choices.
239
- */
240
- guided_choice?: Array<string>;
241
- /**
242
- * Must be a valid JSON schema. If specified, the output will follow the JSON
243
- * schema.
244
- */
245
- guided_json?: {
246
- [key: string]: unknown;
247
- };
248
- /**
249
- * If specified, the output will follow the regex pattern.
250
- */
251
- guided_regex?: string;
252
- /**
253
- * This is used with `use_beam_search` to prefer shorter or longer completions.
254
- */
255
- length_penalty?: number;
256
- /**
257
- * Whether to return log probabilities of the output tokens or not. If true,
258
- * returns the log probabilities of each output token returned in the `content` of
259
- * `message`.
260
- */
261
- logprobs?: boolean;
262
- /**
263
- * Maximum number of completion tokens the model should generate.
264
- */
265
- max_tokens?: number;
266
- /**
267
- * This is an alternative to `top_p` that
268
- * [many prefer](https://github.com/huggingface/transformers/issues/27670). Must be
269
- * in [0, 1].
270
- */
271
- min_p?: number;
272
- /**
273
- * The language model to chat with.
274
- */
275
- model?: string;
276
- /**
277
- * This will return multiple choices for you instead of a single chat completion.
278
- */
279
- n?: number;
280
- /**
281
- * Higher values will penalize the model from repeating the same output tokens.
282
- */
283
- presence_penalty?: number;
284
- /**
285
- * Use this is you want to guarantee a JSON output without defining a schema. For
286
- * control over the schema, use `guided_json`.
287
- */
288
- response_format?: ChatCreateCompletionParams.ResponseFormat;
289
- /**
290
- * If specified, the system will make a best effort to sample deterministically,
291
- * such that repeated requests with the same `seed` and parameters should return
292
- * the same result.
293
- */
294
- seed?: number;
295
- /**
296
- * Up to 4 sequences where the API will stop generating further tokens. The
297
- * returned text will not contain the stop sequence.
298
- */
299
- stop?: string | Array<string>;
300
- /**
301
- * Whether or not to stream data-only server-sent events as they become available.
302
- */
303
- stream?: boolean;
304
- /**
305
- * Adjusts the "creativity" of the model. Lower values make the model more
306
- * deterministic and repetitive, while higher values make the model more random and
307
- * creative.
308
- */
309
- temperature?: number;
310
- tool_choice?: 'none' | 'auto' | 'required';
311
- /**
312
- * The `function` tool type follows the same schema as the
313
- * [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat).
314
- * The `retrieval` tool type is unique to Telnyx. You may pass a list of
315
- * [embedded storage buckets](https://developers.telnyx.com/api-reference/embeddings/embed-documents)
316
- * for retrieval-augmented generation.
317
- */
318
- tools?: Array<ChatCreateCompletionParams.Function | ChatCreateCompletionParams.Retrieval>;
319
- /**
320
- * This is used with `logprobs`. An integer between 0 and 20 specifying the number
321
- * of most likely tokens to return at each token position, each with an associated
322
- * log probability.
323
- */
324
- top_logprobs?: number;
325
- /**
326
- * An alternative or complement to `temperature`. This adjusts how many of the top
327
- * possibilities to consider.
328
- */
329
- top_p?: number;
330
- /**
331
- * Setting this to `true` will allow the model to
332
- * [explore more completion options](https://huggingface.co/blog/how-to-generate#beam-search).
333
- * This is not supported by OpenAI.
334
- */
335
- use_beam_search?: boolean;
336
- }
337
- export declare namespace ChatCreateCompletionParams {
338
- interface Message {
339
- content: string | Array<Message.TextAndImageArray>;
340
- role: 'system' | 'user' | 'assistant' | 'tool';
341
- }
342
- namespace Message {
343
- interface TextAndImageArray {
344
- type: 'text' | 'image_url';
345
- image_url?: string;
346
- text?: string;
347
- }
348
- }
349
- /**
350
- * Use this is you want to guarantee a JSON output without defining a schema. For
351
- * control over the schema, use `guided_json`.
352
- */
353
- interface ResponseFormat {
354
- type: 'text' | 'json_object';
355
- }
356
- interface Function {
357
- function: Function.Function;
358
- type: 'function';
359
- }
360
- namespace Function {
361
- interface Function {
362
- name: string;
363
- description?: string;
364
- parameters?: {
365
- [key: string]: unknown;
366
- };
367
- }
368
- }
369
- interface Retrieval {
370
- retrieval: ChatAPI.BucketIDs;
371
- type: 'retrieval';
372
- }
373
- }
374
187
  export declare namespace Chat {
375
- export { type BucketIDs as BucketIDs, type ChatCompletionRequest as ChatCompletionRequest, type ChatCreateCompletionResponse as ChatCreateCompletionResponse, type ChatCreateCompletionParams as ChatCreateCompletionParams, };
188
+ export { type BucketIDs as BucketIDs, type ChatCompletionRequest as ChatCompletionRequest };
376
189
  }
377
190
  //# sourceMappingURL=chat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/resources/ai/chat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,OAAO,kBAAe;AAClC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;OAOG;IACH,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D,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;KAChD;IAED,UAAiB,OAAO,CAAC;QACvB,UAAiB,iBAAiB;YAChC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;YAE3B,SAAS,CAAC,EAAE,MAAM,CAAC;YAEnB,IAAI,CAAC,EAAE,MAAM,CAAC;SACf;KACF;IAED;;;OAGG;IACH,UAAiB,cAAc;QAC7B,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC;KAC9B;IAED,UAAiB,QAAQ;QACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;QAE5B,IAAI,EAAE,UAAU,CAAC;KAClB;IAED,UAAiB,QAAQ,CAAC;QACxB,UAAiB,QAAQ;YACvB,IAAI,EAAE,MAAM,CAAC;YAEb,WAAW,CAAC,EAAE,MAAM,CAAC;YAErB,UAAU,CAAC,EAAE;gBAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;aAAE,CAAC;SACzC;KACF;IAED,UAAiB,SAAS;QACxB,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC;QAE7B,IAAI,EAAE,WAAW,CAAC;KACnB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,SAAS,IAAI,SAAS,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAC7F"}
@@ -3,21 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Chat = void 0;
5
5
  const resource_1 = require("../../core/resource.js");
6
- /**
7
- * Generate text with LLMs
8
- */
9
6
  class Chat extends resource_1.APIResource {
10
- /**
11
- * **Deprecated**: Use `POST /v2/ai/openai/chat/completions` instead. Chat with a
12
- * language model. This endpoint is consistent with the
13
- * [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat)
14
- * and may be used with the OpenAI JS or Python SDK.
15
- *
16
- * @deprecated
17
- */
18
- createCompletion(body, options) {
19
- return this._client.post('/ai/chat/completions', { body, ...options });
20
- }
21
7
  }
22
8
  exports.Chat = Chat;
23
9
  //# sourceMappingURL=chat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/ai/chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAKlD;;GAEG;AACH,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;OAOG;IACH,gBAAgB,CACd,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACF;AAfD,oBAeC"}
1
+ {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/ai/chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,MAAa,IAAK,SAAQ,sBAAW;CAAG;AAAxC,oBAAwC"}
@@ -1,19 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../../core/resource.mjs";
3
- /**
4
- * Generate text with LLMs
5
- */
6
3
  export class Chat extends APIResource {
7
- /**
8
- * **Deprecated**: Use `POST /v2/ai/openai/chat/completions` instead. Chat with a
9
- * language model. This endpoint is consistent with the
10
- * [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat)
11
- * and may be used with the OpenAI JS or Python SDK.
12
- *
13
- * @deprecated
14
- */
15
- createCompletion(body, options) {
16
- return this._client.post('/ai/chat/completions', { body, ...options });
17
- }
18
4
  }
19
5
  //# sourceMappingURL=chat.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../src/resources/ai/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAKlD;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;OAOG;IACH,gBAAgB,CACd,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACF"}
1
+ {"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../src/resources/ai/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,MAAM,OAAO,IAAK,SAAQ,WAAW;CAAG"}
@@ -0,0 +1,105 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import { APIPromise } from "../../../core/api-promise.mjs";
3
+ import { RequestOptions } from "../../../internal/request-options.mjs";
4
+ /**
5
+ * Manage historical AI assistant conversations
6
+ */
7
+ export declare class ConversationInsights extends APIResource {
8
+ /**
9
+ * Aggregate conversation insights by specified fields
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const response =
14
+ * await client.ai.conversations.conversationInsights.retrieveAggregates();
15
+ * ```
16
+ */
17
+ retrieveAggregates(query?: ConversationInsightRetrieveAggregatesParams | null | undefined, options?: RequestOptions): APIPromise<ConversationInsightRetrieveAggregatesResponse>;
18
+ }
19
+ /**
20
+ * Aggregated conversation insight counts grouped by the specified fields. Each
21
+ * item in `data` contains the grouped field values and a `record_count` indicating
22
+ * how many conversation insights match that combination.
23
+ */
24
+ export interface ConversationInsightRetrieveAggregatesResponse {
25
+ /**
26
+ * Aggregation result rows. Each row contains the grouped field values and a
27
+ * `record_count`.
28
+ */
29
+ data: Array<ConversationInsightRetrieveAggregatesResponse.Data>;
30
+ }
31
+ export declare namespace ConversationInsightRetrieveAggregatesResponse {
32
+ /**
33
+ * An aggregation row. Contains the grouped field values (keyed by the group_by
34
+ * field names) and a `record_count` integer. For example, when grouping by
35
+ * `score`, each row has a `score` value and a `record_count` of conversations with
36
+ * that score. When also splitting by `metadata.assistant_version_id`, each row
37
+ * includes both `score` and `metadata.assistant_version_id` plus their combined
38
+ * `record_count`.
39
+ */
40
+ interface Data {
41
+ /**
42
+ * Number of conversation insights that match this combination of grouped field
43
+ * values.
44
+ */
45
+ record_count: number;
46
+ [k: string]: unknown;
47
+ }
48
+ }
49
+ export interface ConversationInsightRetrieveAggregatesParams {
50
+ /**
51
+ * Filter by creation datetime to scope the aggregation window. Supports range
52
+ * operators (e.g., `created_at=gte.2025-01-01T00:00:00Z` for the start of the
53
+ * range, `created_at=lt.2025-01-02T00:00:00Z` for the end). To build per-day time
54
+ * series (as the portal does for the 'Insights Over Time' chart), issue one
55
+ * request per day bounded by `created_at=gte.<day_start>` and
56
+ * `created_at=lt.<next_day_start>`.
57
+ */
58
+ created_at?: string;
59
+ /**
60
+ * Fields to group by (can be comma-separated or multiple parameters). Prefix a
61
+ * field with 'metadata.' (e.g. 'metadata.assistant_id') to group by the
62
+ * conversation's metadata instead of the insight result.
63
+ *
64
+ * Common fields used for over-time charts:
65
+ *
66
+ * - `score` — Group by the insight's score value (e.g. for Agent Instruction
67
+ * Following, User Satisfaction).
68
+ * - `metadata.assistant_id` — Group by the assistant that handled the
69
+ * conversation.
70
+ * - `metadata.assistant_version_id` — Group by the assistant version, useful for
71
+ * comparing performance across versions in the portal's 'Insights Over Time'
72
+ * chart.
73
+ * - `metadata.telnyx_conversation_channel` — Group by conversation channel
74
+ * (phone_call, web_chat, etc.).
75
+ */
76
+ group_by?: Array<string>;
77
+ /**
78
+ * Optional insight ID to filter conversation insights. Only insights matching this
79
+ * ID will be included in the aggregation.
80
+ */
81
+ insight_id?: string;
82
+ metadata?: ConversationInsightRetrieveAggregatesParams.Metadata;
83
+ /**
84
+ * Fields to include in the result (can be comma-separated or multiple parameters).
85
+ * Supports the same 'metadata.<key>' prefix as group_by. Each returned row will
86
+ * contain the grouped field values plus a `record_count` indicating how many
87
+ * conversation insights match that combination.
88
+ */
89
+ show?: Array<string>;
90
+ }
91
+ export declare namespace ConversationInsightRetrieveAggregatesParams {
92
+ interface Metadata {
93
+ /**
94
+ * Filter by assistant ID (e.g., `metadata.assistant_id=eq.<assistant_id>`). When
95
+ * provided, only conversation insights for the specified assistant are aggregated.
96
+ * Used by the portal to scope the 'Insights Over Time' chart to a single
97
+ * assistant.
98
+ */
99
+ assistant_id?: string;
100
+ }
101
+ }
102
+ export declare namespace ConversationInsights {
103
+ export { type ConversationInsightRetrieveAggregatesResponse as ConversationInsightRetrieveAggregatesResponse, type ConversationInsightRetrieveAggregatesParams as ConversationInsightRetrieveAggregatesParams, };
104
+ }
105
+ //# sourceMappingURL=conversation-insights.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-insights.d.mts","sourceRoot":"","sources":["../../../src/resources/ai/conversations/conversation-insights.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAEnE;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACnD;;;;;;;;OAQG;IACH,kBAAkB,CAChB,KAAK,GAAE,2CAA2C,GAAG,IAAI,GAAG,SAAc,EAC1E,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6CAA6C,CAAC;CAG7D;AAED;;;;GAIG;AACH,MAAM,WAAW,6CAA6C;IAC5D;;;OAGG;IACH,IAAI,EAAE,KAAK,CAAC,6CAA6C,CAAC,IAAI,CAAC,CAAC;CACjE;AAED,yBAAiB,6CAA6C,CAAC;IAC7D;;;;;;;OAOG;IACH,UAAiB,IAAI;QACnB;;;WAGG;QACH,YAAY,EAAE,MAAM,CAAC;QAErB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KACtB;CACF;AAED,MAAM,WAAW,2CAA2C;IAC1D;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;;;;;;;OAgBG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