@ai-sdk/revai 3.0.51 → 3.0.52

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @ai-sdk/revai
2
2
 
3
+ ## 3.0.52
4
+
5
+ ### Patch Changes
6
+
7
+ - ede5b89: chore: migrate package builds from tsup to tsdown
8
+ - Updated dependencies [ede5b89]
9
+ - @ai-sdk/provider@4.0.20
10
+ - @ai-sdk/provider-utils@5.0.52
11
+
3
12
  ## 3.0.51
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,158 +1,163 @@
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';
4
- import { z } from 'zod/v4';
5
-
1
+ import { ProviderV4, TranscriptionModelV4 } from "@ai-sdk/provider";
2
+ import { FetchFunction, WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE } from "@ai-sdk/provider-utils";
3
+ import { z } from "zod/v4";
4
+ //#region src/revai-config.d.ts
6
5
  type RevaiConfig = {
7
- provider: string;
8
- url: (options: {
9
- modelId: string;
10
- path: string;
11
- }) => string;
12
- headers?: () => Record<string, string | undefined>;
13
- fetch?: FetchFunction;
14
- generateId?: () => string;
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;
15
14
  };
16
-
15
+ //#endregion
16
+ //#region src/revai-transcription-options.d.ts
17
17
  type RevaiTranscriptionModelId = 'machine' | 'low_cost' | 'fusion';
18
-
18
+ //#endregion
19
+ //#region src/revai-transcription-model.d.ts
19
20
  interface RevaiTranscriptionModelConfig extends RevaiConfig {
20
- _internal?: {
21
- currentDate?: () => Date;
22
- };
21
+ _internal?: {
22
+ currentDate?: () => Date;
23
+ };
23
24
  }
24
25
  declare class RevaiTranscriptionModel implements TranscriptionModelV4 {
25
- readonly modelId: RevaiTranscriptionModelId;
26
- private readonly config;
27
- readonly specificationVersion = "v4";
28
- get provider(): string;
29
- static [WORKFLOW_SERIALIZE](model: RevaiTranscriptionModel): {
30
- modelId: string;
31
- config: _ai_sdk_provider.JSONObject;
32
- };
33
- static [WORKFLOW_DESERIALIZE](options: {
34
- modelId: RevaiTranscriptionModelId;
35
- config: RevaiTranscriptionModelConfig;
36
- }): RevaiTranscriptionModel;
37
- constructor(modelId: RevaiTranscriptionModelId, config: RevaiTranscriptionModelConfig);
38
- private getArgs;
39
- doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
26
+ readonly modelId: RevaiTranscriptionModelId;
27
+ private readonly config;
28
+ readonly specificationVersion = "v4";
29
+ get provider(): string;
30
+ static [WORKFLOW_SERIALIZE](model: RevaiTranscriptionModel): {
31
+ modelId: string;
32
+ config: import("@ai-sdk/provider").JSONObject;
33
+ };
34
+ static [WORKFLOW_DESERIALIZE](options: {
35
+ modelId: RevaiTranscriptionModelId;
36
+ config: RevaiTranscriptionModelConfig;
37
+ }): RevaiTranscriptionModel;
38
+ constructor(modelId: RevaiTranscriptionModelId, config: RevaiTranscriptionModelConfig);
39
+ private getArgs;
40
+ doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
40
41
  }
41
-
42
+ //#endregion
43
+ //#region src/revai-provider.d.ts
42
44
  interface RevaiProvider extends ProviderV4 {
43
- (modelId: 'machine', settings?: {}): {
44
- transcription: RevaiTranscriptionModel;
45
- };
46
- /**
47
- * Creates a model for transcription.
48
- */
49
- transcription(modelId: RevaiTranscriptionModelId): TranscriptionModelV4;
50
- /**
51
- * @deprecated Use `embeddingModel` instead.
52
- */
53
- textEmbeddingModel(modelId: string): never;
45
+ (modelId: 'machine', settings?: {}): {
46
+ transcription: RevaiTranscriptionModel;
47
+ };
48
+ /**
49
+ * Creates a model for transcription.
50
+ */
51
+ transcription(modelId: RevaiTranscriptionModelId): TranscriptionModelV4;
52
+ /**
53
+ * @deprecated Use `embeddingModel` instead.
54
+ */
55
+ textEmbeddingModel(modelId: string): never;
54
56
  }
55
57
  interface RevaiProviderSettings {
56
- /**
57
- * API key for authenticating requests.
58
- */
59
- apiKey?: string;
60
- /**
61
- * Custom headers to include in the requests.
62
- */
63
- headers?: Record<string, string>;
64
- /**
65
- * Custom fetch implementation. You can use it as a middleware to intercept requests,
66
- * or to provide a custom fetch implementation for e.g. testing.
67
- */
68
- fetch?: FetchFunction;
58
+ /**
59
+ * API key for authenticating requests.
60
+ */
61
+ apiKey?: string;
62
+ /**
63
+ * Custom headers to include in the requests.
64
+ */
65
+ headers?: Record<string, string>;
66
+ /**
67
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
68
+ * or to provide a custom fetch implementation for e.g. testing.
69
+ */
70
+ fetch?: FetchFunction;
69
71
  }
70
72
  /**
71
73
  * Create a Rev.ai provider instance.
72
74
  */
73
- declare function createRevai(options?: RevaiProviderSettings): RevaiProvider;
75
+ export declare function createRevai(options?: RevaiProviderSettings): RevaiProvider;
74
76
  /**
75
77
  * Default Rev.ai provider instance.
76
78
  */
77
- declare const revai: RevaiProvider;
78
-
79
+ export declare const revai: RevaiProvider;
80
+ //#endregion
81
+ //#region src/revai-transcription-model-options.d.ts
79
82
  declare const revaiTranscriptionModelOptionsSchema: z.ZodObject<{
80
- metadata: z.ZodOptional<z.ZodNullable<z.ZodString>>;
81
- notification_config: z.ZodOptional<z.ZodNullable<z.ZodObject<{
82
- url: z.ZodString;
83
- auth_headers: z.ZodOptional<z.ZodNullable<z.ZodObject<{
84
- Authorization: z.ZodString;
85
- }, z.core.$strip>>>;
83
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
+ notification_config: z.ZodOptional<z.ZodNullable<z.ZodObject<{
85
+ url: z.ZodString;
86
+ auth_headers: z.ZodOptional<z.ZodNullable<z.ZodObject<{
87
+ Authorization: z.ZodString;
86
88
  }, z.core.$strip>>>;
87
- delete_after_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
88
- verbatim: z.ZodOptional<z.ZodBoolean>;
89
- rush: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
90
- test_mode: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
91
- segments_to_transcribe: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
92
- start: z.ZodNumber;
93
- end: z.ZodNumber;
94
- }, z.core.$strip>>>>;
95
- speaker_names: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
96
- display_name: z.ZodString;
97
- }, z.core.$strip>>>>;
98
- skip_diarization: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
99
- skip_postprocessing: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
100
- skip_punctuation: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
101
- remove_disfluencies: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
102
- remove_atmospherics: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
103
- filter_profanity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
104
- speaker_channels_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
105
- speakers_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
106
- diarization_type: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
107
- standard: "standard";
108
- premium: "premium";
89
+ }, z.core.$strip>>>;
90
+ delete_after_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
91
+ verbatim: z.ZodOptional<z.ZodBoolean>;
92
+ rush: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
93
+ test_mode: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
94
+ segments_to_transcribe: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
95
+ start: z.ZodNumber;
96
+ end: z.ZodNumber;
97
+ }, z.core.$strip>>>>;
98
+ speaker_names: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
99
+ display_name: z.ZodString;
100
+ }, z.core.$strip>>>>;
101
+ skip_diarization: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
102
+ skip_postprocessing: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
103
+ skip_punctuation: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
104
+ remove_disfluencies: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
105
+ remove_atmospherics: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
106
+ filter_profanity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
107
+ speaker_channels_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
108
+ speakers_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
109
+ diarization_type: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
110
+ standard: "standard";
111
+ premium: "premium";
112
+ }>>>>;
113
+ custom_vocabulary_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
+ custom_vocabularies: z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$strip>>>;
115
+ strict_custom_vocabulary: z.ZodOptional<z.ZodBoolean>;
116
+ summarization_config: z.ZodOptional<z.ZodNullable<z.ZodObject<{
117
+ model: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
118
+ standard: "standard";
119
+ premium: "premium";
109
120
  }>>>>;
110
- custom_vocabulary_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
- custom_vocabularies: z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$strip>>>;
112
- strict_custom_vocabulary: z.ZodOptional<z.ZodBoolean>;
113
- summarization_config: z.ZodOptional<z.ZodNullable<z.ZodObject<{
114
- model: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
115
- standard: "standard";
116
- premium: "premium";
117
- }>>>>;
118
- type: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
119
- paragraph: "paragraph";
120
- bullets: "bullets";
121
- }>>>>;
122
- prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
- }, z.core.$strip>>>;
124
- translation_config: z.ZodOptional<z.ZodNullable<z.ZodObject<{
125
- target_languages: z.ZodArray<z.ZodObject<{
126
- language: z.ZodEnum<{
127
- en: "en";
128
- "en-us": "en-us";
129
- "en-gb": "en-gb";
130
- ar: "ar";
131
- pt: "pt";
132
- "pt-br": "pt-br";
133
- "pt-pt": "pt-pt";
134
- fr: "fr";
135
- "fr-ca": "fr-ca";
136
- es: "es";
137
- "es-es": "es-es";
138
- "es-la": "es-la";
139
- it: "it";
140
- ja: "ja";
141
- ko: "ko";
142
- de: "de";
143
- ru: "ru";
144
- }>;
145
- }, z.core.$strip>>;
146
- model: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
147
- standard: "standard";
148
- premium: "premium";
149
- }>>>>;
150
- }, z.core.$strip>>>;
151
- language: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
152
- forced_alignment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
121
+ type: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
122
+ paragraph: "paragraph";
123
+ bullets: "bullets";
124
+ }>>>>;
125
+ prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
+ }, z.core.$strip>>>;
127
+ translation_config: z.ZodOptional<z.ZodNullable<z.ZodObject<{
128
+ target_languages: z.ZodArray<z.ZodObject<{
129
+ language: z.ZodEnum<{
130
+ en: "en";
131
+ "en-us": "en-us";
132
+ "en-gb": "en-gb";
133
+ ar: "ar";
134
+ pt: "pt";
135
+ "pt-br": "pt-br";
136
+ "pt-pt": "pt-pt";
137
+ fr: "fr";
138
+ "fr-ca": "fr-ca";
139
+ es: "es";
140
+ "es-es": "es-es";
141
+ "es-la": "es-la";
142
+ it: "it";
143
+ ja: "ja";
144
+ ko: "ko";
145
+ de: "de";
146
+ ru: "ru";
147
+ }>;
148
+ }, z.core.$strip>>;
149
+ model: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
150
+ standard: "standard";
151
+ premium: "premium";
152
+ }>>>>;
153
+ }, z.core.$strip>>>;
154
+ language: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
155
+ forced_alignment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
153
156
  }, z.core.$strip>;
154
157
  type RevaiTranscriptionModelOptions = z.infer<typeof revaiTranscriptionModelOptionsSchema>;
155
-
156
- declare const VERSION: string;
157
-
158
- export { type RevaiProvider, type RevaiProviderSettings, type RevaiTranscriptionModelOptions, VERSION, createRevai, revai };
158
+ //#endregion
159
+ //#region src/version.d.ts
160
+ export declare const VERSION: string;
161
+ //#endregion
162
+ export type { RevaiProvider, RevaiProviderSettings, RevaiTranscriptionModelOptions };
163
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/revai-config.ts","../src/revai-transcription-options.ts","../src/revai-transcription-model.ts","../src/revai-provider.ts","../src/revai-transcription-model-options.ts","../src/version.ts"],"mappings":";;;;KAEY;EACV;EACA,MAAM;IAAW;IAAiB;;EAClC,gBAAgB;EAChB,QAAQ;EACR;;;;KCPU;;;UCyBF,sCAAsC;EAC9C;IACE,oBAAoB;;;cAIX,mCAAmC;WAsBnC,SAAS;mBACD;WAtBV;MAEL;UAII,oBAAoB,OAAO;;;;UAO3B,sBAAsB;IAC5B,SAAS;IACT,QAAQ;MACT;EAKU,YAAA,SAAS,2BACD,QAAQ;UAGb;EAiFR,WACJ,SAAS,WAAW,yCACnB,QAAQ,QAAQ,WAAW;;;;UC9Hf,sBAAsB;GAEnC,oBACA;IAEA,eAAe;;;;;EAMjB,cAAc,SAAS,4BAA4B;;;;EAKnD,mBAAmB;;UAGJ;;;;EAIf;;;;EAKA,UAAU;;;;;EAMV,QAAQ;;;;;wBAMM,YACd,UAAS,wBACR;;;;qBA+DU,OAAK;;;cCpHL,sCAAoC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4L/C,EAAA,KAAA;KAEU,iCAAiC,EAAE,aACtC;;;qBChMI"}