@opencode/ai 2.1.3 → 2.2.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/README.md +283 -114
- package/dist/ai-client.d.ts +2 -2
- package/dist/ai-client.js +2 -1
- package/dist/cache-policy.d.ts +4 -0
- package/dist/cache-policy.js +20 -6
- package/dist/decision-client.d.ts +21 -0
- package/dist/decision-client.js +55 -0
- package/dist/decision.d.ts +472 -0
- package/dist/decision.js +158 -0
- package/dist/effect.d.ts +38 -0
- package/dist/effect.js +27 -0
- package/dist/effort-updates.d.ts +2 -2
- package/dist/experimental/cloudflare-run-extraction.d.ts +13 -0
- package/dist/experimental/cloudflare-run-extraction.js +83 -0
- package/dist/experimental/extraction.d.ts +183 -0
- package/dist/experimental/extraction.js +102 -0
- package/dist/experimental/realtime.d.ts +7 -2
- package/dist/experimental/realtime.js +5 -5
- package/dist/experimental.d.ts +2 -3
- package/dist/experimental.js +1 -2
- package/dist/image-client.d.ts +13 -22
- package/dist/image-client.js +0 -1
- package/dist/image.d.ts +154 -324
- package/dist/image.js +4 -11
- package/dist/index.d.ts +1426 -34
- package/dist/index.js +127 -24
- package/dist/llm.d.ts +16 -1
- package/dist/llm.js +34 -0
- package/dist/media-client.d.ts +2 -1
- package/dist/media-model.d.ts +3 -0
- package/dist/media-model.js +4 -1
- package/dist/media.d.ts +0 -7
- package/dist/media.js +0 -6
- package/dist/protocols/alibaba-chat.d.ts +32 -12
- package/dist/protocols/alibaba-images.d.ts +22 -0
- package/dist/protocols/alibaba-images.js +77 -0
- package/dist/protocols/alibaba-messages.d.ts +62 -27
- package/dist/protocols/alibaba-responses.d.ts +41 -38
- package/dist/protocols/anthropic-messages.d.ts +196 -94
- package/dist/protocols/anthropic-messages.js +47 -16
- package/dist/protocols/bedrock-converse.d.ts +140 -47
- package/dist/protocols/bedrock-converse.js +114 -18
- package/dist/protocols/bedrock-event-stream.js +1 -0
- package/dist/protocols/bfl-images.d.ts +9 -0
- package/dist/protocols/bfl-images.js +17 -15
- package/dist/protocols/cartesia-speech.d.ts +32 -50
- package/dist/protocols/cloudflare-run-decisions.d.ts +9 -0
- package/dist/protocols/cloudflare-run-decisions.js +36 -0
- package/dist/protocols/cloudflare-workers-ai-images.d.ts +23 -0
- package/dist/protocols/cloudflare-workers-ai-images.js +80 -0
- package/dist/protocols/cohere-chat.d.ts +7 -8
- package/dist/protocols/deepgram-speech.d.ts +32 -50
- package/dist/protocols/elevenlabs-speech.d.ts +32 -50
- package/dist/protocols/fal-images.d.ts +10 -1
- package/dist/protocols/fal-images.js +16 -25
- package/dist/protocols/fal-video.js +1 -1
- package/dist/protocols/gemini.d.ts +37 -34
- package/dist/protocols/gemini.js +13 -8
- package/dist/protocols/google-images.d.ts +2 -2
- package/dist/protocols/google-images.js +8 -37
- package/dist/protocols/google-interactions.d.ts +18 -14
- package/dist/protocols/google-interactions.js +14 -7
- package/dist/protocols/google-speech.d.ts +32 -50
- package/dist/protocols/google-speech.js +0 -1
- package/dist/protocols/google-transcription.d.ts +32 -50
- package/dist/protocols/google-transcription.js +0 -1
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/google-video.js +2 -7
- package/dist/protocols/index.d.ts +3 -0
- package/dist/protocols/index.js +3 -0
- package/dist/protocols/meta-images.d.ts +7 -1
- package/dist/protocols/meta-images.js +10 -8
- package/dist/protocols/meta-messages.d.ts +73 -38
- package/dist/protocols/meta-messages.js +14 -1
- package/dist/protocols/meta-responses.d.ts +84 -78
- package/dist/protocols/meta-responses.js +29 -1
- package/dist/protocols/mistral-chat.d.ts +81 -78
- package/dist/protocols/mistral-chat.js +2 -1
- package/dist/protocols/open-responses-channel.js +47 -46
- package/dist/protocols/open-responses-continuation.d.ts +8 -2
- package/dist/protocols/open-responses-continuation.js +3 -1
- package/dist/protocols/open-responses.d.ts +426 -396
- package/dist/protocols/open-responses.js +16 -25
- package/dist/protocols/openai-chat.d.ts +764 -52
- package/dist/protocols/openai-chat.js +38 -25
- package/dist/protocols/openai-compatible-chat.d.ts +35 -15
- package/dist/protocols/openai-compatible-responses.d.ts +44 -42
- package/dist/protocols/openai-decisions.d.ts +22 -0
- package/dist/protocols/openai-decisions.js +128 -0
- package/dist/protocols/openai-images.d.ts +53 -56
- package/dist/protocols/openai-images.js +100 -34
- package/dist/protocols/openai-responses.d.ts +322 -264
- package/dist/protocols/openai-responses.js +33 -3
- package/dist/protocols/openai-speech.d.ts +32 -50
- package/dist/protocols/openai-speech.js +15 -5
- package/dist/protocols/openai-transcription.d.ts +32 -50
- package/dist/protocols/openai-transcription.js +15 -11
- package/dist/protocols/replicate-images.js +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/runway-video.js +1 -1
- package/dist/protocols/shared.d.ts +9 -1
- package/dist/protocols/shared.js +13 -2
- package/dist/protocols/stability-images.d.ts +5 -0
- package/dist/protocols/stability-images.js +4 -9
- package/dist/protocols/system-one.d.ts +101 -0
- package/dist/protocols/system-one.js +230 -0
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.js +7 -6
- package/dist/protocols/utils/cache.d.ts +14 -3
- package/dist/protocols/utils/cache.js +11 -4
- package/dist/protocols/utils/gemini-generate-content.d.ts +3 -3
- package/dist/protocols/utils/gemini-generate-content.js +10 -16
- package/dist/protocols/utils/gemini-json-schema.d.ts +5 -0
- package/dist/protocols/utils/gemini-json-schema.js +3 -3
- package/dist/protocols/utils/image-sizing.d.ts +31 -0
- package/dist/protocols/utils/image-sizing.js +73 -0
- package/dist/protocols/utils/media-input.d.ts +4 -5
- package/dist/protocols/utils/media-input.js +8 -5
- package/dist/protocols/utils/partial-json-options.d.ts +0 -1
- package/dist/protocols/utils/partial-json-options.js +0 -1
- package/dist/protocols/utils/speech-stream.d.ts +0 -1
- package/dist/protocols/utils/speech-stream.js +0 -1
- package/dist/protocols/utils/tool-schema.js +15 -5
- package/dist/protocols/utils/tool-stream.d.ts +10 -1
- package/dist/protocols/venice-chat.d.ts +71 -53
- package/dist/protocols/venice-chat.js +7 -6
- package/dist/protocols/xai-images.d.ts +1 -2
- package/dist/protocols/xai-images.js +9 -2
- package/dist/protocols/xai-responses.d.ts +88 -78
- package/dist/protocols/xai-responses.js +28 -2
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/xai-video.js +11 -8
- package/dist/protocols/zai-chat.d.ts +54 -30
- package/dist/protocols/zai-chat.js +8 -3
- package/dist/protocols/zai-images.d.ts +3 -1
- package/dist/protocols/zai-images.js +12 -11
- package/dist/protocols/zai-messages.d.ts +72 -35
- package/dist/protocols/zai-messages.js +3 -2
- package/dist/provider-error.js +24 -7
- package/dist/providers/alibaba/images.d.ts +2 -0
- package/dist/providers/alibaba/images.js +1 -0
- package/dist/providers/alibaba.d.ts +146 -85
- package/dist/providers/alibaba.js +16 -8
- package/dist/providers/amazon-bedrock-mantle.d.ts +277 -218
- package/dist/providers/amazon-bedrock.d.ts +48 -28
- package/dist/providers/amazon-bedrock.js +11 -11
- package/dist/providers/anthropic-compatible.d.ts +64 -29
- package/dist/providers/anthropic.d.ts +64 -29
- package/dist/providers/azure/images.d.ts +2 -0
- package/dist/providers/azure/images.js +1 -0
- package/dist/providers/azure.d.ts +156 -115
- package/dist/providers/azure.js +19 -1
- package/dist/providers/baseten/decisions.d.ts +2 -0
- package/dist/providers/baseten/decisions.js +1 -0
- package/dist/providers/baseten.d.ts +75 -25
- package/dist/providers/baseten.js +41 -8
- package/dist/providers/cerebras.d.ts +66 -24
- package/dist/providers/cloudflare-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-ai-gateway/decisions.js +1 -0
- package/dist/providers/cloudflare-ai-gateway.d.ts +409 -272
- package/dist/providers/cloudflare-ai-gateway.js +33 -6
- package/dist/providers/cloudflare-workers-ai/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/decisions.js +1 -0
- package/dist/providers/cloudflare-workers-ai/images.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/images.js +1 -0
- package/dist/providers/cloudflare-workers-ai.d.ts +79 -25
- package/dist/providers/cloudflare-workers-ai.js +45 -9
- package/dist/providers/cohere.d.ts +117 -75
- package/dist/providers/deepinfra.d.ts +66 -24
- package/dist/providers/deepseek.d.ts +66 -24
- package/dist/providers/digitalocean/decisions.d.ts +2 -0
- package/dist/providers/digitalocean/decisions.js +1 -0
- package/dist/providers/digitalocean/images.d.ts +2 -0
- package/dist/providers/digitalocean/images.js +1 -0
- package/dist/providers/digitalocean.d.ts +108 -37
- package/dist/providers/digitalocean.js +39 -8
- package/dist/providers/fireworks.d.ts +66 -24
- package/dist/providers/google/images.d.ts +2 -0
- package/dist/providers/google/images.js +1 -0
- package/dist/providers/google-vertex/images.d.ts +2 -0
- package/dist/providers/google-vertex/images.js +1 -0
- package/dist/providers/google-vertex-chat.d.ts +33 -12
- package/dist/providers/google-vertex-messages.d.ts +64 -29
- package/dist/providers/google-vertex-mistral.d.ts +17 -17
- package/dist/providers/google-vertex-responses.d.ts +38 -35
- package/dist/providers/google-vertex.d.ts +20 -18
- package/dist/providers/google-vertex.js +32 -15
- package/dist/providers/google.d.ts +22 -21
- package/dist/providers/google.js +15 -8
- package/dist/providers/groq.d.ts +66 -28
- package/dist/providers/groq.js +0 -6
- package/dist/providers/meta.d.ts +144 -85
- package/dist/providers/minimax.d.ts +145 -86
- package/dist/providers/mistral.d.ts +28 -28
- package/dist/providers/moonshot.d.ts +277 -218
- package/dist/providers/open-responses-options.d.ts +0 -1
- package/dist/providers/open-responses-options.js +1 -1
- package/dist/providers/openai/images.d.ts +2 -0
- package/dist/providers/openai/images.js +1 -0
- package/dist/providers/openai-compatible/images.d.ts +2 -0
- package/dist/providers/openai-compatible/images.js +1 -0
- package/dist/providers/openai-compatible-responses.d.ts +38 -35
- package/dist/providers/openai-compatible.d.ts +36 -13
- package/dist/providers/openai-compatible.js +22 -10
- package/dist/providers/openai-options.d.ts +3 -2
- package/dist/providers/openai-options.js +0 -1
- package/dist/providers/openai.d.ts +146 -109
- package/dist/providers/openai.js +20 -4
- package/dist/providers/opencode/decisions.d.ts +2 -0
- package/dist/providers/opencode/decisions.js +1 -0
- package/dist/providers/opencode.d.ts +9 -10
- package/dist/providers/opencode.js +10 -8
- package/dist/providers/openrouter/decisions.d.ts +2 -0
- package/dist/providers/openrouter/decisions.js +1 -0
- package/dist/providers/openrouter/images.d.ts +2 -0
- package/dist/providers/openrouter/images.js +1 -0
- package/dist/providers/openrouter.d.ts +128 -47
- package/dist/providers/openrouter.js +38 -16
- package/dist/providers/togetherai.d.ts +66 -24
- package/dist/providers/typesafe-ai/decisions.d.ts +2 -0
- package/dist/providers/typesafe-ai/decisions.js +1 -0
- package/dist/providers/typesafe-ai.d.ts +9 -10
- package/dist/providers/typesafe-ai.js +10 -8
- package/dist/providers/venice.d.ts +214 -20
- package/dist/providers/vercel-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/decisions.js +1 -0
- package/dist/providers/vercel-ai-gateway/images.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/images.js +1 -0
- package/dist/providers/vercel-ai-gateway.d.ts +10 -16
- package/dist/providers/vercel-ai-gateway.js +31 -85
- package/dist/providers/xai/images.d.ts +2 -0
- package/dist/providers/xai/images.js +1 -0
- package/dist/providers/xai.d.ts +40 -17
- package/dist/providers/xai.js +15 -8
- package/dist/providers/zai/images.d.ts +2 -0
- package/dist/providers/zai/images.js +1 -0
- package/dist/providers/zai-coding-plan.d.ts +224 -85
- package/dist/providers/zai.d.ts +110 -23
- package/dist/providers/zai.js +15 -8
- package/dist/route/auth-options.d.ts +0 -3
- package/dist/route/auth.d.ts +0 -2
- package/dist/route/auth.js +0 -2
- package/dist/route/client.d.ts +2 -4
- package/dist/route/client.js +29 -8
- package/dist/route/decision.d.ts +58 -0
- package/dist/route/decision.js +75 -0
- package/dist/route/executor-service.js +1 -1
- package/dist/route/executor.d.ts +1 -1
- package/dist/route/framing.d.ts +2 -0
- package/dist/route/index.d.ts +3 -0
- package/dist/route/index.js +3 -0
- package/dist/route/media-protocol.d.ts +1 -0
- package/dist/route/media-protocol.js +12 -8
- package/dist/route/media.d.ts +5 -1
- package/dist/route/media.js +6 -2
- package/dist/route/transport/http.js +1 -0
- package/dist/route/transport/index.d.ts +1 -0
- package/dist/schema/events.d.ts +148 -6
- package/dist/schema/events.js +20 -0
- package/dist/schema/messages.d.ts +6 -2
- package/dist/schema/messages.js +3 -0
- package/dist/schema/options.d.ts +5 -3
- package/dist/schema/options.js +8 -3
- package/dist/speech-client.d.ts +13 -22
- package/dist/speech-client.js +0 -1
- package/dist/speech.d.ts +148 -283
- package/dist/speech.js +2 -4
- package/dist/testing.d.ts +25 -24
- package/dist/testing.js +3 -21
- package/dist/transcription-client.d.ts +13 -22
- package/dist/transcription.d.ts +148 -283
- package/dist/transcription.js +1 -1
- package/dist/utils/media-type.js +22 -1
- package/dist/video-client.d.ts +13 -22
- package/dist/video-client.js +0 -1
- package/dist/video.d.ts +115 -250
- package/dist/video.js +3 -5
- package/package.json +516 -13
- package/dist/experimental/evaluation-client.d.ts +0 -21
- package/dist/experimental/evaluation-client.js +0 -64
- package/dist/experimental/evaluation.d.ts +0 -242
- package/dist/experimental/evaluation.js +0 -115
- package/dist/experimental/system-one.d.ts +0 -16
- package/dist/experimental/system-one.js +0 -135
- package/dist/promise.d.ts +0 -1021
- package/dist/promise.js +0 -101
- package/dist/provider.d.ts +0 -23
- package/dist/provider.js +0 -2
package/dist/transcription.d.ts
CHANGED
|
@@ -133,11 +133,6 @@ declare const TranscriptionResponse_base: Schema.Class<TranscriptionResponse, Sc
|
|
|
133
133
|
readonly type: Schema.Literal<"compute">;
|
|
134
134
|
readonly seconds: Schema.Number;
|
|
135
135
|
}>]>>;
|
|
136
|
-
notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
137
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
138
|
-
readonly message: Schema.String;
|
|
139
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
140
|
-
}>>>;
|
|
141
136
|
providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
142
137
|
}>, {}>;
|
|
143
138
|
export declare class TranscriptionResponse extends TranscriptionResponse_base {
|
|
@@ -191,11 +186,6 @@ export declare const TranscriptionFinishEvent: Schema.Struct<{
|
|
|
191
186
|
readonly type: Schema.Literal<"compute">;
|
|
192
187
|
readonly seconds: Schema.Number;
|
|
193
188
|
}>]>>;
|
|
194
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
195
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
196
|
-
readonly message: Schema.String;
|
|
197
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
198
|
-
}>>>;
|
|
199
189
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
200
190
|
readonly type: Schema.tag<"finish">;
|
|
201
191
|
}>;
|
|
@@ -254,11 +244,6 @@ declare const transcriptionEventTagged: Schema.toTaggedUnion<"type", readonly [S
|
|
|
254
244
|
readonly type: Schema.Literal<"compute">;
|
|
255
245
|
readonly seconds: Schema.Number;
|
|
256
246
|
}>]>>;
|
|
257
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
258
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
259
|
-
readonly message: Schema.String;
|
|
260
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
261
|
-
}>>>;
|
|
262
247
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
263
248
|
readonly type: Schema.tag<"finish">;
|
|
264
249
|
}>]>;
|
|
@@ -317,11 +302,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
317
302
|
readonly type: Schema.Literal<"compute">;
|
|
318
303
|
readonly seconds: Schema.Number;
|
|
319
304
|
}>]>>;
|
|
320
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
321
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
322
|
-
readonly message: Schema.String;
|
|
323
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
324
|
-
}>>>;
|
|
325
305
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
326
306
|
readonly type: Schema.tag<"finish">;
|
|
327
307
|
}>]> & {
|
|
@@ -363,11 +343,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
363
343
|
readonly type: Schema.Literal<"compute">;
|
|
364
344
|
readonly seconds: Schema.Number;
|
|
365
345
|
}>]>>;
|
|
366
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
367
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
368
|
-
readonly message: Schema.String;
|
|
369
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
370
|
-
}>>>;
|
|
371
346
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
372
347
|
readonly type: Schema.tag<"finish">;
|
|
373
348
|
}>;
|
|
@@ -396,14 +371,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
396
371
|
}>;
|
|
397
372
|
};
|
|
398
373
|
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: {
|
|
399
|
-
readonly type: "generation-queued";
|
|
400
|
-
readonly id: string;
|
|
401
|
-
readonly position?: number | undefined;
|
|
402
|
-
} | {
|
|
403
|
-
readonly type: "generation-progress";
|
|
404
|
-
readonly id: string;
|
|
405
|
-
readonly progress?: number | undefined;
|
|
406
|
-
} | {
|
|
407
374
|
readonly type: "text-delta";
|
|
408
375
|
readonly delta: string;
|
|
409
376
|
} | {
|
|
@@ -414,6 +381,14 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
414
381
|
readonly endSeconds: number;
|
|
415
382
|
readonly speaker?: string | undefined;
|
|
416
383
|
};
|
|
384
|
+
} | {
|
|
385
|
+
readonly type: "generation-queued";
|
|
386
|
+
readonly id: string;
|
|
387
|
+
readonly position?: number | undefined;
|
|
388
|
+
} | {
|
|
389
|
+
readonly type: "generation-progress";
|
|
390
|
+
readonly id: string;
|
|
391
|
+
readonly progress?: number | undefined;
|
|
417
392
|
} | {
|
|
418
393
|
readonly text: string;
|
|
419
394
|
readonly segments?: readonly {
|
|
@@ -432,14 +407,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
432
407
|
readonly language?: string | undefined;
|
|
433
408
|
readonly durationSeconds?: number | undefined;
|
|
434
409
|
readonly usage?: {
|
|
435
|
-
readonly type: "tokens";
|
|
436
|
-
readonly input?: number | undefined;
|
|
437
|
-
readonly output?: number | undefined;
|
|
438
|
-
readonly total?: number | undefined;
|
|
439
|
-
readonly details?: {
|
|
440
|
-
readonly [x: string]: unknown;
|
|
441
|
-
} | undefined;
|
|
442
|
-
} | {
|
|
443
410
|
readonly type: "seconds";
|
|
444
411
|
readonly seconds: number;
|
|
445
412
|
} | {
|
|
@@ -451,16 +418,15 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
451
418
|
} | {
|
|
452
419
|
readonly type: "compute";
|
|
453
420
|
readonly seconds: number;
|
|
454
|
-
} |
|
|
455
|
-
|
|
456
|
-
readonly
|
|
457
|
-
readonly
|
|
458
|
-
readonly
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
};
|
|
421
|
+
} | {
|
|
422
|
+
readonly type: "tokens";
|
|
423
|
+
readonly input?: number | undefined;
|
|
424
|
+
readonly output?: number | undefined;
|
|
425
|
+
readonly total?: number | undefined;
|
|
426
|
+
readonly details?: {
|
|
427
|
+
readonly [x: string]: unknown;
|
|
462
428
|
} | undefined;
|
|
463
|
-
}
|
|
429
|
+
} | undefined;
|
|
464
430
|
readonly providerMetadata?: {
|
|
465
431
|
readonly [x: string]: {
|
|
466
432
|
readonly [x: string]: unknown;
|
|
@@ -468,18 +434,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
468
434
|
} | undefined;
|
|
469
435
|
readonly type: "finish";
|
|
470
436
|
}) => value is Extract<{
|
|
471
|
-
readonly type: "generation-queued";
|
|
472
|
-
readonly id: string;
|
|
473
|
-
readonly position?: number | undefined;
|
|
474
|
-
}, {
|
|
475
|
-
readonly type: Keys;
|
|
476
|
-
}> | Extract<{
|
|
477
|
-
readonly type: "generation-progress";
|
|
478
|
-
readonly id: string;
|
|
479
|
-
readonly progress?: number | undefined;
|
|
480
|
-
}, {
|
|
481
|
-
readonly type: Keys;
|
|
482
|
-
}> | Extract<{
|
|
483
437
|
readonly type: "text-delta";
|
|
484
438
|
readonly delta: string;
|
|
485
439
|
}, {
|
|
@@ -494,6 +448,18 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
494
448
|
};
|
|
495
449
|
}, {
|
|
496
450
|
readonly type: Keys;
|
|
451
|
+
}> | Extract<{
|
|
452
|
+
readonly type: "generation-queued";
|
|
453
|
+
readonly id: string;
|
|
454
|
+
readonly position?: number | undefined;
|
|
455
|
+
}, {
|
|
456
|
+
readonly type: Keys;
|
|
457
|
+
}> | Extract<{
|
|
458
|
+
readonly type: "generation-progress";
|
|
459
|
+
readonly id: string;
|
|
460
|
+
readonly progress?: number | undefined;
|
|
461
|
+
}, {
|
|
462
|
+
readonly type: Keys;
|
|
497
463
|
}> | Extract<{
|
|
498
464
|
readonly text: string;
|
|
499
465
|
readonly segments?: readonly {
|
|
@@ -512,14 +478,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
512
478
|
readonly language?: string | undefined;
|
|
513
479
|
readonly durationSeconds?: number | undefined;
|
|
514
480
|
readonly usage?: {
|
|
515
|
-
readonly type: "tokens";
|
|
516
|
-
readonly input?: number | undefined;
|
|
517
|
-
readonly output?: number | undefined;
|
|
518
|
-
readonly total?: number | undefined;
|
|
519
|
-
readonly details?: {
|
|
520
|
-
readonly [x: string]: unknown;
|
|
521
|
-
} | undefined;
|
|
522
|
-
} | {
|
|
523
481
|
readonly type: "seconds";
|
|
524
482
|
readonly seconds: number;
|
|
525
483
|
} | {
|
|
@@ -531,16 +489,15 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
531
489
|
} | {
|
|
532
490
|
readonly type: "compute";
|
|
533
491
|
readonly seconds: number;
|
|
534
|
-
} |
|
|
535
|
-
|
|
536
|
-
readonly
|
|
537
|
-
readonly
|
|
538
|
-
readonly
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
};
|
|
492
|
+
} | {
|
|
493
|
+
readonly type: "tokens";
|
|
494
|
+
readonly input?: number | undefined;
|
|
495
|
+
readonly output?: number | undefined;
|
|
496
|
+
readonly total?: number | undefined;
|
|
497
|
+
readonly details?: {
|
|
498
|
+
readonly [x: string]: unknown;
|
|
542
499
|
} | undefined;
|
|
543
|
-
}
|
|
500
|
+
} | undefined;
|
|
544
501
|
readonly providerMetadata?: {
|
|
545
502
|
readonly [x: string]: {
|
|
546
503
|
readonly [x: string]: unknown;
|
|
@@ -569,14 +526,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
569
526
|
readonly language?: string | undefined;
|
|
570
527
|
readonly durationSeconds?: number | undefined;
|
|
571
528
|
readonly usage?: {
|
|
572
|
-
readonly type: "tokens";
|
|
573
|
-
readonly input?: number | undefined;
|
|
574
|
-
readonly output?: number | undefined;
|
|
575
|
-
readonly total?: number | undefined;
|
|
576
|
-
readonly details?: {
|
|
577
|
-
readonly [x: string]: unknown;
|
|
578
|
-
} | undefined;
|
|
579
|
-
} | {
|
|
580
529
|
readonly type: "seconds";
|
|
581
530
|
readonly seconds: number;
|
|
582
531
|
} | {
|
|
@@ -588,16 +537,15 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
588
537
|
} | {
|
|
589
538
|
readonly type: "compute";
|
|
590
539
|
readonly seconds: number;
|
|
591
|
-
} |
|
|
592
|
-
|
|
593
|
-
readonly
|
|
594
|
-
readonly
|
|
595
|
-
readonly
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
};
|
|
540
|
+
} | {
|
|
541
|
+
readonly type: "tokens";
|
|
542
|
+
readonly input?: number | undefined;
|
|
543
|
+
readonly output?: number | undefined;
|
|
544
|
+
readonly total?: number | undefined;
|
|
545
|
+
readonly details?: {
|
|
546
|
+
readonly [x: string]: unknown;
|
|
599
547
|
} | undefined;
|
|
600
|
-
}
|
|
548
|
+
} | undefined;
|
|
601
549
|
readonly providerMetadata?: {
|
|
602
550
|
readonly [x: string]: {
|
|
603
551
|
readonly [x: string]: unknown;
|
|
@@ -685,22 +633,9 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
685
633
|
readonly type: Schema.Literal<"compute">;
|
|
686
634
|
readonly seconds: Schema.Number;
|
|
687
635
|
}>]>>;
|
|
688
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
689
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
690
|
-
readonly message: Schema.String;
|
|
691
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
692
|
-
}>>>;
|
|
693
636
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
694
637
|
readonly type: Schema.tag<"finish">;
|
|
695
638
|
}> as M["Type"]["type"]]: (value: M["Type"]) => any; }>(value: {
|
|
696
|
-
readonly type: "generation-queued";
|
|
697
|
-
readonly id: string;
|
|
698
|
-
readonly position?: number | undefined;
|
|
699
|
-
} | {
|
|
700
|
-
readonly type: "generation-progress";
|
|
701
|
-
readonly id: string;
|
|
702
|
-
readonly progress?: number | undefined;
|
|
703
|
-
} | {
|
|
704
639
|
readonly type: "text-delta";
|
|
705
640
|
readonly delta: string;
|
|
706
641
|
} | {
|
|
@@ -711,6 +646,14 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
711
646
|
readonly endSeconds: number;
|
|
712
647
|
readonly speaker?: string | undefined;
|
|
713
648
|
};
|
|
649
|
+
} | {
|
|
650
|
+
readonly type: "generation-queued";
|
|
651
|
+
readonly id: string;
|
|
652
|
+
readonly position?: number | undefined;
|
|
653
|
+
} | {
|
|
654
|
+
readonly type: "generation-progress";
|
|
655
|
+
readonly id: string;
|
|
656
|
+
readonly progress?: number | undefined;
|
|
714
657
|
} | {
|
|
715
658
|
readonly text: string;
|
|
716
659
|
readonly segments?: readonly {
|
|
@@ -729,14 +672,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
729
672
|
readonly language?: string | undefined;
|
|
730
673
|
readonly durationSeconds?: number | undefined;
|
|
731
674
|
readonly usage?: {
|
|
732
|
-
readonly type: "tokens";
|
|
733
|
-
readonly input?: number | undefined;
|
|
734
|
-
readonly output?: number | undefined;
|
|
735
|
-
readonly total?: number | undefined;
|
|
736
|
-
readonly details?: {
|
|
737
|
-
readonly [x: string]: unknown;
|
|
738
|
-
} | undefined;
|
|
739
|
-
} | {
|
|
740
675
|
readonly type: "seconds";
|
|
741
676
|
readonly seconds: number;
|
|
742
677
|
} | {
|
|
@@ -748,16 +683,15 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
748
683
|
} | {
|
|
749
684
|
readonly type: "compute";
|
|
750
685
|
readonly seconds: number;
|
|
751
|
-
} |
|
|
752
|
-
|
|
753
|
-
readonly
|
|
754
|
-
readonly
|
|
755
|
-
readonly
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
};
|
|
686
|
+
} | {
|
|
687
|
+
readonly type: "tokens";
|
|
688
|
+
readonly input?: number | undefined;
|
|
689
|
+
readonly output?: number | undefined;
|
|
690
|
+
readonly total?: number | undefined;
|
|
691
|
+
readonly details?: {
|
|
692
|
+
readonly [x: string]: unknown;
|
|
759
693
|
} | undefined;
|
|
760
|
-
}
|
|
694
|
+
} | undefined;
|
|
761
695
|
readonly providerMetadata?: {
|
|
762
696
|
readonly [x: string]: {
|
|
763
697
|
readonly [x: string]: unknown;
|
|
@@ -820,22 +754,9 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
820
754
|
readonly type: Schema.Literal<"compute">;
|
|
821
755
|
readonly seconds: Schema.Number;
|
|
822
756
|
}>]>>;
|
|
823
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
824
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
825
|
-
readonly message: Schema.String;
|
|
826
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
827
|
-
}>>>;
|
|
828
757
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
829
758
|
readonly type: Schema.tag<"finish">;
|
|
830
759
|
}> as M["Type"]["type"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: {
|
|
831
|
-
readonly type: "generation-queued";
|
|
832
|
-
readonly id: string;
|
|
833
|
-
readonly position?: number | undefined;
|
|
834
|
-
} | {
|
|
835
|
-
readonly type: "generation-progress";
|
|
836
|
-
readonly id: string;
|
|
837
|
-
readonly progress?: number | undefined;
|
|
838
|
-
} | {
|
|
839
760
|
readonly type: "text-delta";
|
|
840
761
|
readonly delta: string;
|
|
841
762
|
} | {
|
|
@@ -846,6 +767,14 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
846
767
|
readonly endSeconds: number;
|
|
847
768
|
readonly speaker?: string | undefined;
|
|
848
769
|
};
|
|
770
|
+
} | {
|
|
771
|
+
readonly type: "generation-queued";
|
|
772
|
+
readonly id: string;
|
|
773
|
+
readonly position?: number | undefined;
|
|
774
|
+
} | {
|
|
775
|
+
readonly type: "generation-progress";
|
|
776
|
+
readonly id: string;
|
|
777
|
+
readonly progress?: number | undefined;
|
|
849
778
|
} | {
|
|
850
779
|
readonly text: string;
|
|
851
780
|
readonly segments?: readonly {
|
|
@@ -864,14 +793,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
864
793
|
readonly language?: string | undefined;
|
|
865
794
|
readonly durationSeconds?: number | undefined;
|
|
866
795
|
readonly usage?: {
|
|
867
|
-
readonly type: "tokens";
|
|
868
|
-
readonly input?: number | undefined;
|
|
869
|
-
readonly output?: number | undefined;
|
|
870
|
-
readonly total?: number | undefined;
|
|
871
|
-
readonly details?: {
|
|
872
|
-
readonly [x: string]: unknown;
|
|
873
|
-
} | undefined;
|
|
874
|
-
} | {
|
|
875
796
|
readonly type: "seconds";
|
|
876
797
|
readonly seconds: number;
|
|
877
798
|
} | {
|
|
@@ -883,16 +804,15 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
883
804
|
} | {
|
|
884
805
|
readonly type: "compute";
|
|
885
806
|
readonly seconds: number;
|
|
886
|
-
} |
|
|
887
|
-
|
|
888
|
-
readonly
|
|
889
|
-
readonly
|
|
890
|
-
readonly
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
};
|
|
807
|
+
} | {
|
|
808
|
+
readonly type: "tokens";
|
|
809
|
+
readonly input?: number | undefined;
|
|
810
|
+
readonly output?: number | undefined;
|
|
811
|
+
readonly total?: number | undefined;
|
|
812
|
+
readonly details?: {
|
|
813
|
+
readonly [x: string]: unknown;
|
|
894
814
|
} | undefined;
|
|
895
|
-
}
|
|
815
|
+
} | undefined;
|
|
896
816
|
readonly providerMetadata?: {
|
|
897
817
|
readonly [x: string]: {
|
|
898
818
|
readonly [x: string]: unknown;
|
|
@@ -957,22 +877,9 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
957
877
|
readonly type: Schema.Literal<"compute">;
|
|
958
878
|
readonly seconds: Schema.Number;
|
|
959
879
|
}>]>>;
|
|
960
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
961
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
962
|
-
readonly message: Schema.String;
|
|
963
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
964
|
-
}>>>;
|
|
965
880
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
966
881
|
readonly type: Schema.tag<"finish">;
|
|
967
882
|
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "segment" | "text-delta">]: never; }, OrElse extends (value: Exclude<{
|
|
968
|
-
readonly type: "generation-queued";
|
|
969
|
-
readonly id: string;
|
|
970
|
-
readonly position?: number | undefined;
|
|
971
|
-
} | {
|
|
972
|
-
readonly type: "generation-progress";
|
|
973
|
-
readonly id: string;
|
|
974
|
-
readonly progress?: number | undefined;
|
|
975
|
-
} | {
|
|
976
883
|
readonly type: "text-delta";
|
|
977
884
|
readonly delta: string;
|
|
978
885
|
} | {
|
|
@@ -983,6 +890,14 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
983
890
|
readonly endSeconds: number;
|
|
984
891
|
readonly speaker?: string | undefined;
|
|
985
892
|
};
|
|
893
|
+
} | {
|
|
894
|
+
readonly type: "generation-queued";
|
|
895
|
+
readonly id: string;
|
|
896
|
+
readonly position?: number | undefined;
|
|
897
|
+
} | {
|
|
898
|
+
readonly type: "generation-progress";
|
|
899
|
+
readonly id: string;
|
|
900
|
+
readonly progress?: number | undefined;
|
|
986
901
|
} | {
|
|
987
902
|
readonly text: string;
|
|
988
903
|
readonly segments?: readonly {
|
|
@@ -1001,14 +916,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1001
916
|
readonly language?: string | undefined;
|
|
1002
917
|
readonly durationSeconds?: number | undefined;
|
|
1003
918
|
readonly usage?: {
|
|
1004
|
-
readonly type: "tokens";
|
|
1005
|
-
readonly input?: number | undefined;
|
|
1006
|
-
readonly output?: number | undefined;
|
|
1007
|
-
readonly total?: number | undefined;
|
|
1008
|
-
readonly details?: {
|
|
1009
|
-
readonly [x: string]: unknown;
|
|
1010
|
-
} | undefined;
|
|
1011
|
-
} | {
|
|
1012
919
|
readonly type: "seconds";
|
|
1013
920
|
readonly seconds: number;
|
|
1014
921
|
} | {
|
|
@@ -1020,16 +927,15 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1020
927
|
} | {
|
|
1021
928
|
readonly type: "compute";
|
|
1022
929
|
readonly seconds: number;
|
|
1023
|
-
} |
|
|
1024
|
-
|
|
1025
|
-
readonly
|
|
1026
|
-
readonly
|
|
1027
|
-
readonly
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
};
|
|
930
|
+
} | {
|
|
931
|
+
readonly type: "tokens";
|
|
932
|
+
readonly input?: number | undefined;
|
|
933
|
+
readonly output?: number | undefined;
|
|
934
|
+
readonly total?: number | undefined;
|
|
935
|
+
readonly details?: {
|
|
936
|
+
readonly [x: string]: unknown;
|
|
1031
937
|
} | undefined;
|
|
1032
|
-
}
|
|
938
|
+
} | undefined;
|
|
1033
939
|
readonly providerMetadata?: {
|
|
1034
940
|
readonly [x: string]: {
|
|
1035
941
|
readonly [x: string]: unknown;
|
|
@@ -1037,14 +943,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1037
943
|
} | undefined;
|
|
1038
944
|
readonly type: "finish";
|
|
1039
945
|
}, { readonly [K in "type"]: keyof Cases; }>) => any>(value: {
|
|
1040
|
-
readonly type: "generation-queued";
|
|
1041
|
-
readonly id: string;
|
|
1042
|
-
readonly position?: number | undefined;
|
|
1043
|
-
} | {
|
|
1044
|
-
readonly type: "generation-progress";
|
|
1045
|
-
readonly id: string;
|
|
1046
|
-
readonly progress?: number | undefined;
|
|
1047
|
-
} | {
|
|
1048
946
|
readonly type: "text-delta";
|
|
1049
947
|
readonly delta: string;
|
|
1050
948
|
} | {
|
|
@@ -1055,6 +953,14 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1055
953
|
readonly endSeconds: number;
|
|
1056
954
|
readonly speaker?: string | undefined;
|
|
1057
955
|
};
|
|
956
|
+
} | {
|
|
957
|
+
readonly type: "generation-queued";
|
|
958
|
+
readonly id: string;
|
|
959
|
+
readonly position?: number | undefined;
|
|
960
|
+
} | {
|
|
961
|
+
readonly type: "generation-progress";
|
|
962
|
+
readonly id: string;
|
|
963
|
+
readonly progress?: number | undefined;
|
|
1058
964
|
} | {
|
|
1059
965
|
readonly text: string;
|
|
1060
966
|
readonly segments?: readonly {
|
|
@@ -1073,14 +979,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1073
979
|
readonly language?: string | undefined;
|
|
1074
980
|
readonly durationSeconds?: number | undefined;
|
|
1075
981
|
readonly usage?: {
|
|
1076
|
-
readonly type: "tokens";
|
|
1077
|
-
readonly input?: number | undefined;
|
|
1078
|
-
readonly output?: number | undefined;
|
|
1079
|
-
readonly total?: number | undefined;
|
|
1080
|
-
readonly details?: {
|
|
1081
|
-
readonly [x: string]: unknown;
|
|
1082
|
-
} | undefined;
|
|
1083
|
-
} | {
|
|
1084
982
|
readonly type: "seconds";
|
|
1085
983
|
readonly seconds: number;
|
|
1086
984
|
} | {
|
|
@@ -1092,16 +990,15 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1092
990
|
} | {
|
|
1093
991
|
readonly type: "compute";
|
|
1094
992
|
readonly seconds: number;
|
|
1095
|
-
} |
|
|
1096
|
-
|
|
1097
|
-
readonly
|
|
1098
|
-
readonly
|
|
1099
|
-
readonly
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
};
|
|
993
|
+
} | {
|
|
994
|
+
readonly type: "tokens";
|
|
995
|
+
readonly input?: number | undefined;
|
|
996
|
+
readonly output?: number | undefined;
|
|
997
|
+
readonly total?: number | undefined;
|
|
998
|
+
readonly details?: {
|
|
999
|
+
readonly [x: string]: unknown;
|
|
1103
1000
|
} | undefined;
|
|
1104
|
-
}
|
|
1001
|
+
} | undefined;
|
|
1105
1002
|
readonly providerMetadata?: {
|
|
1106
1003
|
readonly [x: string]: {
|
|
1107
1004
|
readonly [x: string]: unknown;
|
|
@@ -1164,22 +1061,9 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1164
1061
|
readonly type: Schema.Literal<"compute">;
|
|
1165
1062
|
readonly seconds: Schema.Number;
|
|
1166
1063
|
}>]>>;
|
|
1167
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1168
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
1169
|
-
readonly message: Schema.String;
|
|
1170
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1171
|
-
}>>>;
|
|
1172
1064
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1173
1065
|
readonly type: Schema.tag<"finish">;
|
|
1174
1066
|
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "segment" | "text-delta">]: never; }, OrElse extends (value: Exclude<{
|
|
1175
|
-
readonly type: "generation-queued";
|
|
1176
|
-
readonly id: string;
|
|
1177
|
-
readonly position?: number | undefined;
|
|
1178
|
-
} | {
|
|
1179
|
-
readonly type: "generation-progress";
|
|
1180
|
-
readonly id: string;
|
|
1181
|
-
readonly progress?: number | undefined;
|
|
1182
|
-
} | {
|
|
1183
1067
|
readonly type: "text-delta";
|
|
1184
1068
|
readonly delta: string;
|
|
1185
1069
|
} | {
|
|
@@ -1190,6 +1074,14 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1190
1074
|
readonly endSeconds: number;
|
|
1191
1075
|
readonly speaker?: string | undefined;
|
|
1192
1076
|
};
|
|
1077
|
+
} | {
|
|
1078
|
+
readonly type: "generation-queued";
|
|
1079
|
+
readonly id: string;
|
|
1080
|
+
readonly position?: number | undefined;
|
|
1081
|
+
} | {
|
|
1082
|
+
readonly type: "generation-progress";
|
|
1083
|
+
readonly id: string;
|
|
1084
|
+
readonly progress?: number | undefined;
|
|
1193
1085
|
} | {
|
|
1194
1086
|
readonly text: string;
|
|
1195
1087
|
readonly segments?: readonly {
|
|
@@ -1208,14 +1100,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1208
1100
|
readonly language?: string | undefined;
|
|
1209
1101
|
readonly durationSeconds?: number | undefined;
|
|
1210
1102
|
readonly usage?: {
|
|
1211
|
-
readonly type: "tokens";
|
|
1212
|
-
readonly input?: number | undefined;
|
|
1213
|
-
readonly output?: number | undefined;
|
|
1214
|
-
readonly total?: number | undefined;
|
|
1215
|
-
readonly details?: {
|
|
1216
|
-
readonly [x: string]: unknown;
|
|
1217
|
-
} | undefined;
|
|
1218
|
-
} | {
|
|
1219
1103
|
readonly type: "seconds";
|
|
1220
1104
|
readonly seconds: number;
|
|
1221
1105
|
} | {
|
|
@@ -1227,16 +1111,15 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1227
1111
|
} | {
|
|
1228
1112
|
readonly type: "compute";
|
|
1229
1113
|
readonly seconds: number;
|
|
1230
|
-
} |
|
|
1231
|
-
|
|
1232
|
-
readonly
|
|
1233
|
-
readonly
|
|
1234
|
-
readonly
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
};
|
|
1114
|
+
} | {
|
|
1115
|
+
readonly type: "tokens";
|
|
1116
|
+
readonly input?: number | undefined;
|
|
1117
|
+
readonly output?: number | undefined;
|
|
1118
|
+
readonly total?: number | undefined;
|
|
1119
|
+
readonly details?: {
|
|
1120
|
+
readonly [x: string]: unknown;
|
|
1238
1121
|
} | undefined;
|
|
1239
|
-
}
|
|
1122
|
+
} | undefined;
|
|
1240
1123
|
readonly providerMetadata?: {
|
|
1241
1124
|
readonly [x: string]: {
|
|
1242
1125
|
readonly [x: string]: unknown;
|
|
@@ -1244,14 +1127,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1244
1127
|
} | undefined;
|
|
1245
1128
|
readonly type: "finish";
|
|
1246
1129
|
}, { readonly [K in "type"]: keyof Cases; }>) => any>(cases: Cases, orElse: OrElse): (value: {
|
|
1247
|
-
readonly type: "generation-queued";
|
|
1248
|
-
readonly id: string;
|
|
1249
|
-
readonly position?: number | undefined;
|
|
1250
|
-
} | {
|
|
1251
|
-
readonly type: "generation-progress";
|
|
1252
|
-
readonly id: string;
|
|
1253
|
-
readonly progress?: number | undefined;
|
|
1254
|
-
} | {
|
|
1255
1130
|
readonly type: "text-delta";
|
|
1256
1131
|
readonly delta: string;
|
|
1257
1132
|
} | {
|
|
@@ -1262,6 +1137,14 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1262
1137
|
readonly endSeconds: number;
|
|
1263
1138
|
readonly speaker?: string | undefined;
|
|
1264
1139
|
};
|
|
1140
|
+
} | {
|
|
1141
|
+
readonly type: "generation-queued";
|
|
1142
|
+
readonly id: string;
|
|
1143
|
+
readonly position?: number | undefined;
|
|
1144
|
+
} | {
|
|
1145
|
+
readonly type: "generation-progress";
|
|
1146
|
+
readonly id: string;
|
|
1147
|
+
readonly progress?: number | undefined;
|
|
1265
1148
|
} | {
|
|
1266
1149
|
readonly text: string;
|
|
1267
1150
|
readonly segments?: readonly {
|
|
@@ -1280,14 +1163,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1280
1163
|
readonly language?: string | undefined;
|
|
1281
1164
|
readonly durationSeconds?: number | undefined;
|
|
1282
1165
|
readonly usage?: {
|
|
1283
|
-
readonly type: "tokens";
|
|
1284
|
-
readonly input?: number | undefined;
|
|
1285
|
-
readonly output?: number | undefined;
|
|
1286
|
-
readonly total?: number | undefined;
|
|
1287
|
-
readonly details?: {
|
|
1288
|
-
readonly [x: string]: unknown;
|
|
1289
|
-
} | undefined;
|
|
1290
|
-
} | {
|
|
1291
1166
|
readonly type: "seconds";
|
|
1292
1167
|
readonly seconds: number;
|
|
1293
1168
|
} | {
|
|
@@ -1299,16 +1174,15 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1299
1174
|
} | {
|
|
1300
1175
|
readonly type: "compute";
|
|
1301
1176
|
readonly seconds: number;
|
|
1302
|
-
} |
|
|
1303
|
-
|
|
1304
|
-
readonly
|
|
1305
|
-
readonly
|
|
1306
|
-
readonly
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
};
|
|
1177
|
+
} | {
|
|
1178
|
+
readonly type: "tokens";
|
|
1179
|
+
readonly input?: number | undefined;
|
|
1180
|
+
readonly output?: number | undefined;
|
|
1181
|
+
readonly total?: number | undefined;
|
|
1182
|
+
readonly details?: {
|
|
1183
|
+
readonly [x: string]: unknown;
|
|
1310
1184
|
} | undefined;
|
|
1311
|
-
}
|
|
1185
|
+
} | undefined;
|
|
1312
1186
|
readonly providerMetadata?: {
|
|
1313
1187
|
readonly [x: string]: {
|
|
1314
1188
|
readonly [x: string]: unknown;
|
|
@@ -1360,14 +1234,6 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1360
1234
|
readonly language?: string | undefined;
|
|
1361
1235
|
readonly durationSeconds?: number | undefined;
|
|
1362
1236
|
readonly usage?: {
|
|
1363
|
-
readonly type: "tokens";
|
|
1364
|
-
readonly input?: number | undefined;
|
|
1365
|
-
readonly output?: number | undefined;
|
|
1366
|
-
readonly total?: number | undefined;
|
|
1367
|
-
readonly details?: {
|
|
1368
|
-
readonly [x: string]: unknown;
|
|
1369
|
-
} | undefined;
|
|
1370
|
-
} | {
|
|
1371
1237
|
readonly type: "seconds";
|
|
1372
1238
|
readonly seconds: number;
|
|
1373
1239
|
} | {
|
|
@@ -1379,16 +1245,15 @@ export declare const TranscriptionEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1379
1245
|
} | {
|
|
1380
1246
|
readonly type: "compute";
|
|
1381
1247
|
readonly seconds: number;
|
|
1382
|
-
} |
|
|
1383
|
-
|
|
1384
|
-
readonly
|
|
1385
|
-
readonly
|
|
1386
|
-
readonly
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
};
|
|
1248
|
+
} | {
|
|
1249
|
+
readonly type: "tokens";
|
|
1250
|
+
readonly input?: number | undefined;
|
|
1251
|
+
readonly output?: number | undefined;
|
|
1252
|
+
readonly total?: number | undefined;
|
|
1253
|
+
readonly details?: {
|
|
1254
|
+
readonly [x: string]: unknown;
|
|
1390
1255
|
} | undefined;
|
|
1391
|
-
}
|
|
1256
|
+
} | undefined;
|
|
1392
1257
|
readonly providerMetadata?: {
|
|
1393
1258
|
readonly [x: string]: {
|
|
1394
1259
|
readonly [x: string]: unknown;
|