@ai-sdk/gladia 3.0.0-beta.5 → 3.0.0-beta.51
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 +388 -4
- package/README.md +3 -1
- package/dist/index.d.ts +64 -54
- package/dist/index.js +152 -147
- package/dist/index.js.map +1 -1
- package/docs/120-gladia.mdx +1 -11
- package/package.json +14 -14
- package/src/gladia-config.ts +2 -2
- package/src/gladia-provider.ts +3 -3
- package/src/gladia-transcription-model-options.ts +309 -0
- package/src/gladia-transcription-model.ts +33 -317
- package/src/index.ts +1 -1
- package/dist/index.d.mts +0 -158
- package/dist/index.mjs +0 -604
- package/dist/index.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,389 @@
|
|
|
1
1
|
# @ai-sdk/gladia
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.51
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0416e3e]
|
|
8
|
+
- @ai-sdk/provider@4.0.0-beta.20
|
|
9
|
+
- @ai-sdk/provider-utils@5.0.0-beta.50
|
|
10
|
+
|
|
11
|
+
## 3.0.0-beta.50
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- b8396f0: trigger initial beta release
|
|
16
|
+
- Updated dependencies [b8396f0]
|
|
17
|
+
- @ai-sdk/provider-utils@5.0.0-beta.49
|
|
18
|
+
- @ai-sdk/provider@4.0.0-beta.19
|
|
19
|
+
|
|
20
|
+
## 3.0.0-canary.49
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- aeda373: fix: only send provider credentials to same-origin response-supplied URLs
|
|
25
|
+
|
|
26
|
+
Several provider clients followed a URL taken from the provider's API response (a polling/status URL or a final media URL such as `polling_url`, `urls.get`, `result_url`, `result.sample`, or `video.uri`) and reused the authenticated headers — or appended `?key=<API_KEY>` — on that request. Because the host of the response-supplied URL was never validated, the long-lived API key was sent to whatever host the response named (a CDN in the benign case, or an attacker-chosen host if the provider response was tampered with), allowing credential exfiltration.
|
|
27
|
+
|
|
28
|
+
A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and the affected fetches in `@ai-sdk/black-forest-labs`, `@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`, `@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the followed URL is same-origin with the provider's configured API origin. Requests to a foreign origin are made without the credential.
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [aeda373]
|
|
31
|
+
- Updated dependencies [375fdd7]
|
|
32
|
+
- Updated dependencies [b4507d5]
|
|
33
|
+
- @ai-sdk/provider-utils@5.0.0-canary.48
|
|
34
|
+
|
|
35
|
+
## 3.0.0-canary.48
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [bae5e2b]
|
|
40
|
+
- @ai-sdk/provider-utils@5.0.0-canary.47
|
|
41
|
+
|
|
42
|
+
## 3.0.0-canary.47
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [ce769dd]
|
|
47
|
+
- @ai-sdk/provider@4.0.0-canary.18
|
|
48
|
+
- @ai-sdk/provider-utils@5.0.0-canary.46
|
|
49
|
+
|
|
50
|
+
## 3.0.0-canary.46
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- Updated dependencies [ee798eb]
|
|
55
|
+
- Updated dependencies [daf6637]
|
|
56
|
+
- @ai-sdk/provider-utils@5.0.0-canary.45
|
|
57
|
+
|
|
58
|
+
## 3.0.0-canary.45
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- Updated dependencies [6c93e36]
|
|
63
|
+
- Updated dependencies [f617ac2]
|
|
64
|
+
- @ai-sdk/provider-utils@5.0.0-canary.44
|
|
65
|
+
|
|
66
|
+
## 3.0.0-canary.44
|
|
67
|
+
|
|
68
|
+
### Patch Changes
|
|
69
|
+
|
|
70
|
+
- 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
|
|
71
|
+
- Updated dependencies [7fc6bd6]
|
|
72
|
+
- @ai-sdk/provider-utils@5.0.0-canary.43
|
|
73
|
+
- @ai-sdk/provider@4.0.0-canary.17
|
|
74
|
+
|
|
75
|
+
## 3.0.0-canary.43
|
|
76
|
+
|
|
77
|
+
### Patch Changes
|
|
78
|
+
|
|
79
|
+
- Updated dependencies [a6617c5]
|
|
80
|
+
- @ai-sdk/provider-utils@5.0.0-canary.42
|
|
81
|
+
|
|
82
|
+
## 3.0.0-canary.42
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [28dfa06]
|
|
87
|
+
- Updated dependencies [e93fa91]
|
|
88
|
+
- @ai-sdk/provider-utils@5.0.0-canary.41
|
|
89
|
+
|
|
90
|
+
## 3.0.0-canary.41
|
|
91
|
+
|
|
92
|
+
### Patch Changes
|
|
93
|
+
|
|
94
|
+
- Updated dependencies [a7de9c9]
|
|
95
|
+
- @ai-sdk/provider-utils@5.0.0-canary.40
|
|
96
|
+
|
|
97
|
+
## 3.0.0-canary.40
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- Updated dependencies [105f95b]
|
|
102
|
+
- @ai-sdk/provider-utils@5.0.0-canary.39
|
|
103
|
+
|
|
104
|
+
## 3.0.0-canary.39
|
|
105
|
+
|
|
106
|
+
### Patch Changes
|
|
107
|
+
|
|
108
|
+
- Updated dependencies [ca446f8]
|
|
109
|
+
- @ai-sdk/provider-utils@5.0.0-canary.38
|
|
110
|
+
|
|
111
|
+
## 3.0.0-canary.38
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- Updated dependencies [d848405]
|
|
116
|
+
- @ai-sdk/provider-utils@5.0.0-canary.37
|
|
117
|
+
|
|
118
|
+
## 3.0.0-canary.37
|
|
119
|
+
|
|
120
|
+
### Patch Changes
|
|
121
|
+
|
|
122
|
+
- Updated dependencies [ca39020]
|
|
123
|
+
- @ai-sdk/provider-utils@5.0.0-canary.36
|
|
124
|
+
|
|
125
|
+
## 3.0.0-canary.36
|
|
126
|
+
|
|
127
|
+
### Patch Changes
|
|
128
|
+
|
|
129
|
+
- Updated dependencies [f634bac]
|
|
130
|
+
- @ai-sdk/provider-utils@5.0.0-canary.35
|
|
131
|
+
|
|
132
|
+
## 3.0.0-canary.35
|
|
133
|
+
|
|
134
|
+
### Patch Changes
|
|
135
|
+
|
|
136
|
+
- Updated dependencies [69254e0]
|
|
137
|
+
- Updated dependencies [3015fc3]
|
|
138
|
+
- @ai-sdk/provider-utils@5.0.0-canary.34
|
|
139
|
+
|
|
140
|
+
## 3.0.0-canary.34
|
|
141
|
+
|
|
142
|
+
### Patch Changes
|
|
143
|
+
|
|
144
|
+
- Updated dependencies [2427d88]
|
|
145
|
+
- @ai-sdk/provider-utils@5.0.0-canary.33
|
|
146
|
+
|
|
147
|
+
## 3.0.0-canary.33
|
|
148
|
+
|
|
149
|
+
### Patch Changes
|
|
150
|
+
|
|
151
|
+
- Updated dependencies [5463d0d]
|
|
152
|
+
- @ai-sdk/provider-utils@5.0.0-canary.32
|
|
153
|
+
- @ai-sdk/provider@4.0.0-canary.16
|
|
154
|
+
|
|
155
|
+
## 3.0.0-canary.32
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- 0c4c275: trigger initial canary release
|
|
160
|
+
- Updated dependencies [0c4c275]
|
|
161
|
+
- @ai-sdk/provider-utils@5.0.0-canary.31
|
|
162
|
+
- @ai-sdk/provider@4.0.0-canary.15
|
|
163
|
+
|
|
164
|
+
## 3.0.0-beta.31
|
|
165
|
+
|
|
166
|
+
### Major Changes
|
|
167
|
+
|
|
168
|
+
- 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
|
|
169
|
+
|
|
170
|
+
For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
|
|
171
|
+
|
|
172
|
+
### Patch Changes
|
|
173
|
+
|
|
174
|
+
- Updated dependencies [08d2129]
|
|
175
|
+
- @ai-sdk/provider-utils@5.0.0-beta.30
|
|
176
|
+
|
|
177
|
+
## 3.0.0-beta.30
|
|
178
|
+
|
|
179
|
+
### Patch Changes
|
|
180
|
+
|
|
181
|
+
- 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
|
|
182
|
+
- Updated dependencies [9bd6512]
|
|
183
|
+
- Updated dependencies [258c093]
|
|
184
|
+
- Updated dependencies [b6783da]
|
|
185
|
+
- @ai-sdk/provider-utils@5.0.0-beta.29
|
|
186
|
+
- @ai-sdk/provider@4.0.0-beta.14
|
|
187
|
+
|
|
188
|
+
## 3.0.0-beta.29
|
|
189
|
+
|
|
190
|
+
### Patch Changes
|
|
191
|
+
|
|
192
|
+
- 9f0e36c: trigger release for all packages after provenance setup
|
|
193
|
+
- Updated dependencies [9f0e36c]
|
|
194
|
+
- @ai-sdk/provider@4.0.0-beta.13
|
|
195
|
+
- @ai-sdk/provider-utils@5.0.0-beta.28
|
|
196
|
+
|
|
197
|
+
## 3.0.0-beta.28
|
|
198
|
+
|
|
199
|
+
### Patch Changes
|
|
200
|
+
|
|
201
|
+
- Updated dependencies [785fe16]
|
|
202
|
+
- Updated dependencies [67df0a0]
|
|
203
|
+
- Updated dependencies [befb78c]
|
|
204
|
+
- Updated dependencies [0458559]
|
|
205
|
+
- Updated dependencies [5852c0a]
|
|
206
|
+
- Updated dependencies [fc92055]
|
|
207
|
+
- @ai-sdk/provider-utils@5.0.0-beta.27
|
|
208
|
+
|
|
209
|
+
## 3.0.0-beta.27
|
|
210
|
+
|
|
211
|
+
### Patch Changes
|
|
212
|
+
|
|
213
|
+
- Updated dependencies [2e98477]
|
|
214
|
+
- @ai-sdk/provider-utils@5.0.0-beta.26
|
|
215
|
+
|
|
216
|
+
## 3.0.0-beta.26
|
|
217
|
+
|
|
218
|
+
### Patch Changes
|
|
219
|
+
|
|
220
|
+
- Updated dependencies [eea8d98]
|
|
221
|
+
- @ai-sdk/provider-utils@5.0.0-beta.25
|
|
222
|
+
|
|
223
|
+
## 3.0.0-beta.25
|
|
224
|
+
|
|
225
|
+
### Patch Changes
|
|
226
|
+
|
|
227
|
+
- Updated dependencies [f807e45]
|
|
228
|
+
- @ai-sdk/provider-utils@5.0.0-beta.24
|
|
229
|
+
|
|
230
|
+
## 3.0.0-beta.24
|
|
231
|
+
|
|
232
|
+
### Patch Changes
|
|
233
|
+
|
|
234
|
+
- Updated dependencies [350ea38]
|
|
235
|
+
- @ai-sdk/provider-utils@5.0.0-beta.23
|
|
236
|
+
|
|
237
|
+
## 3.0.0-beta.23
|
|
238
|
+
|
|
239
|
+
### Patch Changes
|
|
240
|
+
|
|
241
|
+
- Updated dependencies [083947b]
|
|
242
|
+
- @ai-sdk/provider-utils@5.0.0-beta.22
|
|
243
|
+
|
|
244
|
+
## 3.0.0-beta.22
|
|
245
|
+
|
|
246
|
+
### Patch Changes
|
|
247
|
+
|
|
248
|
+
- Updated dependencies [add1126]
|
|
249
|
+
- @ai-sdk/provider-utils@5.0.0-beta.21
|
|
250
|
+
|
|
251
|
+
## 3.0.0-beta.21
|
|
252
|
+
|
|
253
|
+
### Patch Changes
|
|
254
|
+
|
|
255
|
+
- b3976a2: Add workflow serialization support to all provider models.
|
|
256
|
+
|
|
257
|
+
**`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
|
|
258
|
+
|
|
259
|
+
**All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
|
|
260
|
+
|
|
261
|
+
All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
|
|
262
|
+
|
|
263
|
+
- Updated dependencies [b3976a2]
|
|
264
|
+
- Updated dependencies [ff5eba1]
|
|
265
|
+
- @ai-sdk/provider-utils@5.0.0-beta.20
|
|
266
|
+
- @ai-sdk/provider@4.0.0-beta.12
|
|
267
|
+
|
|
268
|
+
## 3.0.0-beta.20
|
|
269
|
+
|
|
270
|
+
### Major Changes
|
|
271
|
+
|
|
272
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
273
|
+
|
|
274
|
+
### Patch Changes
|
|
275
|
+
|
|
276
|
+
- Updated dependencies [ef992f8]
|
|
277
|
+
- @ai-sdk/provider@4.0.0-beta.11
|
|
278
|
+
- @ai-sdk/provider-utils@5.0.0-beta.19
|
|
279
|
+
|
|
280
|
+
## 3.0.0-beta.19
|
|
281
|
+
|
|
282
|
+
### Patch Changes
|
|
283
|
+
|
|
284
|
+
- Updated dependencies [90e2d8a]
|
|
285
|
+
- @ai-sdk/provider-utils@5.0.0-beta.18
|
|
286
|
+
|
|
287
|
+
## 3.0.0-beta.18
|
|
288
|
+
|
|
289
|
+
### Patch Changes
|
|
290
|
+
|
|
291
|
+
- Updated dependencies [3ae1786]
|
|
292
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
293
|
+
|
|
294
|
+
## 3.0.0-beta.17
|
|
295
|
+
|
|
296
|
+
### Patch Changes
|
|
297
|
+
|
|
298
|
+
- Updated dependencies [176466a]
|
|
299
|
+
- @ai-sdk/provider@4.0.0-beta.10
|
|
300
|
+
- @ai-sdk/provider-utils@5.0.0-beta.16
|
|
301
|
+
|
|
302
|
+
## 3.0.0-beta.16
|
|
303
|
+
|
|
304
|
+
### Patch Changes
|
|
305
|
+
|
|
306
|
+
- Updated dependencies [e311194]
|
|
307
|
+
- @ai-sdk/provider@4.0.0-beta.9
|
|
308
|
+
- @ai-sdk/provider-utils@5.0.0-beta.15
|
|
309
|
+
|
|
310
|
+
## 3.0.0-beta.15
|
|
311
|
+
|
|
312
|
+
### Patch Changes
|
|
313
|
+
|
|
314
|
+
- Updated dependencies [34bd95d]
|
|
315
|
+
- Updated dependencies [008271d]
|
|
316
|
+
- @ai-sdk/provider@4.0.0-beta.8
|
|
317
|
+
- @ai-sdk/provider-utils@5.0.0-beta.14
|
|
318
|
+
|
|
319
|
+
## 3.0.0-beta.14
|
|
320
|
+
|
|
321
|
+
### Patch Changes
|
|
322
|
+
|
|
323
|
+
- Updated dependencies [b0c2869]
|
|
324
|
+
- Updated dependencies [7e26e81]
|
|
325
|
+
- @ai-sdk/provider-utils@5.0.0-beta.13
|
|
326
|
+
|
|
327
|
+
## 3.0.0-beta.13
|
|
328
|
+
|
|
329
|
+
### Patch Changes
|
|
330
|
+
|
|
331
|
+
- Updated dependencies [46d1149]
|
|
332
|
+
- @ai-sdk/provider-utils@5.0.0-beta.12
|
|
333
|
+
|
|
334
|
+
## 3.0.0-beta.12
|
|
335
|
+
|
|
336
|
+
### Patch Changes
|
|
337
|
+
|
|
338
|
+
- Updated dependencies [6fd51c0]
|
|
339
|
+
- @ai-sdk/provider-utils@5.0.0-beta.11
|
|
340
|
+
- @ai-sdk/provider@4.0.0-beta.7
|
|
341
|
+
|
|
342
|
+
## 3.0.0-beta.11
|
|
343
|
+
|
|
344
|
+
### Patch Changes
|
|
345
|
+
|
|
346
|
+
- Updated dependencies [c29a26f]
|
|
347
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
348
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
349
|
+
|
|
350
|
+
## 3.0.0-beta.10
|
|
351
|
+
|
|
352
|
+
### Patch Changes
|
|
353
|
+
|
|
354
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
355
|
+
|
|
356
|
+
## 3.0.0-beta.9
|
|
357
|
+
|
|
358
|
+
### Patch Changes
|
|
359
|
+
|
|
360
|
+
- Updated dependencies [2e17091]
|
|
361
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
362
|
+
|
|
363
|
+
## 3.0.0-beta.8
|
|
364
|
+
|
|
365
|
+
### Patch Changes
|
|
366
|
+
|
|
367
|
+
- Updated dependencies [986c6fd]
|
|
368
|
+
- Updated dependencies [493295c]
|
|
369
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
370
|
+
|
|
371
|
+
## 3.0.0-beta.7
|
|
372
|
+
|
|
373
|
+
### Patch Changes
|
|
374
|
+
|
|
375
|
+
- Updated dependencies [1f509d4]
|
|
376
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
377
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
378
|
+
|
|
379
|
+
## 3.0.0-beta.6
|
|
380
|
+
|
|
381
|
+
### Patch Changes
|
|
382
|
+
|
|
383
|
+
- Updated dependencies [3887c70]
|
|
384
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
385
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
386
|
+
|
|
3
387
|
## 3.0.0-beta.5
|
|
4
388
|
|
|
5
389
|
### Patch Changes
|
|
@@ -241,13 +625,13 @@
|
|
|
241
625
|
Before
|
|
242
626
|
|
|
243
627
|
```ts
|
|
244
|
-
model.textEmbeddingModel(
|
|
628
|
+
model.textEmbeddingModel("my-model-id");
|
|
245
629
|
```
|
|
246
630
|
|
|
247
631
|
After
|
|
248
632
|
|
|
249
633
|
```ts
|
|
250
|
-
model.embeddingModel(
|
|
634
|
+
model.embeddingModel("my-model-id");
|
|
251
635
|
```
|
|
252
636
|
|
|
253
637
|
- 95f65c2: chore: use import \* from zod/v4
|
|
@@ -447,13 +831,13 @@
|
|
|
447
831
|
Before
|
|
448
832
|
|
|
449
833
|
```ts
|
|
450
|
-
model.textEmbeddingModel(
|
|
834
|
+
model.textEmbeddingModel("my-model-id");
|
|
451
835
|
```
|
|
452
836
|
|
|
453
837
|
After
|
|
454
838
|
|
|
455
839
|
```ts
|
|
456
|
-
model.embeddingModel(
|
|
840
|
+
model.embeddingModel("my-model-id");
|
|
457
841
|
```
|
|
458
842
|
|
|
459
843
|
- Updated dependencies [8d9e8ad]
|
package/README.md
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
The **[Gladia provider](https://ai-sdk.dev/providers/ai-sdk-providers/assemblyai)** for the [AI SDK](https://ai-sdk.dev/docs)
|
|
4
4
|
contains transcription model support for the Gladia transcription API.
|
|
5
5
|
|
|
6
|
+
> **Deploying to Vercel?** With Vercel's AI Gateway you can access Gladia (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).
|
|
7
|
+
|
|
6
8
|
## Setup
|
|
7
9
|
|
|
8
10
|
The Gladia provider is available in the `@ai-sdk/gladia` module. You can install it with
|
|
@@ -31,7 +33,7 @@ import { gladia } from '@ai-sdk/gladia';
|
|
|
31
33
|
|
|
32
34
|
```ts
|
|
33
35
|
import { gladia } from '@ai-sdk/gladia';
|
|
34
|
-
import {
|
|
36
|
+
import { transcribe } from 'ai';
|
|
35
37
|
|
|
36
38
|
const { text } = await transcribe({
|
|
37
39
|
model: gladia.transcription(),
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as _ai_sdk_provider from '@ai-sdk/provider';
|
|
1
2
|
import { TranscriptionModelV4, ProviderV4 } from '@ai-sdk/provider';
|
|
2
|
-
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
+
import { FetchFunction, WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@ai-sdk/provider-utils';
|
|
3
4
|
import { z } from 'zod/v4';
|
|
4
5
|
|
|
5
6
|
type GladiaConfig = {
|
|
@@ -8,11 +9,71 @@ type GladiaConfig = {
|
|
|
8
9
|
modelId: string;
|
|
9
10
|
path: string;
|
|
10
11
|
}) => string;
|
|
11
|
-
headers
|
|
12
|
+
headers?: () => Record<string, string | undefined>;
|
|
12
13
|
fetch?: FetchFunction;
|
|
13
14
|
generateId?: () => string;
|
|
14
15
|
};
|
|
15
16
|
|
|
17
|
+
interface GladiaTranscriptionModelConfig extends GladiaConfig {
|
|
18
|
+
_internal?: {
|
|
19
|
+
currentDate?: () => Date;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
declare class GladiaTranscriptionModel implements TranscriptionModelV4 {
|
|
23
|
+
readonly modelId: string;
|
|
24
|
+
private readonly config;
|
|
25
|
+
readonly specificationVersion = "v4";
|
|
26
|
+
get provider(): string;
|
|
27
|
+
static [WORKFLOW_SERIALIZE](model: GladiaTranscriptionModel): {
|
|
28
|
+
modelId: string;
|
|
29
|
+
config: _ai_sdk_provider.JSONObject;
|
|
30
|
+
};
|
|
31
|
+
static [WORKFLOW_DESERIALIZE](options: {
|
|
32
|
+
modelId: 'default';
|
|
33
|
+
config: GladiaTranscriptionModelConfig;
|
|
34
|
+
}): GladiaTranscriptionModel;
|
|
35
|
+
constructor(modelId: string, config: GladiaTranscriptionModelConfig);
|
|
36
|
+
private getArgs;
|
|
37
|
+
doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface GladiaProvider extends ProviderV4 {
|
|
41
|
+
(): {
|
|
42
|
+
transcription: GladiaTranscriptionModel;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Creates a model for transcription.
|
|
46
|
+
*/
|
|
47
|
+
transcription(): TranscriptionModelV4;
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Use `embeddingModel` instead.
|
|
50
|
+
*/
|
|
51
|
+
textEmbeddingModel(modelId: string): never;
|
|
52
|
+
}
|
|
53
|
+
interface GladiaProviderSettings {
|
|
54
|
+
/**
|
|
55
|
+
* API key for authenticating requests.
|
|
56
|
+
*/
|
|
57
|
+
apiKey?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Custom headers to include in the requests.
|
|
60
|
+
*/
|
|
61
|
+
headers?: Record<string, string>;
|
|
62
|
+
/**
|
|
63
|
+
* Custom fetch implementation. You can use it as a middleware to intercept requests,
|
|
64
|
+
* or to provide a custom fetch implementation for e.g. testing.
|
|
65
|
+
*/
|
|
66
|
+
fetch?: FetchFunction;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Create a Gladia provider instance.
|
|
70
|
+
*/
|
|
71
|
+
declare function createGladia(options?: GladiaProviderSettings): GladiaProvider;
|
|
72
|
+
/**
|
|
73
|
+
* Default Gladia provider instance.
|
|
74
|
+
*/
|
|
75
|
+
declare const gladia: GladiaProvider;
|
|
76
|
+
|
|
16
77
|
declare const gladiaTranscriptionModelOptionsSchema: z.ZodObject<{
|
|
17
78
|
contextPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
79
|
customVocabulary: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodAny>]>>>;
|
|
@@ -65,8 +126,8 @@ declare const gladiaTranscriptionModelOptionsSchema: z.ZodObject<{
|
|
|
65
126
|
translationConfig: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
66
127
|
targetLanguages: z.ZodArray<z.ZodString>;
|
|
67
128
|
model: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
68
|
-
base: "base";
|
|
69
129
|
enhanced: "enhanced";
|
|
130
|
+
base: "base";
|
|
70
131
|
}>>>;
|
|
71
132
|
matchOriginalUtterances: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
72
133
|
}, z.core.$strip>>>;
|
|
@@ -101,57 +162,6 @@ declare const gladiaTranscriptionModelOptionsSchema: z.ZodObject<{
|
|
|
101
162
|
punctuationEnhanced: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
102
163
|
}, z.core.$strip>;
|
|
103
164
|
type GladiaTranscriptionModelOptions = z.infer<typeof gladiaTranscriptionModelOptionsSchema>;
|
|
104
|
-
interface GladiaTranscriptionModelConfig extends GladiaConfig {
|
|
105
|
-
_internal?: {
|
|
106
|
-
currentDate?: () => Date;
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
declare class GladiaTranscriptionModel implements TranscriptionModelV4 {
|
|
110
|
-
readonly modelId: 'default';
|
|
111
|
-
private readonly config;
|
|
112
|
-
readonly specificationVersion = "v4";
|
|
113
|
-
get provider(): string;
|
|
114
|
-
constructor(modelId: 'default', config: GladiaTranscriptionModelConfig);
|
|
115
|
-
private getArgs;
|
|
116
|
-
doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
interface GladiaProvider extends ProviderV4 {
|
|
120
|
-
(): {
|
|
121
|
-
transcription: GladiaTranscriptionModel;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Creates a model for transcription.
|
|
125
|
-
*/
|
|
126
|
-
transcription(): TranscriptionModelV4;
|
|
127
|
-
/**
|
|
128
|
-
* @deprecated Use `embeddingModel` instead.
|
|
129
|
-
*/
|
|
130
|
-
textEmbeddingModel(modelId: string): never;
|
|
131
|
-
}
|
|
132
|
-
interface GladiaProviderSettings {
|
|
133
|
-
/**
|
|
134
|
-
* API key for authenticating requests.
|
|
135
|
-
*/
|
|
136
|
-
apiKey?: string;
|
|
137
|
-
/**
|
|
138
|
-
* Custom headers to include in the requests.
|
|
139
|
-
*/
|
|
140
|
-
headers?: Record<string, string>;
|
|
141
|
-
/**
|
|
142
|
-
* Custom fetch implementation. You can use it as a middleware to intercept requests,
|
|
143
|
-
* or to provide a custom fetch implementation for e.g. testing.
|
|
144
|
-
*/
|
|
145
|
-
fetch?: FetchFunction;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Create a Gladia provider instance.
|
|
149
|
-
*/
|
|
150
|
-
declare function createGladia(options?: GladiaProviderSettings): GladiaProvider;
|
|
151
|
-
/**
|
|
152
|
-
* Default Gladia provider instance.
|
|
153
|
-
*/
|
|
154
|
-
declare const gladia: GladiaProvider;
|
|
155
165
|
|
|
156
166
|
declare const VERSION: string;
|
|
157
167
|
|