@ai-sdk/gladia 3.0.0-beta.3 → 3.0.0-beta.30
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 +229 -4
- package/README.md +2 -0
- package/dist/index.d.ts +19 -10
- package/dist/index.js +148 -148
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- package/src/gladia-config.ts +2 -2
- package/src/gladia-provider.ts +7 -7
- package/src/gladia-transcription-model.ts +31 -14
- 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,230 @@
|
|
|
1
1
|
# @ai-sdk/gladia
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.30
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
|
|
8
|
+
- Updated dependencies [9bd6512]
|
|
9
|
+
- Updated dependencies [258c093]
|
|
10
|
+
- Updated dependencies [b6783da]
|
|
11
|
+
- @ai-sdk/provider-utils@5.0.0-beta.29
|
|
12
|
+
- @ai-sdk/provider@4.0.0-beta.14
|
|
13
|
+
|
|
14
|
+
## 3.0.0-beta.29
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 9f0e36c: trigger release for all packages after provenance setup
|
|
19
|
+
- Updated dependencies [9f0e36c]
|
|
20
|
+
- @ai-sdk/provider@4.0.0-beta.13
|
|
21
|
+
- @ai-sdk/provider-utils@5.0.0-beta.28
|
|
22
|
+
|
|
23
|
+
## 3.0.0-beta.28
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [785fe16]
|
|
28
|
+
- Updated dependencies [67df0a0]
|
|
29
|
+
- Updated dependencies [befb78c]
|
|
30
|
+
- Updated dependencies [0458559]
|
|
31
|
+
- Updated dependencies [5852c0a]
|
|
32
|
+
- Updated dependencies [fc92055]
|
|
33
|
+
- @ai-sdk/provider-utils@5.0.0-beta.27
|
|
34
|
+
|
|
35
|
+
## 3.0.0-beta.27
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [2e98477]
|
|
40
|
+
- @ai-sdk/provider-utils@5.0.0-beta.26
|
|
41
|
+
|
|
42
|
+
## 3.0.0-beta.26
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [eea8d98]
|
|
47
|
+
- @ai-sdk/provider-utils@5.0.0-beta.25
|
|
48
|
+
|
|
49
|
+
## 3.0.0-beta.25
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Updated dependencies [f807e45]
|
|
54
|
+
- @ai-sdk/provider-utils@5.0.0-beta.24
|
|
55
|
+
|
|
56
|
+
## 3.0.0-beta.24
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [350ea38]
|
|
61
|
+
- @ai-sdk/provider-utils@5.0.0-beta.23
|
|
62
|
+
|
|
63
|
+
## 3.0.0-beta.23
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- Updated dependencies [083947b]
|
|
68
|
+
- @ai-sdk/provider-utils@5.0.0-beta.22
|
|
69
|
+
|
|
70
|
+
## 3.0.0-beta.22
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [add1126]
|
|
75
|
+
- @ai-sdk/provider-utils@5.0.0-beta.21
|
|
76
|
+
|
|
77
|
+
## 3.0.0-beta.21
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- b3976a2: Add workflow serialization support to all provider models.
|
|
82
|
+
|
|
83
|
+
**`@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.
|
|
84
|
+
|
|
85
|
+
**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.
|
|
86
|
+
|
|
87
|
+
All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
|
|
88
|
+
|
|
89
|
+
- Updated dependencies [b3976a2]
|
|
90
|
+
- Updated dependencies [ff5eba1]
|
|
91
|
+
- @ai-sdk/provider-utils@5.0.0-beta.20
|
|
92
|
+
- @ai-sdk/provider@4.0.0-beta.12
|
|
93
|
+
|
|
94
|
+
## 3.0.0-beta.20
|
|
95
|
+
|
|
96
|
+
### Major Changes
|
|
97
|
+
|
|
98
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
99
|
+
|
|
100
|
+
### Patch Changes
|
|
101
|
+
|
|
102
|
+
- Updated dependencies [ef992f8]
|
|
103
|
+
- @ai-sdk/provider@4.0.0-beta.11
|
|
104
|
+
- @ai-sdk/provider-utils@5.0.0-beta.19
|
|
105
|
+
|
|
106
|
+
## 3.0.0-beta.19
|
|
107
|
+
|
|
108
|
+
### Patch Changes
|
|
109
|
+
|
|
110
|
+
- Updated dependencies [90e2d8a]
|
|
111
|
+
- @ai-sdk/provider-utils@5.0.0-beta.18
|
|
112
|
+
|
|
113
|
+
## 3.0.0-beta.18
|
|
114
|
+
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- Updated dependencies [3ae1786]
|
|
118
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
119
|
+
|
|
120
|
+
## 3.0.0-beta.17
|
|
121
|
+
|
|
122
|
+
### Patch Changes
|
|
123
|
+
|
|
124
|
+
- Updated dependencies [176466a]
|
|
125
|
+
- @ai-sdk/provider@4.0.0-beta.10
|
|
126
|
+
- @ai-sdk/provider-utils@5.0.0-beta.16
|
|
127
|
+
|
|
128
|
+
## 3.0.0-beta.16
|
|
129
|
+
|
|
130
|
+
### Patch Changes
|
|
131
|
+
|
|
132
|
+
- Updated dependencies [e311194]
|
|
133
|
+
- @ai-sdk/provider@4.0.0-beta.9
|
|
134
|
+
- @ai-sdk/provider-utils@5.0.0-beta.15
|
|
135
|
+
|
|
136
|
+
## 3.0.0-beta.15
|
|
137
|
+
|
|
138
|
+
### Patch Changes
|
|
139
|
+
|
|
140
|
+
- Updated dependencies [34bd95d]
|
|
141
|
+
- Updated dependencies [008271d]
|
|
142
|
+
- @ai-sdk/provider@4.0.0-beta.8
|
|
143
|
+
- @ai-sdk/provider-utils@5.0.0-beta.14
|
|
144
|
+
|
|
145
|
+
## 3.0.0-beta.14
|
|
146
|
+
|
|
147
|
+
### Patch Changes
|
|
148
|
+
|
|
149
|
+
- Updated dependencies [b0c2869]
|
|
150
|
+
- Updated dependencies [7e26e81]
|
|
151
|
+
- @ai-sdk/provider-utils@5.0.0-beta.13
|
|
152
|
+
|
|
153
|
+
## 3.0.0-beta.13
|
|
154
|
+
|
|
155
|
+
### Patch Changes
|
|
156
|
+
|
|
157
|
+
- Updated dependencies [46d1149]
|
|
158
|
+
- @ai-sdk/provider-utils@5.0.0-beta.12
|
|
159
|
+
|
|
160
|
+
## 3.0.0-beta.12
|
|
161
|
+
|
|
162
|
+
### Patch Changes
|
|
163
|
+
|
|
164
|
+
- Updated dependencies [6fd51c0]
|
|
165
|
+
- @ai-sdk/provider-utils@5.0.0-beta.11
|
|
166
|
+
- @ai-sdk/provider@4.0.0-beta.7
|
|
167
|
+
|
|
168
|
+
## 3.0.0-beta.11
|
|
169
|
+
|
|
170
|
+
### Patch Changes
|
|
171
|
+
|
|
172
|
+
- Updated dependencies [c29a26f]
|
|
173
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
174
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
175
|
+
|
|
176
|
+
## 3.0.0-beta.10
|
|
177
|
+
|
|
178
|
+
### Patch Changes
|
|
179
|
+
|
|
180
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
181
|
+
|
|
182
|
+
## 3.0.0-beta.9
|
|
183
|
+
|
|
184
|
+
### Patch Changes
|
|
185
|
+
|
|
186
|
+
- Updated dependencies [2e17091]
|
|
187
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
188
|
+
|
|
189
|
+
## 3.0.0-beta.8
|
|
190
|
+
|
|
191
|
+
### Patch Changes
|
|
192
|
+
|
|
193
|
+
- Updated dependencies [986c6fd]
|
|
194
|
+
- Updated dependencies [493295c]
|
|
195
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
196
|
+
|
|
197
|
+
## 3.0.0-beta.7
|
|
198
|
+
|
|
199
|
+
### Patch Changes
|
|
200
|
+
|
|
201
|
+
- Updated dependencies [1f509d4]
|
|
202
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
203
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
204
|
+
|
|
205
|
+
## 3.0.0-beta.6
|
|
206
|
+
|
|
207
|
+
### Patch Changes
|
|
208
|
+
|
|
209
|
+
- Updated dependencies [3887c70]
|
|
210
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
211
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
212
|
+
|
|
213
|
+
## 3.0.0-beta.5
|
|
214
|
+
|
|
215
|
+
### Patch Changes
|
|
216
|
+
|
|
217
|
+
- Updated dependencies [776b617]
|
|
218
|
+
- @ai-sdk/provider-utils@5.0.0-beta.5
|
|
219
|
+
- @ai-sdk/provider@4.0.0-beta.3
|
|
220
|
+
|
|
221
|
+
## 3.0.0-beta.4
|
|
222
|
+
|
|
223
|
+
### Patch Changes
|
|
224
|
+
|
|
225
|
+
- Updated dependencies [61753c3]
|
|
226
|
+
- @ai-sdk/provider-utils@5.0.0-beta.4
|
|
227
|
+
|
|
3
228
|
## 3.0.0-beta.3
|
|
4
229
|
|
|
5
230
|
### Patch Changes
|
|
@@ -226,13 +451,13 @@
|
|
|
226
451
|
Before
|
|
227
452
|
|
|
228
453
|
```ts
|
|
229
|
-
model.textEmbeddingModel(
|
|
454
|
+
model.textEmbeddingModel("my-model-id");
|
|
230
455
|
```
|
|
231
456
|
|
|
232
457
|
After
|
|
233
458
|
|
|
234
459
|
```ts
|
|
235
|
-
model.embeddingModel(
|
|
460
|
+
model.embeddingModel("my-model-id");
|
|
236
461
|
```
|
|
237
462
|
|
|
238
463
|
- 95f65c2: chore: use import \* from zod/v4
|
|
@@ -432,13 +657,13 @@
|
|
|
432
657
|
Before
|
|
433
658
|
|
|
434
659
|
```ts
|
|
435
|
-
model.textEmbeddingModel(
|
|
660
|
+
model.textEmbeddingModel("my-model-id");
|
|
436
661
|
```
|
|
437
662
|
|
|
438
663
|
After
|
|
439
664
|
|
|
440
665
|
```ts
|
|
441
|
-
model.embeddingModel(
|
|
666
|
+
model.embeddingModel("my-model-id");
|
|
442
667
|
```
|
|
443
668
|
|
|
444
669
|
- 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
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as _ai_sdk_provider from '@ai-sdk/provider';
|
|
2
|
+
import { TranscriptionModelV4, ProviderV4 } from '@ai-sdk/provider';
|
|
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,7 +9,7 @@ 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
|
};
|
|
@@ -106,24 +107,32 @@ interface GladiaTranscriptionModelConfig extends GladiaConfig {
|
|
|
106
107
|
currentDate?: () => Date;
|
|
107
108
|
};
|
|
108
109
|
}
|
|
109
|
-
declare class GladiaTranscriptionModel implements
|
|
110
|
-
readonly modelId:
|
|
110
|
+
declare class GladiaTranscriptionModel implements TranscriptionModelV4 {
|
|
111
|
+
readonly modelId: string;
|
|
111
112
|
private readonly config;
|
|
112
|
-
readonly specificationVersion = "
|
|
113
|
+
readonly specificationVersion = "v4";
|
|
113
114
|
get provider(): string;
|
|
114
|
-
|
|
115
|
+
static [WORKFLOW_SERIALIZE](model: GladiaTranscriptionModel): {
|
|
116
|
+
modelId: string;
|
|
117
|
+
config: _ai_sdk_provider.JSONObject;
|
|
118
|
+
};
|
|
119
|
+
static [WORKFLOW_DESERIALIZE](options: {
|
|
120
|
+
modelId: 'default';
|
|
121
|
+
config: GladiaTranscriptionModelConfig;
|
|
122
|
+
}): GladiaTranscriptionModel;
|
|
123
|
+
constructor(modelId: string, config: GladiaTranscriptionModelConfig);
|
|
115
124
|
private getArgs;
|
|
116
|
-
doGenerate(options: Parameters<
|
|
125
|
+
doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
|
|
117
126
|
}
|
|
118
127
|
|
|
119
|
-
interface GladiaProvider extends
|
|
128
|
+
interface GladiaProvider extends ProviderV4 {
|
|
120
129
|
(): {
|
|
121
130
|
transcription: GladiaTranscriptionModel;
|
|
122
131
|
};
|
|
123
132
|
/**
|
|
124
133
|
* Creates a model for transcription.
|
|
125
134
|
*/
|
|
126
|
-
transcription():
|
|
135
|
+
transcription(): TranscriptionModelV4;
|
|
127
136
|
/**
|
|
128
137
|
* @deprecated Use `embeddingModel` instead.
|
|
129
138
|
*/
|