@ai-sdk/assemblyai 3.0.0-beta.8 → 3.0.0-canary.33

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/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@ai-sdk/assemblyai",
3
- "version": "3.0.0-beta.8",
3
+ "version": "3.0.0-canary.33",
4
+ "type": "module",
4
5
  "license": "Apache-2.0",
5
6
  "sideEffects": false,
6
7
  "main": "./dist/index.js",
7
- "module": "./dist/index.mjs",
8
8
  "types": "./dist/index.d.ts",
9
9
  "files": [
10
10
  "dist/**/*",
@@ -24,20 +24,20 @@
24
24
  "./package.json": "./package.json",
25
25
  ".": {
26
26
  "types": "./dist/index.d.ts",
27
- "import": "./dist/index.mjs",
28
- "require": "./dist/index.js"
27
+ "import": "./dist/index.js",
28
+ "default": "./dist/index.js"
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@ai-sdk/provider": "4.0.0-beta.5",
33
- "@ai-sdk/provider-utils": "5.0.0-beta.7"
32
+ "@ai-sdk/provider": "4.0.0-canary.15",
33
+ "@ai-sdk/provider-utils": "5.0.0-canary.31"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "20.17.24",
37
37
  "tsup": "^8",
38
38
  "typescript": "5.6.3",
39
39
  "zod": "3.25.76",
40
- "@ai-sdk/test-server": "2.0.0-beta.0",
40
+ "@ai-sdk/test-server": "2.0.0-canary.4",
41
41
  "@vercel/ai-tsconfig": "0.0.0"
42
42
  },
43
43
  "peerDependencies": {
@@ -47,12 +47,14 @@
47
47
  "node": ">=18"
48
48
  },
49
49
  "publishConfig": {
50
- "access": "public"
50
+ "access": "public",
51
+ "provenance": true
51
52
  },
52
53
  "homepage": "https://ai-sdk.dev/docs",
53
54
  "repository": {
54
55
  "type": "git",
55
- "url": "git+https://github.com/vercel/ai.git"
56
+ "url": "https://github.com/vercel/ai",
57
+ "directory": "packages/assemblyai"
56
58
  },
57
59
  "bugs": {
58
60
  "url": "https://github.com/vercel/ai/issues"
@@ -1,9 +1,9 @@
1
- import { FetchFunction } from '@ai-sdk/provider-utils';
1
+ import type { FetchFunction } from '@ai-sdk/provider-utils';
2
2
 
3
3
  export type AssemblyAIConfig = {
4
4
  provider: string;
5
5
  url: (options: { modelId: string; path: string }) => string;
6
- headers: () => Record<string, string | undefined>;
6
+ headers?: () => Record<string, string | undefined>;
7
7
  fetch?: FetchFunction;
8
8
  generateId?: () => string;
9
9
  };
@@ -1,15 +1,15 @@
1
1
  import {
2
- TranscriptionModelV4,
3
- ProviderV4,
4
2
  NoSuchModelError,
3
+ type TranscriptionModelV4,
4
+ type ProviderV4,
5
5
  } from '@ai-sdk/provider';
6
6
  import {
7
- FetchFunction,
8
7
  loadApiKey,
9
8
  withUserAgentSuffix,
9
+ type FetchFunction,
10
10
  } from '@ai-sdk/provider-utils';
11
11
  import { AssemblyAITranscriptionModel } from './assemblyai-transcription-model';
12
- import { AssemblyAITranscriptionModelId } from './assemblyai-transcription-settings';
12
+ import type { AssemblyAITranscriptionModelId } from './assemblyai-transcription-settings';
13
13
  import { VERSION } from './version';
14
14
 
15
15
  export interface AssemblyAIProvider extends ProviderV4 {
@@ -0,0 +1,153 @@
1
+ import { z } from 'zod/v4';
2
+
3
+ // https://www.assemblyai.com/docs/api-reference/transcripts/submit
4
+ export const assemblyaiTranscriptionModelOptionsSchema = z.object({
5
+ /**
6
+ * End time of the audio in milliseconds.
7
+ */
8
+ audioEndAt: z.number().int().nullish(),
9
+ /**
10
+ * Start time of the audio in milliseconds.
11
+ */
12
+ audioStartFrom: z.number().int().nullish(),
13
+ /**
14
+ * Whether to automatically generate chapters for the transcription.
15
+ */
16
+ autoChapters: z.boolean().nullish(),
17
+ /**
18
+ * Whether to automatically generate highlights for the transcription.
19
+ */
20
+ autoHighlights: z.boolean().nullish(),
21
+ /**
22
+ * Boost parameter for the transcription.
23
+ * Allowed values: 'low', 'default', 'high'.
24
+ */
25
+ boostParam: z.string().nullish(),
26
+ /**
27
+ * Whether to enable content safety filtering.
28
+ */
29
+ contentSafety: z.boolean().nullish(),
30
+ /**
31
+ * Confidence threshold for content safety filtering (25-100).
32
+ */
33
+ contentSafetyConfidence: z.number().int().min(25).max(100).nullish(),
34
+ /**
35
+ * Custom spelling rules for the transcription.
36
+ */
37
+ customSpelling: z
38
+ .array(
39
+ z.object({
40
+ from: z.array(z.string()),
41
+ to: z.string(),
42
+ }),
43
+ )
44
+ .nullish(),
45
+ /**
46
+ * Whether to include filler words (um, uh, etc.) in the transcription.
47
+ */
48
+ disfluencies: z.boolean().nullish(),
49
+ /**
50
+ * Whether to enable entity detection.
51
+ */
52
+ entityDetection: z.boolean().nullish(),
53
+ /**
54
+ * Whether to filter profanity from the transcription.
55
+ */
56
+ filterProfanity: z.boolean().nullish(),
57
+ /**
58
+ * Whether to format text with punctuation and capitalization.
59
+ */
60
+ formatText: z.boolean().nullish(),
61
+ /**
62
+ * Whether to enable IAB categories detection.
63
+ */
64
+ iabCategories: z.boolean().nullish(),
65
+ /**
66
+ * Language code for the transcription.
67
+ */
68
+ languageCode: z.union([z.literal('en'), z.string()]).nullish(),
69
+ /**
70
+ * Confidence threshold for language detection.
71
+ */
72
+ languageConfidenceThreshold: z.number().nullish(),
73
+ /**
74
+ * Whether to enable language detection.
75
+ */
76
+ languageDetection: z.boolean().nullish(),
77
+ /**
78
+ * Whether to process audio as multichannel.
79
+ */
80
+ multichannel: z.boolean().nullish(),
81
+ /**
82
+ * Whether to add punctuation to the transcription.
83
+ */
84
+ punctuate: z.boolean().nullish(),
85
+ /**
86
+ * Whether to redact personally identifiable information (PII).
87
+ */
88
+ redactPii: z.boolean().nullish(),
89
+ /**
90
+ * Whether to redact PII in the audio file.
91
+ */
92
+ redactPiiAudio: z.boolean().nullish(),
93
+ /**
94
+ * Audio format for PII redaction.
95
+ */
96
+ redactPiiAudioQuality: z.string().nullish(),
97
+ /**
98
+ * List of PII types to redact.
99
+ */
100
+ redactPiiPolicies: z.array(z.string()).nullish(),
101
+ /**
102
+ * Substitution method for redacted PII.
103
+ */
104
+ redactPiiSub: z.string().nullish(),
105
+ /**
106
+ * Whether to enable sentiment analysis.
107
+ */
108
+ sentimentAnalysis: z.boolean().nullish(),
109
+ /**
110
+ * Whether to identify different speakers in the audio.
111
+ */
112
+ speakerLabels: z.boolean().nullish(),
113
+ /**
114
+ * Number of speakers expected in the audio.
115
+ */
116
+ speakersExpected: z.number().int().nullish(),
117
+ /**
118
+ * Threshold for speech detection (0-1).
119
+ */
120
+ speechThreshold: z.number().min(0).max(1).nullish(),
121
+ /**
122
+ * Whether to generate a summary of the transcription.
123
+ */
124
+ summarization: z.boolean().nullish(),
125
+ /**
126
+ * Model to use for summarization.
127
+ */
128
+ summaryModel: z.string().nullish(),
129
+ /**
130
+ * Type of summary to generate.
131
+ */
132
+ summaryType: z.string().nullish(),
133
+ /**
134
+ * Name of the authentication header for webhook requests.
135
+ */
136
+ webhookAuthHeaderName: z.string().nullish(),
137
+ /**
138
+ * Value of the authentication header for webhook requests.
139
+ */
140
+ webhookAuthHeaderValue: z.string().nullish(),
141
+ /**
142
+ * URL to send webhook notifications to.
143
+ */
144
+ webhookUrl: z.string().nullish(),
145
+ /**
146
+ * List of words to boost recognition for.
147
+ */
148
+ wordBoost: z.array(z.string()).nullish(),
149
+ });
150
+
151
+ export type AssemblyAITranscriptionModelOptions = z.infer<
152
+ typeof assemblyaiTranscriptionModelOptionsSchema
153
+ >;
@@ -1,4 +1,4 @@
1
- import { TranscriptionModelV4, SharedV4Warning } from '@ai-sdk/provider';
1
+ import type { TranscriptionModelV4, SharedV4Warning } from '@ai-sdk/provider';
2
2
  import {
3
3
  combineHeaders,
4
4
  createJsonResponseHandler,
@@ -6,164 +6,16 @@ import {
6
6
  parseProviderOptions,
7
7
  postJsonToApi,
8
8
  postToApi,
9
+ serializeModelOptions,
10
+ WORKFLOW_SERIALIZE,
11
+ WORKFLOW_DESERIALIZE,
9
12
  } from '@ai-sdk/provider-utils';
10
13
  import { z } from 'zod/v4';
11
- import { AssemblyAIConfig } from './assemblyai-config';
14
+ import type { AssemblyAIConfig } from './assemblyai-config';
12
15
  import { assemblyaiFailedResponseHandler } from './assemblyai-error';
13
- import { AssemblyAITranscriptionModelId } from './assemblyai-transcription-settings';
14
- import { AssemblyAITranscriptionAPITypes } from './assemblyai-api-types';
15
-
16
- // https://www.assemblyai.com/docs/api-reference/transcripts/submit
17
- const assemblyaiTranscriptionModelOptionsSchema = z.object({
18
- /**
19
- * End time of the audio in milliseconds.
20
- */
21
- audioEndAt: z.number().int().nullish(),
22
- /**
23
- * Start time of the audio in milliseconds.
24
- */
25
- audioStartFrom: z.number().int().nullish(),
26
- /**
27
- * Whether to automatically generate chapters for the transcription.
28
- */
29
- autoChapters: z.boolean().nullish(),
30
- /**
31
- * Whether to automatically generate highlights for the transcription.
32
- */
33
- autoHighlights: z.boolean().nullish(),
34
- /**
35
- * Boost parameter for the transcription.
36
- * Allowed values: 'low', 'default', 'high'.
37
- */
38
- boostParam: z.string().nullish(),
39
- /**
40
- * Whether to enable content safety filtering.
41
- */
42
- contentSafety: z.boolean().nullish(),
43
- /**
44
- * Confidence threshold for content safety filtering (25-100).
45
- */
46
- contentSafetyConfidence: z.number().int().min(25).max(100).nullish(),
47
- /**
48
- * Custom spelling rules for the transcription.
49
- */
50
- customSpelling: z
51
- .array(
52
- z.object({
53
- from: z.array(z.string()),
54
- to: z.string(),
55
- }),
56
- )
57
- .nullish(),
58
- /**
59
- * Whether to include filler words (um, uh, etc.) in the transcription.
60
- */
61
- disfluencies: z.boolean().nullish(),
62
- /**
63
- * Whether to enable entity detection.
64
- */
65
- entityDetection: z.boolean().nullish(),
66
- /**
67
- * Whether to filter profanity from the transcription.
68
- */
69
- filterProfanity: z.boolean().nullish(),
70
- /**
71
- * Whether to format text with punctuation and capitalization.
72
- */
73
- formatText: z.boolean().nullish(),
74
- /**
75
- * Whether to enable IAB categories detection.
76
- */
77
- iabCategories: z.boolean().nullish(),
78
- /**
79
- * Language code for the transcription.
80
- */
81
- languageCode: z.union([z.literal('en'), z.string()]).nullish(),
82
- /**
83
- * Confidence threshold for language detection.
84
- */
85
- languageConfidenceThreshold: z.number().nullish(),
86
- /**
87
- * Whether to enable language detection.
88
- */
89
- languageDetection: z.boolean().nullish(),
90
- /**
91
- * Whether to process audio as multichannel.
92
- */
93
- multichannel: z.boolean().nullish(),
94
- /**
95
- * Whether to add punctuation to the transcription.
96
- */
97
- punctuate: z.boolean().nullish(),
98
- /**
99
- * Whether to redact personally identifiable information (PII).
100
- */
101
- redactPii: z.boolean().nullish(),
102
- /**
103
- * Whether to redact PII in the audio file.
104
- */
105
- redactPiiAudio: z.boolean().nullish(),
106
- /**
107
- * Audio format for PII redaction.
108
- */
109
- redactPiiAudioQuality: z.string().nullish(),
110
- /**
111
- * List of PII types to redact.
112
- */
113
- redactPiiPolicies: z.array(z.string()).nullish(),
114
- /**
115
- * Substitution method for redacted PII.
116
- */
117
- redactPiiSub: z.string().nullish(),
118
- /**
119
- * Whether to enable sentiment analysis.
120
- */
121
- sentimentAnalysis: z.boolean().nullish(),
122
- /**
123
- * Whether to identify different speakers in the audio.
124
- */
125
- speakerLabels: z.boolean().nullish(),
126
- /**
127
- * Number of speakers expected in the audio.
128
- */
129
- speakersExpected: z.number().int().nullish(),
130
- /**
131
- * Threshold for speech detection (0-1).
132
- */
133
- speechThreshold: z.number().min(0).max(1).nullish(),
134
- /**
135
- * Whether to generate a summary of the transcription.
136
- */
137
- summarization: z.boolean().nullish(),
138
- /**
139
- * Model to use for summarization.
140
- */
141
- summaryModel: z.string().nullish(),
142
- /**
143
- * Type of summary to generate.
144
- */
145
- summaryType: z.string().nullish(),
146
- /**
147
- * Name of the authentication header for webhook requests.
148
- */
149
- webhookAuthHeaderName: z.string().nullish(),
150
- /**
151
- * Value of the authentication header for webhook requests.
152
- */
153
- webhookAuthHeaderValue: z.string().nullish(),
154
- /**
155
- * URL to send webhook notifications to.
156
- */
157
- webhookUrl: z.string().nullish(),
158
- /**
159
- * List of words to boost recognition for.
160
- */
161
- wordBoost: z.array(z.string()).nullish(),
162
- });
163
-
164
- export type AssemblyAITranscriptionModelOptions = z.infer<
165
- typeof assemblyaiTranscriptionModelOptionsSchema
166
- >;
16
+ import { assemblyaiTranscriptionModelOptionsSchema } from './assemblyai-transcription-model-options';
17
+ import type { AssemblyAITranscriptionModelId } from './assemblyai-transcription-settings';
18
+ import type { AssemblyAITranscriptionAPITypes } from './assemblyai-api-types';
167
19
 
168
20
  interface AssemblyAITranscriptionModelConfig extends AssemblyAIConfig {
169
21
  _internal?: {
@@ -183,6 +35,20 @@ export class AssemblyAITranscriptionModel implements TranscriptionModelV4 {
183
35
  return this.config.provider;
184
36
  }
185
37
 
38
+ static [WORKFLOW_SERIALIZE](model: AssemblyAITranscriptionModel) {
39
+ return serializeModelOptions({
40
+ modelId: model.modelId,
41
+ config: model.config,
42
+ });
43
+ }
44
+
45
+ static [WORKFLOW_DESERIALIZE](options: {
46
+ modelId: AssemblyAITranscriptionModelId;
47
+ config: AssemblyAITranscriptionModelConfig;
48
+ }) {
49
+ return new AssemblyAITranscriptionModel(options.modelId, options.config);
50
+ }
51
+
186
52
  constructor(
187
53
  readonly modelId: AssemblyAITranscriptionModelId,
188
54
  private readonly config: AssemblyAITranscriptionModelConfig,
@@ -201,7 +67,7 @@ export class AssemblyAITranscriptionModel implements TranscriptionModelV4 {
201
67
  });
202
68
 
203
69
  const body: Omit<AssemblyAITranscriptionAPITypes, 'audio_url'> = {
204
- speech_model: this.modelId,
70
+ speech_model: this.modelId as 'best' | 'nano',
205
71
  };
206
72
 
207
73
  // Add provider-specific options
@@ -289,7 +155,7 @@ export class AssemblyAITranscriptionModel implements TranscriptionModelV4 {
289
155
  {
290
156
  method: 'GET',
291
157
  headers: combineHeaders(
292
- this.config.headers(),
158
+ this.config.headers?.(),
293
159
  headers,
294
160
  ) as HeadersInit,
295
161
  signal: abortSignal,
@@ -340,7 +206,7 @@ export class AssemblyAITranscriptionModel implements TranscriptionModelV4 {
340
206
  }),
341
207
  headers: {
342
208
  'Content-Type': 'application/octet-stream',
343
- ...combineHeaders(this.config.headers(), options.headers),
209
+ ...combineHeaders(this.config.headers?.(), options.headers),
344
210
  },
345
211
  body: {
346
212
  content: options.audio,
@@ -361,7 +227,7 @@ export class AssemblyAITranscriptionModel implements TranscriptionModelV4 {
361
227
  path: '/v2/transcript',
362
228
  modelId: this.modelId,
363
229
  }),
364
- headers: combineHeaders(this.config.headers(), options.headers),
230
+ headers: combineHeaders(this.config.headers?.(), options.headers),
365
231
  body: {
366
232
  ...body,
367
233
  audio_url: uploadResponse.upload_url,
@@ -1 +1 @@
1
- export type AssemblyAITranscriptionModelId = 'best' | 'nano';
1
+ export type AssemblyAITranscriptionModelId = 'best' | 'nano' | (string & {});
package/src/index.ts CHANGED
@@ -3,5 +3,5 @@ export type {
3
3
  AssemblyAIProvider,
4
4
  AssemblyAIProviderSettings,
5
5
  } from './assemblyai-provider';
6
- export type { AssemblyAITranscriptionModelOptions } from './assemblyai-transcription-model';
6
+ export type { AssemblyAITranscriptionModelOptions } from './assemblyai-transcription-model-options';
7
7
  export { VERSION } from './version';
package/dist/index.d.mts DELETED
@@ -1,123 +0,0 @@
1
- import { TranscriptionModelV4, ProviderV4 } from '@ai-sdk/provider';
2
- import { FetchFunction } from '@ai-sdk/provider-utils';
3
- import { z } from 'zod/v4';
4
-
5
- type AssemblyAIConfig = {
6
- provider: string;
7
- url: (options: {
8
- modelId: string;
9
- path: string;
10
- }) => string;
11
- headers: () => Record<string, string | undefined>;
12
- fetch?: FetchFunction;
13
- generateId?: () => string;
14
- };
15
-
16
- type AssemblyAITranscriptionModelId = 'best' | 'nano';
17
-
18
- declare const assemblyaiTranscriptionModelOptionsSchema: z.ZodObject<{
19
- audioEndAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
20
- audioStartFrom: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
21
- autoChapters: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
22
- autoHighlights: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
23
- boostParam: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
- contentSafety: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
25
- contentSafetyConfidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
26
- customSpelling: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
27
- from: z.ZodArray<z.ZodString>;
28
- to: z.ZodString;
29
- }, z.core.$strip>>>>;
30
- disfluencies: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
31
- entityDetection: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
32
- filterProfanity: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
33
- formatText: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
34
- iabCategories: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
35
- languageCode: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"en">, z.ZodString]>>>;
36
- languageConfidenceThreshold: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
37
- languageDetection: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
38
- multichannel: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
39
- punctuate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
40
- redactPii: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
41
- redactPiiAudio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
42
- redactPiiAudioQuality: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
- redactPiiPolicies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
44
- redactPiiSub: z.ZodOptional<z.ZodNullable<z.ZodString>>;
45
- sentimentAnalysis: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
46
- speakerLabels: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
47
- speakersExpected: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
48
- speechThreshold: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
49
- summarization: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
50
- summaryModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
- summaryType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
- webhookAuthHeaderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
- webhookAuthHeaderValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
- webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
- wordBoost: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
56
- }, z.core.$strip>;
57
- type AssemblyAITranscriptionModelOptions = z.infer<typeof assemblyaiTranscriptionModelOptionsSchema>;
58
- interface AssemblyAITranscriptionModelConfig extends AssemblyAIConfig {
59
- _internal?: {
60
- currentDate?: () => Date;
61
- };
62
- /**
63
- * The polling interval for checking transcript status in milliseconds.
64
- */
65
- pollingInterval?: number;
66
- }
67
- declare class AssemblyAITranscriptionModel implements TranscriptionModelV4 {
68
- readonly modelId: AssemblyAITranscriptionModelId;
69
- private readonly config;
70
- readonly specificationVersion = "v4";
71
- private readonly POLLING_INTERVAL_MS;
72
- get provider(): string;
73
- constructor(modelId: AssemblyAITranscriptionModelId, config: AssemblyAITranscriptionModelConfig);
74
- private getArgs;
75
- /**
76
- * Polls the given transcript until we have a status other than `processing` or `queued`.
77
- *
78
- * @see https://www.assemblyai.com/docs/getting-started/transcribe-an-audio-file#step-33
79
- */
80
- private waitForCompletion;
81
- doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
82
- }
83
-
84
- interface AssemblyAIProvider extends ProviderV4 {
85
- (modelId: 'best', settings?: {}): {
86
- transcription: AssemblyAITranscriptionModel;
87
- };
88
- /**
89
- * Creates a model for transcription.
90
- */
91
- transcription(modelId: AssemblyAITranscriptionModelId): TranscriptionModelV4;
92
- /**
93
- * @deprecated Use `embeddingModel` instead.
94
- */
95
- textEmbeddingModel(modelId: string): never;
96
- }
97
- interface AssemblyAIProviderSettings {
98
- /**
99
- * API key for authenticating requests.
100
- */
101
- apiKey?: string;
102
- /**
103
- * Custom headers to include in the requests.
104
- */
105
- headers?: Record<string, string>;
106
- /**
107
- * Custom fetch implementation. You can use it as a middleware to intercept requests,
108
- * or to provide a custom fetch implementation for e.g. testing.
109
- */
110
- fetch?: FetchFunction;
111
- }
112
- /**
113
- * Create an AssemblyAI provider instance.
114
- */
115
- declare function createAssemblyAI(options?: AssemblyAIProviderSettings): AssemblyAIProvider;
116
- /**
117
- * Default AssemblyAI provider instance.
118
- */
119
- declare const assemblyai: AssemblyAIProvider;
120
-
121
- declare const VERSION: string;
122
-
123
- export { type AssemblyAIProvider, type AssemblyAIProviderSettings, type AssemblyAITranscriptionModelOptions, VERSION, assemblyai, createAssemblyAI };