telnyx 6.64.0 → 6.65.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.
- package/CHANGELOG.md +8 -0
- package/client.d.mts +10 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -11
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +116 -114
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +116 -114
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/assistants/assistants.d.mts +332 -112
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +332 -112
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/assistants/canary-deploys.d.mts +241 -70
- package/resources/ai/assistants/canary-deploys.d.mts.map +1 -1
- package/resources/ai/assistants/canary-deploys.d.ts +241 -70
- package/resources/ai/assistants/canary-deploys.d.ts.map +1 -1
- package/resources/ai/assistants/index.d.mts +2 -2
- package/resources/ai/assistants/index.d.mts.map +1 -1
- package/resources/ai/assistants/index.d.ts +2 -2
- package/resources/ai/assistants/index.d.ts.map +1 -1
- package/resources/ai/assistants/index.js.map +1 -1
- package/resources/ai/assistants/index.mjs.map +1 -1
- package/resources/ai/assistants/versions.d.mts +220 -6
- package/resources/ai/assistants/versions.d.mts.map +1 -1
- package/resources/ai/assistants/versions.d.ts +220 -6
- package/resources/ai/assistants/versions.d.ts.map +1 -1
- package/resources/ai/index.d.mts +2 -2
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +2 -2
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/openai/openai.d.mts +113 -2
- package/resources/ai/openai/openai.d.mts.map +1 -1
- package/resources/ai/openai/openai.d.ts +113 -2
- package/resources/ai/openai/openai.d.ts.map +1 -1
- package/resources/ai/openai/openai.js.map +1 -1
- package/resources/ai/openai/openai.mjs.map +1 -1
- package/resources/calls/actions.d.mts +398 -41
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +398 -41
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/actions.js +46 -0
- package/resources/calls/actions.js.map +1 -1
- package/resources/calls/actions.mjs +46 -0
- package/resources/calls/actions.mjs.map +1 -1
- package/resources/calls/calls.d.mts +2 -2
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +2 -2
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/calls/index.d.mts +1 -1
- package/resources/calls/index.d.mts.map +1 -1
- package/resources/calls/index.d.ts +1 -1
- package/resources/calls/index.d.ts.map +1 -1
- package/resources/calls/index.js.map +1 -1
- package/resources/calls/index.mjs.map +1 -1
- package/resources/conferences/actions.d.mts +11 -1
- package/resources/conferences/actions.d.mts.map +1 -1
- package/resources/conferences/actions.d.ts +11 -1
- package/resources/conferences/actions.d.ts.map +1 -1
- package/resources/index.d.mts +5 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/networks/networks.d.mts +2 -25
- package/resources/networks/networks.d.mts.map +1 -1
- package/resources/networks/networks.d.ts +2 -25
- package/resources/networks/networks.d.ts.map +1 -1
- package/resources/networks/networks.js.map +1 -1
- package/resources/networks/networks.mjs.map +1 -1
- package/resources/public-internet-gateways.d.mts +50 -40
- package/resources/public-internet-gateways.d.mts.map +1 -1
- package/resources/public-internet-gateways.d.ts +50 -40
- package/resources/public-internet-gateways.d.ts.map +1 -1
- package/resources/public-internet-gateways.js +1 -1
- package/resources/public-internet-gateways.js.map +1 -1
- package/resources/public-internet-gateways.mjs +1 -1
- package/resources/public-internet-gateways.mjs.map +1 -1
- package/resources/shared.d.mts +0 -10
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +0 -10
- package/resources/shared.d.ts.map +1 -1
- package/resources/uac-connections/index.d.mts +1 -1
- package/resources/uac-connections/index.d.mts.map +1 -1
- package/resources/uac-connections/index.d.ts +1 -1
- package/resources/uac-connections/index.d.ts.map +1 -1
- package/resources/uac-connections/index.js.map +1 -1
- package/resources/uac-connections/index.mjs.map +1 -1
- package/resources/uac-connections/uac-connections.d.mts +1861 -211
- package/resources/uac-connections/uac-connections.d.mts.map +1 -1
- package/resources/uac-connections/uac-connections.d.ts +1861 -211
- package/resources/uac-connections/uac-connections.d.ts.map +1 -1
- package/resources/uac-connections/uac-connections.js +1 -1
- package/resources/uac-connections/uac-connections.js.map +1 -1
- package/resources/uac-connections/uac-connections.mjs +1 -1
- package/resources/uac-connections/uac-connections.mjs.map +1 -1
- package/resources/virtual-cross-connects.d.mts +504 -48
- package/resources/virtual-cross-connects.d.mts.map +1 -1
- package/resources/virtual-cross-connects.d.ts +504 -48
- package/resources/virtual-cross-connects.d.ts.map +1 -1
- package/resources/virtual-cross-connects.js +1 -1
- package/resources/virtual-cross-connects.js.map +1 -1
- package/resources/virtual-cross-connects.mjs +1 -1
- package/resources/virtual-cross-connects.mjs.map +1 -1
- package/resources/wireguard-interfaces.d.mts +127 -43
- package/resources/wireguard-interfaces.d.mts.map +1 -1
- package/resources/wireguard-interfaces.d.ts +127 -43
- package/resources/wireguard-interfaces.d.ts.map +1 -1
- package/resources/wireguard-interfaces.js +2 -5
- package/resources/wireguard-interfaces.js.map +1 -1
- package/resources/wireguard-interfaces.mjs +2 -5
- package/resources/wireguard-interfaces.mjs.map +1 -1
- package/src/client.ts +16 -27
- package/src/resources/ai/ai.ts +130 -139
- package/src/resources/ai/assistants/assistants.ts +362 -133
- package/src/resources/ai/assistants/canary-deploys.ts +266 -75
- package/src/resources/ai/assistants/index.ts +0 -10
- package/src/resources/ai/assistants/versions.ts +244 -6
- package/src/resources/ai/index.ts +0 -6
- package/src/resources/ai/openai/openai.ts +131 -2
- package/src/resources/calls/actions.ts +543 -76
- package/src/resources/calls/calls.ts +8 -4
- package/src/resources/calls/index.ts +4 -2
- package/src/resources/conferences/actions.ts +13 -1
- package/src/resources/index.ts +8 -13
- package/src/resources/networks/networks.ts +4 -31
- package/src/resources/public-internet-gateways.ts +55 -46
- package/src/resources/shared.ts +0 -12
- package/src/resources/uac-connections/index.ts +2 -6
- package/src/resources/uac-connections/uac-connections.ts +2377 -378
- package/src/resources/virtual-cross-connects.ts +595 -54
- package/src/resources/wireguard-interfaces.ts +158 -53
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":"OAEO,EACL,EAAE,EACF,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":"OAEO,EACL,EAAE,EACF,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,GACvB;OACM,EACL,UAAU,EACV,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,mCAAmC,EACxC,K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xB,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,GACxB;OACM,EAAE,UAAU,EAAE;OACd,EACL,YAAY,EACZ,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,GAC7B;OACM,EACL,UAAU,EACV,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,wDAAwD,GAC9D;OACM,EACL,QAAQ,EACR,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,GACtC;OACM,EACL,MAAM,EACN,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,GAChC;OACM,EACL,KAAK,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,sCAAsC,GAC5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8BAOc;AANZ,wFAAA,EAAE,OAAA;AAOJ,+CAyC4B;AAxC1B,mGAAA,UAAU,OAAA;AAyCZ,oCAA0F;AAAjF,8FAAA,KAAK,OAAA;AACd,kCAKgB;AAJd,4FAAA,IAAI,OAAA;AAKN,0CAWoB;AAVlB,oGAAA,QAAQ,OAAA;AAWV,kDAW+B;AAV7B,sGAAA,aAAa,OAAA;AAWf,+CAW4B;AAV1B,mGAAA,UAAU,OAAA;AAWZ,gDAAiD;AAAxC,mGAAA,UAAU,OAAA;AACnB,iDAI8B;AAH5B,qGAAA,YAAY,OAAA;AAId,gDAUuB;AATrB,yGAAA,UAAU,OAAA;AAUZ,6CAY0B;AAXxB,iGAAA,QAAQ,OAAA;AAYV,2CAKwB;AAJtB,+FAAA,MAAM,OAAA;AAKR,oCAWiB;AAVf,8FAAA,KAAK,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,EAAE,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,EAAE,GAMH;OACM,EACL,UAAU,GAwCX;OACM,EAAE,KAAK,EAA4D;OACnE,EACL,IAAI,GAIL;OACM,EACL,QAAQ,GAUT;OACM,EACL,aAAa,GAUd;OACM,EACL,UAAU,GAUX;OACM,EAAE,UAAU,EAAE;OACd,EACL,YAAY,GAGb;OACM,EACL,UAAU,GASX;OACM,EACL,QAAQ,GAWT;OACM,EACL,MAAM,GAIP;OACM,EACL,KAAK,GAUN"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
-
import * as AIAPI from "../ai.mjs";
|
|
3
2
|
import * as ChatAPI from "./chat.mjs";
|
|
4
3
|
import { Chat, ChatCreateCompletionParams, ChatCreateCompletionResponse } from "./chat.mjs";
|
|
5
4
|
import * as EmbeddingsAPI from "./embeddings.mjs";
|
|
@@ -85,9 +84,121 @@ export type OpenAICreateResponseResponse = {
|
|
|
85
84
|
[key: string]: unknown;
|
|
86
85
|
};
|
|
87
86
|
export interface OpenAIListModelsResponse {
|
|
88
|
-
data: Array<
|
|
87
|
+
data: Array<OpenAIListModelsResponse.Data>;
|
|
89
88
|
object?: string;
|
|
90
89
|
}
|
|
90
|
+
export declare namespace OpenAIListModelsResponse {
|
|
91
|
+
/**
|
|
92
|
+
* Metadata for a model available on Telnyx Inference. Returned by
|
|
93
|
+
* `GET /v2/ai/openai/models` (and the deprecated `GET /v2/ai/models`). Open-source
|
|
94
|
+
* models live under their Hugging Face organization (e.g. `moonshotai/Kimi-K2.6`,
|
|
95
|
+
* `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`); fine-tuned models are owned by
|
|
96
|
+
* the Telnyx organization that trained them.
|
|
97
|
+
*/
|
|
98
|
+
interface Data {
|
|
99
|
+
/**
|
|
100
|
+
* Model identifier. For open-source models, follows the
|
|
101
|
+
* `{organization}/{model_name}` convention from Hugging Face (e.g.
|
|
102
|
+
* `moonshotai/Kimi-K2.6`).
|
|
103
|
+
*/
|
|
104
|
+
id: string;
|
|
105
|
+
/**
|
|
106
|
+
* Maximum total tokens (prompt + completion) supported by the model in a single
|
|
107
|
+
* request.
|
|
108
|
+
*/
|
|
109
|
+
context_length: number;
|
|
110
|
+
/**
|
|
111
|
+
* Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
|
|
112
|
+
*/
|
|
113
|
+
created: string;
|
|
114
|
+
/**
|
|
115
|
+
* ISO language codes the model supports (e.g. `en`, `es`).
|
|
116
|
+
*/
|
|
117
|
+
languages: Array<string>;
|
|
118
|
+
/**
|
|
119
|
+
* License the model is distributed under, e.g. `Apache 2.0`, `MIT`,
|
|
120
|
+
* `Llama 3 Community License`.
|
|
121
|
+
*/
|
|
122
|
+
license: string;
|
|
123
|
+
/**
|
|
124
|
+
* Organization that originally published the model, matching the prefix of `id`
|
|
125
|
+
* for open-source models.
|
|
126
|
+
*/
|
|
127
|
+
organization: string;
|
|
128
|
+
/**
|
|
129
|
+
* Owner of the model. `Telnyx` for Telnyx-hosted open-source models, the upstream
|
|
130
|
+
* provider name for proxied models, or the Telnyx organization id for fine-tuned
|
|
131
|
+
* models.
|
|
132
|
+
*/
|
|
133
|
+
owned_by: string;
|
|
134
|
+
/**
|
|
135
|
+
* Total parameter count of the model.
|
|
136
|
+
*/
|
|
137
|
+
parameters: number;
|
|
138
|
+
/**
|
|
139
|
+
* Billing tier the model belongs to. Used together with `pricing` to determine
|
|
140
|
+
* cost per 1M tokens.
|
|
141
|
+
*/
|
|
142
|
+
tier: 'small' | 'medium' | 'large' | 'unlisted';
|
|
143
|
+
/**
|
|
144
|
+
* Base model the fine-tuned model was trained from. Only set for fine-tuned
|
|
145
|
+
* models.
|
|
146
|
+
*/
|
|
147
|
+
base_model?: string | null;
|
|
148
|
+
/**
|
|
149
|
+
* Short, human-readable summary of what the model is best suited for.
|
|
150
|
+
*/
|
|
151
|
+
description?: string | null;
|
|
152
|
+
/**
|
|
153
|
+
* Whether the model can be used as a base for a fine-tuning job via
|
|
154
|
+
* `POST /v2/ai/fine_tuning/jobs`.
|
|
155
|
+
*/
|
|
156
|
+
is_fine_tunable?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Whether the model accepts image inputs in chat completions (multimodal vision
|
|
159
|
+
* support).
|
|
160
|
+
*/
|
|
161
|
+
is_vision_supported?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Maximum number of completion (output) tokens the model will generate per
|
|
164
|
+
* request. `null` if unconstrained beyond `context_length`.
|
|
165
|
+
*/
|
|
166
|
+
max_completion_tokens?: number | null;
|
|
167
|
+
/**
|
|
168
|
+
* Object type. Always `model`.
|
|
169
|
+
*/
|
|
170
|
+
object?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Human-readable parameter count, e.g. `1.0T`, `753.9B`, `8B`.
|
|
173
|
+
*/
|
|
174
|
+
parameters_str?: string | null;
|
|
175
|
+
/**
|
|
176
|
+
* Mapping of token kind to price, as strings to preserve precision. Typical keys
|
|
177
|
+
* are `prompt`, `cached_prompt`, and `completion`. When pricing is available the
|
|
178
|
+
* block also includes `currency` (ISO 4217 code matching the account's configured
|
|
179
|
+
* billing currency) and `unit` (the denomination the prices are quoted in,
|
|
180
|
+
* currently always `1M_tokens` for token-priced models).
|
|
181
|
+
*/
|
|
182
|
+
pricing?: {
|
|
183
|
+
[key: string]: string;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI
|
|
187
|
+
* Assistant.
|
|
188
|
+
*/
|
|
189
|
+
recommended_for_assistants?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Public region names where the model is currently deployed (e.g. `us-central-1`,
|
|
192
|
+
* `eu-central-1`).
|
|
193
|
+
*/
|
|
194
|
+
regions?: Array<string>;
|
|
195
|
+
/**
|
|
196
|
+
* Primary task the model is intended for, e.g. `text-generation`,
|
|
197
|
+
* `audio-text-to-text`, `feature-extraction` (embeddings).
|
|
198
|
+
*/
|
|
199
|
+
task?: string;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
91
202
|
export interface OpenAICreateResponseParams {
|
|
92
203
|
/**
|
|
93
204
|
* Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.d.mts","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"openai.d.mts","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,IAAI,EAAE,0BAA0B,EAAE,4BAA4B,EAAE;OAClE,KAAK,aAAa;OAClB,EACL,+BAA+B,EAC/B,iCAAiC,EACjC,oCAAoC,EACpC,UAAU,EACX;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,U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ACL,IAAI,IAAI,IAAI,EACZ,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
|
-
import * as AIAPI from "../ai.js";
|
|
3
2
|
import * as ChatAPI from "./chat.js";
|
|
4
3
|
import { Chat, ChatCreateCompletionParams, ChatCreateCompletionResponse } from "./chat.js";
|
|
5
4
|
import * as EmbeddingsAPI from "./embeddings.js";
|
|
@@ -85,9 +84,121 @@ export type OpenAICreateResponseResponse = {
|
|
|
85
84
|
[key: string]: unknown;
|
|
86
85
|
};
|
|
87
86
|
export interface OpenAIListModelsResponse {
|
|
88
|
-
data: Array<
|
|
87
|
+
data: Array<OpenAIListModelsResponse.Data>;
|
|
89
88
|
object?: string;
|
|
90
89
|
}
|
|
90
|
+
export declare namespace OpenAIListModelsResponse {
|
|
91
|
+
/**
|
|
92
|
+
* Metadata for a model available on Telnyx Inference. Returned by
|
|
93
|
+
* `GET /v2/ai/openai/models` (and the deprecated `GET /v2/ai/models`). Open-source
|
|
94
|
+
* models live under their Hugging Face organization (e.g. `moonshotai/Kimi-K2.6`,
|
|
95
|
+
* `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`); fine-tuned models are owned by
|
|
96
|
+
* the Telnyx organization that trained them.
|
|
97
|
+
*/
|
|
98
|
+
interface Data {
|
|
99
|
+
/**
|
|
100
|
+
* Model identifier. For open-source models, follows the
|
|
101
|
+
* `{organization}/{model_name}` convention from Hugging Face (e.g.
|
|
102
|
+
* `moonshotai/Kimi-K2.6`).
|
|
103
|
+
*/
|
|
104
|
+
id: string;
|
|
105
|
+
/**
|
|
106
|
+
* Maximum total tokens (prompt + completion) supported by the model in a single
|
|
107
|
+
* request.
|
|
108
|
+
*/
|
|
109
|
+
context_length: number;
|
|
110
|
+
/**
|
|
111
|
+
* Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
|
|
112
|
+
*/
|
|
113
|
+
created: string;
|
|
114
|
+
/**
|
|
115
|
+
* ISO language codes the model supports (e.g. `en`, `es`).
|
|
116
|
+
*/
|
|
117
|
+
languages: Array<string>;
|
|
118
|
+
/**
|
|
119
|
+
* License the model is distributed under, e.g. `Apache 2.0`, `MIT`,
|
|
120
|
+
* `Llama 3 Community License`.
|
|
121
|
+
*/
|
|
122
|
+
license: string;
|
|
123
|
+
/**
|
|
124
|
+
* Organization that originally published the model, matching the prefix of `id`
|
|
125
|
+
* for open-source models.
|
|
126
|
+
*/
|
|
127
|
+
organization: string;
|
|
128
|
+
/**
|
|
129
|
+
* Owner of the model. `Telnyx` for Telnyx-hosted open-source models, the upstream
|
|
130
|
+
* provider name for proxied models, or the Telnyx organization id for fine-tuned
|
|
131
|
+
* models.
|
|
132
|
+
*/
|
|
133
|
+
owned_by: string;
|
|
134
|
+
/**
|
|
135
|
+
* Total parameter count of the model.
|
|
136
|
+
*/
|
|
137
|
+
parameters: number;
|
|
138
|
+
/**
|
|
139
|
+
* Billing tier the model belongs to. Used together with `pricing` to determine
|
|
140
|
+
* cost per 1M tokens.
|
|
141
|
+
*/
|
|
142
|
+
tier: 'small' | 'medium' | 'large' | 'unlisted';
|
|
143
|
+
/**
|
|
144
|
+
* Base model the fine-tuned model was trained from. Only set for fine-tuned
|
|
145
|
+
* models.
|
|
146
|
+
*/
|
|
147
|
+
base_model?: string | null;
|
|
148
|
+
/**
|
|
149
|
+
* Short, human-readable summary of what the model is best suited for.
|
|
150
|
+
*/
|
|
151
|
+
description?: string | null;
|
|
152
|
+
/**
|
|
153
|
+
* Whether the model can be used as a base for a fine-tuning job via
|
|
154
|
+
* `POST /v2/ai/fine_tuning/jobs`.
|
|
155
|
+
*/
|
|
156
|
+
is_fine_tunable?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Whether the model accepts image inputs in chat completions (multimodal vision
|
|
159
|
+
* support).
|
|
160
|
+
*/
|
|
161
|
+
is_vision_supported?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Maximum number of completion (output) tokens the model will generate per
|
|
164
|
+
* request. `null` if unconstrained beyond `context_length`.
|
|
165
|
+
*/
|
|
166
|
+
max_completion_tokens?: number | null;
|
|
167
|
+
/**
|
|
168
|
+
* Object type. Always `model`.
|
|
169
|
+
*/
|
|
170
|
+
object?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Human-readable parameter count, e.g. `1.0T`, `753.9B`, `8B`.
|
|
173
|
+
*/
|
|
174
|
+
parameters_str?: string | null;
|
|
175
|
+
/**
|
|
176
|
+
* Mapping of token kind to price, as strings to preserve precision. Typical keys
|
|
177
|
+
* are `prompt`, `cached_prompt`, and `completion`. When pricing is available the
|
|
178
|
+
* block also includes `currency` (ISO 4217 code matching the account's configured
|
|
179
|
+
* billing currency) and `unit` (the denomination the prices are quoted in,
|
|
180
|
+
* currently always `1M_tokens` for token-priced models).
|
|
181
|
+
*/
|
|
182
|
+
pricing?: {
|
|
183
|
+
[key: string]: string;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI
|
|
187
|
+
* Assistant.
|
|
188
|
+
*/
|
|
189
|
+
recommended_for_assistants?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Public region names where the model is currently deployed (e.g. `us-central-1`,
|
|
192
|
+
* `eu-central-1`).
|
|
193
|
+
*/
|
|
194
|
+
regions?: Array<string>;
|
|
195
|
+
/**
|
|
196
|
+
* Primary task the model is intended for, e.g. `text-generation`,
|
|
197
|
+
* `audio-text-to-text`, `feature-extraction` (embeddings).
|
|
198
|
+
*/
|
|
199
|
+
task?: string;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
91
202
|
export interface OpenAICreateResponseParams {
|
|
92
203
|
/**
|
|
93
204
|
* Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,IAAI,EAAE,0BAA0B,EAAE,4BAA4B,EAAE;OAClE,KAAK,aAAa;OAClB,EACL,+BAA+B,EAC/B,iCAAiC,EACjC,oCAAoC,EACpC,UAAU,EACX;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAClF,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;IAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,cAAc,CACZ,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;CAG3E;AAED,MAAM,MAAM,4BAA4B,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAEtE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAE3C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;;;;;OAMG;IACH,UAAiB,IAAI;QACnB;;;;WAIG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;;WAGG;QACH,cAAc,EAAE,MAAM,CAAC;QAEvB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;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C;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAKD,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;IAEF,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;IAEF,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.js","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;
|
|
1
|
+
{"version":3,"file":"openai.js","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,2DAAkC;AAClC,oCAAwF;AACxF,uEAA8C;AAC9C,gDAKsB;AAItB,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClF,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiFtD,CAAC;IA/EC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,cAAc,CACZ,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,UAAU,CAAC,OAAwB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF;AAnFD,wBAmFC;AAgLD,MAAM,CAAC,UAAU,GAAG,uBAAU,CAAC;AAC/B,MAAM,CAAC,IAAI,GAAG,WAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.mjs","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"openai.mjs","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,IAAI,EAA4D;OAClE,KAAK,aAAa;OAClB,EAIL,UAAU,GACX;AAID,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClF,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiFtD,CAAC;IA/EC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,cAAc,CACZ,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,UAAU,CAAC,OAAwB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF;AAgLD,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;AAC/B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC"}
|