@mux/ai 0.31.0 → 0.33.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 +37 -12
- package/dist/{index-ooikuED7.d.ts → index-Chccb380.d.ts} +46 -16
- package/dist/{index-CJtQiGj7.d.ts → index-SjpXUdXl.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +490 -157
- package/dist/index.js.map +1 -1
- package/dist/primitives/index.d.ts +2 -2
- package/dist/primitives/index.js +45 -3
- package/dist/primitives/index.js.map +1 -1
- package/dist/{shots-Bh0GrvLx.d.ts → shots-BMbViFbZ.d.ts} +12 -0
- package/dist/workflows/index.d.ts +2 -2
- package/dist/workflows/index.js +487 -156
- package/dist/workflows/index.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@mux/ai)
|
|
4
4
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
5
5
|
|
|
6
|
-
Easy to use, purpose-driven, cost effective, configurable **_workflow functions_** in a TypeScript SDK for building AI-powered video and audio workflows on the server, powered by [Mux](https://www.mux.com), with support for popular AI/LLM providers (OpenAI, Anthropic, Google).
|
|
6
|
+
Easy to use, purpose-driven, cost effective, configurable **_workflow functions_** in a TypeScript SDK for building AI-powered video and audio workflows on the server, powered by [Mux](https://www.mux.com), with support for popular AI/LLM providers (OpenAI, Anthropic, Google, Baseten, and any OpenAI-compatible endpoint).
|
|
7
7
|
|
|
8
8
|
- **Examples:** [`getSummaryAndTags`](#video-summarization), [`getModerationScores`](#content-moderation), [`hasBurnedInCaptions`](#burned-in-caption-detection), [`generateChapters`](#chapter-generation), [`generateEmbeddings`](#search-with-embeddings), [`generateEngagementInsights`](#engagement-insights), [`translateCaptions`](#caption-translation), [`editCaptions`](#caption-editing), [`translateAudio`](#audio-dubbing)
|
|
9
9
|
- Workflows automatically ship with `"use workflow"` [compatability with Workflow DevKit](#compatability-with-workflow-devkit)
|
|
@@ -25,7 +25,7 @@ Add your credentials to a `.env` file (we support [dotenv](https://www.npmjs.com
|
|
|
25
25
|
```bash
|
|
26
26
|
MUX_TOKEN_ID=your_mux_token_id
|
|
27
27
|
MUX_TOKEN_SECRET=your_mux_token_secret
|
|
28
|
-
OPENAI_API_KEY=your_openai_api_key # or ANTHROPIC_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY
|
|
28
|
+
OPENAI_API_KEY=your_openai_api_key # or ANTHROPIC_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, BASETEN_API_KEY
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
You only need credentials for the AI provider you're using. See the [Credentials guide](./docs/CREDENTIALS.md) for full setup details including signed playback, S3 storage, and all supported providers.
|
|
@@ -54,9 +54,9 @@ console.log(result.tags); // ["typescript", "tutorial", "programming"]
|
|
|
54
54
|
|
|
55
55
|
- **Pre-built workflows for media AI tasks.** Common multi-step operations (transcript access, frame analysis, LLM calls, and structured parsing) are available as high-level functions.
|
|
56
56
|
- **Support for video and audio assets.** The same workflows work with video and [audio-only assets](./docs/AUDIO-ONLY.md), including summarization, moderation, chaptering, and more.
|
|
57
|
-
- **Provider-flexible API.** Choose OpenAI, Anthropic, or
|
|
57
|
+
- **Provider-flexible API.** Choose OpenAI, Anthropic, Google, Baseten, or any OpenAI-compatible endpoint through workflow options while keeping the same workflow interface.
|
|
58
58
|
- **Published evaluation coverage.** Workflows include [evals](./docs/EVALS.md) for quality, latency, and cost, with results [published publicly](https://evaluating-mux-ai.vercel.app/) on pushes to `main`.
|
|
59
|
-
- **Sensible default models.** Defaults (`gpt-5.6-luna` at medium reasoning, `claude-sonnet-4-5`, `gemini-3-flash-preview`) are selected to balance output quality and runtime cost.
|
|
59
|
+
- **Sensible default models.** Defaults (`gpt-5.6-luna` at medium reasoning, `claude-sonnet-4-5`, `gemini-3-flash-preview`) are selected to balance output quality and runtime cost. Baseten and OpenAI-compatible endpoints serve user-deployed models, so they use an explicit `model` or the `BASETEN_MODEL`/`OPENAI_COMPATIBLE_MODEL` environment variables.
|
|
60
60
|
- **Typed end-to-end.** Workflow inputs, options, and outputs are fully typed in TypeScript.
|
|
61
61
|
- **Operational defaults included.** Retry handling, error handling, signed playback support, and [Workflow DevKit](https://useworkflow.dev) compatibility are built in.
|
|
62
62
|
- **Prompt customization support.** Use `promptOverrides` to adjust sections of workflow prompts for your domain or product requirements.
|
|
@@ -68,14 +68,14 @@ Workflows are high-level functions that handle complete media AI tasks end-to-en
|
|
|
68
68
|
|
|
69
69
|
| Workflow | What it does | Providers | Audio-only |
|
|
70
70
|
| --- | --- | --- | :---: |
|
|
71
|
-
| [`getSummaryAndTags`](./docs/WORKFLOWS.md#video-summarization) | Generate titles, descriptions, and tags | OpenAI, Anthropic, Google | Yes |
|
|
71
|
+
| [`getSummaryAndTags`](./docs/WORKFLOWS.md#video-summarization) | Generate titles, descriptions, and tags | OpenAI, Anthropic, Google, Baseten, OpenAI-compatible | Yes |
|
|
72
72
|
| [`getModerationScores`](./docs/WORKFLOWS.md#content-moderation) | Detect inappropriate content | OpenAI, Hive, Google Vision | Yes |
|
|
73
|
-
| [`hasBurnedInCaptions`](./docs/WORKFLOWS.md#burned-in-caption-detection) | Detect hardcoded subtitles in video frames | OpenAI, Anthropic, Google | — |
|
|
74
|
-
| [`askQuestions`](./docs/WORKFLOWS.md#ask-questions) | Answer yes/no questions about asset content | OpenAI, Anthropic, Google | Yes |
|
|
75
|
-
| [`generateChapters`](./docs/WORKFLOWS.md#chapter-generation) | Create chapter markers from transcripts | OpenAI, Anthropic, Google | Yes |
|
|
76
|
-
| [`generateEmbeddings`](./docs/WORKFLOWS.md#embeddings) | Generate vector embeddings for semantic search | OpenAI, Google | Yes |
|
|
77
|
-
| [`translateCaptions`](./docs/WORKFLOWS.md#caption-translation) | Translate captions into other languages | OpenAI, Anthropic, Google | Yes |
|
|
78
|
-
| [`editCaptions`](./docs/WORKFLOWS.md#caption-editing) | Edit captions: censor profanity and/or apply static replacements | OpenAI, Anthropic, Google | Yes |
|
|
73
|
+
| [`hasBurnedInCaptions`](./docs/WORKFLOWS.md#burned-in-caption-detection) | Detect hardcoded subtitles in video frames | OpenAI, Anthropic, Google, Baseten, OpenAI-compatible | — |
|
|
74
|
+
| [`askQuestions`](./docs/WORKFLOWS.md#ask-questions) | Answer yes/no questions about asset content | OpenAI, Anthropic, Google, Baseten, OpenAI-compatible | Yes |
|
|
75
|
+
| [`generateChapters`](./docs/WORKFLOWS.md#chapter-generation) | Create chapter markers from transcripts | OpenAI, Anthropic, Google, Baseten, OpenAI-compatible | Yes |
|
|
76
|
+
| [`generateEmbeddings`](./docs/WORKFLOWS.md#embeddings) | Generate vector embeddings for semantic search | OpenAI, Google, Baseten, OpenAI-compatible | Yes |
|
|
77
|
+
| [`translateCaptions`](./docs/WORKFLOWS.md#caption-translation) | Translate captions into other languages | OpenAI, Anthropic, Google, Baseten, OpenAI-compatible | Yes |
|
|
78
|
+
| [`editCaptions`](./docs/WORKFLOWS.md#caption-editing) | Edit captions: censor profanity and/or apply static replacements | OpenAI, Anthropic, Google, Baseten, OpenAI-compatible | Yes |
|
|
79
79
|
| [`translateAudio`](./docs/WORKFLOWS.md#audio-dubbing) | Create AI-dubbed audio tracks | ElevenLabs | Yes |
|
|
80
80
|
|
|
81
81
|
See the [Workflows guide](./docs/WORKFLOWS.md) for detailed documentation, options, and examples for each workflow. See the [API Reference](./docs/API.md) for complete parameter and return type details.
|
|
@@ -145,6 +145,31 @@ for (const chunk of result.chunks) {
|
|
|
145
145
|
}
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
+
**Baseten provider:**
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
BASETEN_API_KEY=your_baseten_api_key
|
|
152
|
+
BASETEN_MODEL=your-language-model-id
|
|
153
|
+
BASETEN_URL=https://model-id.api.baseten.co/environments/production/sync/v1
|
|
154
|
+
BASETEN_EMBEDDING_MODEL=your-embedding-model-id
|
|
155
|
+
BASETEN_EMBEDDING_URL=https://model-id.api.baseten.co/environments/production/sync
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Omit `BASETEN_URL` to use Baseten's shared [Model APIs](https://docs.baseten.co/development/model-apis/overview); for a dedicated deployment, set it to the deployment's `/sync/v1` URL. Embeddings always run against a dedicated deployment, so `BASETEN_EMBEDDING_URL` (its `/sync` or `/sync/v1` URL) is required.
|
|
159
|
+
|
|
160
|
+
**OpenAI-compatible provider:**
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
OPENAI_COMPATIBLE_BASE_URL=https://my-endpoint.example.com/v1
|
|
164
|
+
OPENAI_COMPATIBLE_API_KEY=optional-api-key
|
|
165
|
+
OPENAI_COMPATIBLE_MODEL=your-language-model-id
|
|
166
|
+
OPENAI_COMPATIBLE_EMBEDDING_MODEL=your-embedding-model-id
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Use `provider: "openai-compatible"` with any endpoint that speaks the OpenAI API protocol — vLLM, Ollama, Together AI, Fireworks, OpenRouter, or a self-hosted gateway. `OPENAI_COMPATIBLE_API_KEY` is optional for endpoints that don't require authentication, and `OPENAI_COMPATIBLE_EMBEDDING_BASE_URL` can point embeddings at a separate endpoint (defaults to the shared base URL). Workflows request schema-constrained output (`response_format: json_schema`), so the endpoint must support structured outputs.
|
|
170
|
+
|
|
171
|
+
For both providers, workflows that analyze storyboards or frames (such as `getSummaryAndTags`, `hasBurnedInCaptions`, and `askQuestions`) require the deployed model to be vision-capable. See [Vision-Capable Models](./docs/VISION-MODELS.md) for known-good models and how to verify one.
|
|
172
|
+
|
|
148
173
|
## Prompt Customization
|
|
149
174
|
|
|
150
175
|
Every workflow prompt is built from a structured template of named sections. The `promptOverrides` option lets you swap out individual sections with your own instructions while keeping the battle-tested defaults for everything else — no need to rewrite entire prompts.
|
|
@@ -164,7 +189,7 @@ This works with `getSummaryAndTags`, `generateChapters`, and `hasBurnedInCaption
|
|
|
164
189
|
|
|
165
190
|
## Evaluations
|
|
166
191
|
|
|
167
|
-
Choosing between OpenAI, Anthropic, and Google for a given workflow isn't guesswork. Every workflow in `@mux/ai` ships with eval coverage that benchmarks providers and models against three dimensions
|
|
192
|
+
Choosing between OpenAI, Anthropic, and Google for a given workflow isn't guesswork. Every workflow in `@mux/ai` ships with eval coverage that benchmarks those providers and models against three dimensions. Baseten and generic OpenAI-compatible endpoints serve user-deployed models, so they are supported at runtime but intentionally skipped by eval runs.
|
|
168
193
|
|
|
169
194
|
- **Efficacy** — Does it produce accurate, high-quality results?
|
|
170
195
|
- **Efficiency** — How fast is it and how many tokens does it consume?
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { createAnthropic } from '@ai-sdk/anthropic';
|
|
3
3
|
import { createGoogleGenerativeAI } from '@ai-sdk/google';
|
|
4
4
|
import { createOpenAI } from '@ai-sdk/openai';
|
|
5
|
-
import { f as ScopedMuxAIOptions, I as ImageSubmissionMode, i as TokenUsage, M as MuxAIOptions, b as ChunkingStrategy, k as VideoEmbeddingsResult, H as Hotspot, v as Shot, j as ToneType, g as StorageAdapter } from './shots-
|
|
5
|
+
import { f as ScopedMuxAIOptions, I as ImageSubmissionMode, i as TokenUsage, M as MuxAIOptions, b as ChunkingStrategy, k as VideoEmbeddingsResult, H as Hotspot, v as Shot, j as ToneType, g as StorageAdapter } from './shots-BMbViFbZ.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Language Code Conversion Utilities
|
|
@@ -232,21 +232,25 @@ interface SafetyReport {
|
|
|
232
232
|
scrubbedFields: ScrubbedFieldReport[];
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
type SupportedProvider = "openai" | "anthropic" | "google";
|
|
236
|
-
type SupportedEmbeddingProvider = "openai" | "google";
|
|
235
|
+
type SupportedProvider = "openai" | "anthropic" | "google" | "baseten" | "openai-compatible";
|
|
236
|
+
type SupportedEmbeddingProvider = "openai" | "google" | "baseten" | "openai-compatible";
|
|
237
237
|
type OpenAIModelId = Parameters<ReturnType<typeof createOpenAI>["chat"]>[0];
|
|
238
238
|
type AnthropicModelId = Parameters<ReturnType<typeof createAnthropic>["chat"]>[0];
|
|
239
239
|
type GoogleModelId = Parameters<ReturnType<typeof createGoogleGenerativeAI>["chat"]>[0];
|
|
240
240
|
type OpenAIEmbeddingModelId = Parameters<ReturnType<typeof createOpenAI>["embedding"]>[0];
|
|
241
241
|
type GoogleEmbeddingModelId = Parameters<ReturnType<typeof createGoogleGenerativeAI>["textEmbeddingModel"]>[0];
|
|
242
242
|
interface ModelIdByProvider {
|
|
243
|
-
openai: OpenAIModelId;
|
|
244
|
-
anthropic: AnthropicModelId;
|
|
245
|
-
google: GoogleModelId;
|
|
243
|
+
"openai": OpenAIModelId;
|
|
244
|
+
"anthropic": AnthropicModelId;
|
|
245
|
+
"google": GoogleModelId;
|
|
246
|
+
"baseten": string;
|
|
247
|
+
"openai-compatible": string;
|
|
246
248
|
}
|
|
247
249
|
interface EmbeddingModelIdByProvider {
|
|
248
|
-
openai: OpenAIEmbeddingModelId;
|
|
249
|
-
google: GoogleEmbeddingModelId;
|
|
250
|
+
"openai": OpenAIEmbeddingModelId;
|
|
251
|
+
"google": GoogleEmbeddingModelId;
|
|
252
|
+
"baseten": string;
|
|
253
|
+
"openai-compatible": string;
|
|
250
254
|
}
|
|
251
255
|
|
|
252
256
|
/**
|
|
@@ -395,16 +399,16 @@ declare const questionAnswerSchema: z.ZodObject<{
|
|
|
395
399
|
reasoning: z.ZodString;
|
|
396
400
|
skipped: z.ZodBoolean;
|
|
397
401
|
}, "strip", z.ZodTypeAny, {
|
|
402
|
+
reasoning: string;
|
|
398
403
|
question: string;
|
|
399
404
|
answer: string | null;
|
|
400
405
|
confidence: number;
|
|
401
|
-
reasoning: string;
|
|
402
406
|
skipped: boolean;
|
|
403
407
|
}, {
|
|
408
|
+
reasoning: string;
|
|
404
409
|
question: string;
|
|
405
410
|
answer: string | null;
|
|
406
411
|
confidence: number;
|
|
407
|
-
reasoning: string;
|
|
408
412
|
skipped: boolean;
|
|
409
413
|
}>;
|
|
410
414
|
type QuestionAnswerType = z.infer<typeof questionAnswerSchema>;
|
|
@@ -422,32 +426,32 @@ declare function createAskQuestionsSchema(answerSchema: z.ZodType<string>): z.Zo
|
|
|
422
426
|
} & {
|
|
423
427
|
answer: z.ZodType<string, z.ZodTypeDef, string>;
|
|
424
428
|
}, "strip", z.ZodTypeAny, {
|
|
429
|
+
reasoning: string;
|
|
425
430
|
question: string;
|
|
426
431
|
answer: string;
|
|
427
432
|
confidence: number;
|
|
428
|
-
reasoning: string;
|
|
429
433
|
skipped: boolean;
|
|
430
434
|
}, {
|
|
435
|
+
reasoning: string;
|
|
431
436
|
question: string;
|
|
432
437
|
answer: string;
|
|
433
438
|
confidence: number;
|
|
434
|
-
reasoning: string;
|
|
435
439
|
skipped: boolean;
|
|
436
440
|
}>, "many">;
|
|
437
441
|
}, "strip", z.ZodTypeAny, {
|
|
438
442
|
answers: {
|
|
443
|
+
reasoning: string;
|
|
439
444
|
question: string;
|
|
440
445
|
answer: string;
|
|
441
446
|
confidence: number;
|
|
442
|
-
reasoning: string;
|
|
443
447
|
skipped: boolean;
|
|
444
448
|
}[];
|
|
445
449
|
}, {
|
|
446
450
|
answers: {
|
|
451
|
+
reasoning: string;
|
|
447
452
|
question: string;
|
|
448
453
|
answer: string;
|
|
449
454
|
confidence: number;
|
|
450
|
-
reasoning: string;
|
|
451
455
|
skipped: boolean;
|
|
452
456
|
}[];
|
|
453
457
|
}>;
|
|
@@ -1345,6 +1349,12 @@ interface TranslationResult {
|
|
|
1345
1349
|
* `scrubbedFields` to know which cues were affected.
|
|
1346
1350
|
*/
|
|
1347
1351
|
safety?: SafetyReport;
|
|
1352
|
+
/**
|
|
1353
|
+
* Present when `neverTranslate` terms were supplied; `false` when any
|
|
1354
|
+
* term appears fewer times verbatim in the translated cue text than in
|
|
1355
|
+
* the source. Enforcement is prompt-based — verified, not guaranteed.
|
|
1356
|
+
*/
|
|
1357
|
+
neverTranslateTermsPreserved?: boolean;
|
|
1348
1358
|
}
|
|
1349
1359
|
/** Configuration accepted by `translateCaptions`. */
|
|
1350
1360
|
interface TranslationOptions<P extends SupportedProvider = SupportedProvider> extends MuxAIOptions {
|
|
@@ -1382,6 +1392,12 @@ interface TranslationOptions<P extends SupportedProvider = SupportedProvider> ex
|
|
|
1382
1392
|
* cue count and text token budget, then rebuilds the final VTT locally.
|
|
1383
1393
|
*/
|
|
1384
1394
|
chunking?: TranslationChunkingOptions;
|
|
1395
|
+
/**
|
|
1396
|
+
* Terms (brand names, proper nouns) to preserve verbatim in the
|
|
1397
|
+
* translated output. Max 100 terms of 100 characters each. Terms reach
|
|
1398
|
+
* the model prompt — partly trusted input, see docs/SECURITY.md.
|
|
1399
|
+
*/
|
|
1400
|
+
neverTranslate?: string[];
|
|
1385
1401
|
}
|
|
1386
1402
|
interface TranslationChunkingOptions {
|
|
1387
1403
|
/** Set to false to translate all cues in a single structured request. Defaults to true. */
|
|
@@ -1416,6 +1432,18 @@ declare const translationSchema: z.ZodObject<{
|
|
|
1416
1432
|
}>;
|
|
1417
1433
|
/** Inferred shape returned by `translationSchema`. */
|
|
1418
1434
|
type TranslationPayload = z.infer<typeof translationSchema>;
|
|
1435
|
+
/**
|
|
1436
|
+
* Trims, dedupes, and caps `neverTranslate` terms. The caps bound the
|
|
1437
|
+
* prompt-injection surface (see docs/SECURITY.md).
|
|
1438
|
+
*/
|
|
1439
|
+
declare function validateNeverTranslateTerms(terms: string[]): string[];
|
|
1440
|
+
/**
|
|
1441
|
+
* Compares cue text only: source occurrences count case-insensitively,
|
|
1442
|
+
* translated occurrences must be verbatim. Validation guarantees terms
|
|
1443
|
+
* are NFKC-stable, so they match identically in the sanitised cue text
|
|
1444
|
+
* parseVTTCues produces — the same text the model sees.
|
|
1445
|
+
*/
|
|
1446
|
+
declare function verifyNeverTranslateTerms(terms: string[], sourceVtt: string, translatedVtt: string): boolean;
|
|
1419
1447
|
|
|
1420
1448
|
declare function shouldSplitChunkTranslationError(error: unknown): boolean;
|
|
1421
1449
|
/**
|
|
@@ -1539,8 +1567,10 @@ declare const index_transformCueText: typeof transformCueText;
|
|
|
1539
1567
|
declare const index_translateAudio: typeof translateAudio;
|
|
1540
1568
|
declare const index_translateCaptions: typeof translateCaptions;
|
|
1541
1569
|
declare const index_translationSchema: typeof translationSchema;
|
|
1570
|
+
declare const index_validateNeverTranslateTerms: typeof validateNeverTranslateTerms;
|
|
1571
|
+
declare const index_verifyNeverTranslateTerms: typeof verifyNeverTranslateTerms;
|
|
1542
1572
|
declare namespace index {
|
|
1543
|
-
export { index_ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH as ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH, index_ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH as ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH, index_ASK_QUESTIONS_MAX_QUESTION_LENGTH as ASK_QUESTIONS_MAX_QUESTION_LENGTH, type index_AskQuestionsOptions as AskQuestionsOptions, type index_AskQuestionsResult as AskQuestionsResult, type index_AskQuestionsType as AskQuestionsType, type index_AudioTranslationOptions as AudioTranslationOptions, type index_AudioTranslationResult as AudioTranslationResult, type index_AutoCensorProfanityOptions as AutoCensorProfanityOptions, type index_BurnedInCaptionsAnalysis as BurnedInCaptionsAnalysis, type index_BurnedInCaptionsOptions as BurnedInCaptionsOptions, type index_BurnedInCaptionsPromptOverrides as BurnedInCaptionsPromptOverrides, type index_BurnedInCaptionsPromptSections as BurnedInCaptionsPromptSections, type index_BurnedInCaptionsResult as BurnedInCaptionsResult, type index_CaptionReplacement as CaptionReplacement, type index_CensorMode as CensorMode, type index_Chapter as Chapter, type index_ChapterSystemPromptSections as ChapterSystemPromptSections, type index_ChaptersOptions as ChaptersOptions, type index_ChaptersPromptOverrides as ChaptersPromptOverrides, type index_ChaptersPromptSections as ChaptersPromptSections, type index_ChaptersResult as ChaptersResult, type index_ChaptersType as ChaptersType, index_DEFAULT_DESCRIPTION_LENGTH as DEFAULT_DESCRIPTION_LENGTH, index_DEFAULT_SUMMARY_KEYWORD_LIMIT as DEFAULT_SUMMARY_KEYWORD_LIMIT, index_DEFAULT_TITLE_LENGTH as DEFAULT_TITLE_LENGTH, type index_EditCaptionsOptions as EditCaptionsOptions, type index_EditCaptionsResult as EditCaptionsResult, type index_EmbeddingsOptions as EmbeddingsOptions, type index_EmbeddingsResult as EmbeddingsResult, type index_EngagementInsightsOptions as EngagementInsightsOptions, type index_EngagementInsightsResult as EngagementInsightsResult, index_GOOGLE_VISION_LIKELIHOOD_TO_SCORE as GOOGLE_VISION_LIKELIHOOD_TO_SCORE, index_HIVE_SEXUAL_CATEGORIES as HIVE_SEXUAL_CATEGORIES, index_HIVE_VIOLENCE_CATEGORIES as HIVE_VIOLENCE_CATEGORIES, type index_HiveModerationOutput as HiveModerationOutput, type index_HiveModerationSource as HiveModerationSource, type index_ModerationOptions as ModerationOptions, type index_ModerationProvider as ModerationProvider, type index_ModerationResult as ModerationResult, type index_MomentInsight as MomentInsight, type index_OverallInsight as OverallInsight, type index_ProfanityDetectionPayload as ProfanityDetectionPayload, type index_Question as Question, type index_QuestionAnswer as QuestionAnswer, type index_QuestionAnswerType as QuestionAnswerType, type index_ReplacementRecord as ReplacementRecord, type index_SummarizationOptions as SummarizationOptions, type index_SummarizationPromptOverrides as SummarizationPromptOverrides, type index_SummarizationPromptSections as SummarizationPromptSections, type index_SummaryAndTagsResult as SummaryAndTagsResult, type index_SummaryType as SummaryType, type index_ThumbnailModerationScore as ThumbnailModerationScore, type index_TranslationChunkingOptions as TranslationChunkingOptions, type index_TranslationOptions as TranslationOptions, type index_TranslationPayload as TranslationPayload, type index_TranslationResult as TranslationResult, index_aggregateTokenUsage as aggregateTokenUsage, index_applyOverrideLists as applyOverrideLists, index_applyReplacements as applyReplacements, index_askQuestions as askQuestions, index_buildReplacementRegex as buildReplacementRegex, index_burnedInCaptionsSchema as burnedInCaptionsSchema, index_censorVttContent as censorVttContent, index_chapterSchema as chapterSchema, index_chaptersSchema as chaptersSchema, index_createReplacer as createReplacer, index_editCaptions as editCaptions, index_extractTranscriptSegmentsForHotspots as extractTranscriptSegmentsForHotspots, index_generateChapters as generateChapters, index_generateEmbeddings as generateEmbeddings, index_generateEngagementInsights as generateEngagementInsights, index_generateVideoEmbeddings as generateVideoEmbeddings, index_getModerationScores as getModerationScores, index_getSummaryAndTags as getSummaryAndTags, index_hasBurnedInCaptions as hasBurnedInCaptions, index_mapShotsToHotspots as mapShotsToHotspots, index_normalizeTranslatedVtt as normalizeTranslatedVtt, index_profanityDetectionSchema as profanityDetectionSchema, index_questionAnswerSchema as questionAnswerSchema, index_shouldSplitChunkTranslationError as shouldSplitChunkTranslationError, index_summarySchema as summarySchema, index_transformCueText as transformCueText, index_translateAudio as translateAudio, index_translateCaptions as translateCaptions, index_translationSchema as translationSchema };
|
|
1573
|
+
export { index_ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH as ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH, index_ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH as ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH, index_ASK_QUESTIONS_MAX_QUESTION_LENGTH as ASK_QUESTIONS_MAX_QUESTION_LENGTH, type index_AskQuestionsOptions as AskQuestionsOptions, type index_AskQuestionsResult as AskQuestionsResult, type index_AskQuestionsType as AskQuestionsType, type index_AudioTranslationOptions as AudioTranslationOptions, type index_AudioTranslationResult as AudioTranslationResult, type index_AutoCensorProfanityOptions as AutoCensorProfanityOptions, type index_BurnedInCaptionsAnalysis as BurnedInCaptionsAnalysis, type index_BurnedInCaptionsOptions as BurnedInCaptionsOptions, type index_BurnedInCaptionsPromptOverrides as BurnedInCaptionsPromptOverrides, type index_BurnedInCaptionsPromptSections as BurnedInCaptionsPromptSections, type index_BurnedInCaptionsResult as BurnedInCaptionsResult, type index_CaptionReplacement as CaptionReplacement, type index_CensorMode as CensorMode, type index_Chapter as Chapter, type index_ChapterSystemPromptSections as ChapterSystemPromptSections, type index_ChaptersOptions as ChaptersOptions, type index_ChaptersPromptOverrides as ChaptersPromptOverrides, type index_ChaptersPromptSections as ChaptersPromptSections, type index_ChaptersResult as ChaptersResult, type index_ChaptersType as ChaptersType, index_DEFAULT_DESCRIPTION_LENGTH as DEFAULT_DESCRIPTION_LENGTH, index_DEFAULT_SUMMARY_KEYWORD_LIMIT as DEFAULT_SUMMARY_KEYWORD_LIMIT, index_DEFAULT_TITLE_LENGTH as DEFAULT_TITLE_LENGTH, type index_EditCaptionsOptions as EditCaptionsOptions, type index_EditCaptionsResult as EditCaptionsResult, type index_EmbeddingsOptions as EmbeddingsOptions, type index_EmbeddingsResult as EmbeddingsResult, type index_EngagementInsightsOptions as EngagementInsightsOptions, type index_EngagementInsightsResult as EngagementInsightsResult, index_GOOGLE_VISION_LIKELIHOOD_TO_SCORE as GOOGLE_VISION_LIKELIHOOD_TO_SCORE, index_HIVE_SEXUAL_CATEGORIES as HIVE_SEXUAL_CATEGORIES, index_HIVE_VIOLENCE_CATEGORIES as HIVE_VIOLENCE_CATEGORIES, type index_HiveModerationOutput as HiveModerationOutput, type index_HiveModerationSource as HiveModerationSource, type index_ModerationOptions as ModerationOptions, type index_ModerationProvider as ModerationProvider, type index_ModerationResult as ModerationResult, type index_MomentInsight as MomentInsight, type index_OverallInsight as OverallInsight, type index_ProfanityDetectionPayload as ProfanityDetectionPayload, type index_Question as Question, type index_QuestionAnswer as QuestionAnswer, type index_QuestionAnswerType as QuestionAnswerType, type index_ReplacementRecord as ReplacementRecord, type index_SummarizationOptions as SummarizationOptions, type index_SummarizationPromptOverrides as SummarizationPromptOverrides, type index_SummarizationPromptSections as SummarizationPromptSections, type index_SummaryAndTagsResult as SummaryAndTagsResult, type index_SummaryType as SummaryType, type index_ThumbnailModerationScore as ThumbnailModerationScore, type index_TranslationChunkingOptions as TranslationChunkingOptions, type index_TranslationOptions as TranslationOptions, type index_TranslationPayload as TranslationPayload, type index_TranslationResult as TranslationResult, index_aggregateTokenUsage as aggregateTokenUsage, index_applyOverrideLists as applyOverrideLists, index_applyReplacements as applyReplacements, index_askQuestions as askQuestions, index_buildReplacementRegex as buildReplacementRegex, index_burnedInCaptionsSchema as burnedInCaptionsSchema, index_censorVttContent as censorVttContent, index_chapterSchema as chapterSchema, index_chaptersSchema as chaptersSchema, index_createReplacer as createReplacer, index_editCaptions as editCaptions, index_extractTranscriptSegmentsForHotspots as extractTranscriptSegmentsForHotspots, index_generateChapters as generateChapters, index_generateEmbeddings as generateEmbeddings, index_generateEngagementInsights as generateEngagementInsights, index_generateVideoEmbeddings as generateVideoEmbeddings, index_getModerationScores as getModerationScores, index_getSummaryAndTags as getSummaryAndTags, index_hasBurnedInCaptions as hasBurnedInCaptions, index_mapShotsToHotspots as mapShotsToHotspots, index_normalizeTranslatedVtt as normalizeTranslatedVtt, index_profanityDetectionSchema as profanityDetectionSchema, index_questionAnswerSchema as questionAnswerSchema, index_shouldSplitChunkTranslationError as shouldSplitChunkTranslationError, index_summarySchema as summarySchema, index_transformCueText as transformCueText, index_translateAudio as translateAudio, index_translateCaptions as translateCaptions, index_translationSchema as translationSchema, index_validateNeverTranslateTerms as validateNeverTranslateTerms, index_verifyNeverTranslateTerms as verifyNeverTranslateTerms };
|
|
1544
1574
|
}
|
|
1545
1575
|
|
|
1546
|
-
export { type MomentInsight as $, ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH as A, type BurnedInCaptionsAnalysis as B, type CaptionReplacement as C, type ChaptersPromptOverrides as D, type ChaptersPromptSections as E, type ChaptersResult as F, type ChaptersType as G, DEFAULT_DESCRIPTION_LENGTH as H, type ISO639_1 as I, DEFAULT_SUMMARY_KEYWORD_LIMIT as J, DEFAULT_TITLE_LENGTH as K, type LanguageCodePair as L, type EditCaptionsOptions as M, type EditCaptionsResult as N, type EmbeddingsOptions as O, type EmbeddingsResult as P, type EngagementInsightsOptions as Q, type EngagementInsightsResult as R, type SupportedISO639_1 as S, GOOGLE_VISION_LIKELIHOOD_TO_SCORE as T, HIVE_SEXUAL_CATEGORIES as U, HIVE_VIOLENCE_CATEGORIES as V, type HiveModerationOutput as W, type HiveModerationSource as X, type ModerationOptions as Y, type ModerationProvider as Z, type ModerationResult as _, type ISO639_3 as a, type OverallInsight as a0, type ProfanityDetectionPayload as a1, type Question as a2, type QuestionAnswer as a3, type QuestionAnswerType as a4, type ReplacementRecord as a5, type SummarizationOptions as a6, type SummarizationPromptOverrides as a7, type SummarizationPromptSections as a8, type SummaryAndTagsResult as a9, normalizeTranslatedVtt as aA, profanityDetectionSchema as aB, questionAnswerSchema as aC, shouldSplitChunkTranslationError as aD, summarySchema as aE, transformCueText as aF, translateAudio as aG, translateCaptions as aH, translationSchema as aI, type SummaryType as aa, type ThumbnailModerationScore as ab, type TranslationChunkingOptions as ac, type TranslationOptions as ad, type TranslationPayload as ae, type TranslationResult as af, aggregateTokenUsage as ag, applyOverrideLists as ah, applyReplacements as ai, askQuestions as aj, buildReplacementRegex as ak, burnedInCaptionsSchema as al, censorVttContent as am, chapterSchema as an, chaptersSchema as ao, createReplacer as ap, editCaptions as aq, extractTranscriptSegmentsForHotspots as ar, generateChapters as as, generateEmbeddings as at, generateEngagementInsights as au, generateVideoEmbeddings as av, getModerationScores as aw, getSummaryAndTags as ax, hasBurnedInCaptions as ay, mapShotsToHotspots as az, type SupportedISO639_3 as b, getLanguageName as c, isValidISO639_1 as d, isValidISO639_3 as e, toISO639_3 as f, getLanguageCodePair as g, index as h, isUndeterminedLanguageCode as i, ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH as j, ASK_QUESTIONS_MAX_QUESTION_LENGTH as k, type AskQuestionsOptions as l, type AskQuestionsResult as m, type AskQuestionsType as n, type AudioTranslationOptions as o, type AudioTranslationResult as p, type AutoCensorProfanityOptions as q, type BurnedInCaptionsOptions as r, type BurnedInCaptionsPromptOverrides as s, toISO639_1 as t, type BurnedInCaptionsPromptSections as u, type BurnedInCaptionsResult as v, type CensorMode as w, type Chapter as x, type ChapterSystemPromptSections as y, type ChaptersOptions as z };
|
|
1576
|
+
export { type MomentInsight as $, ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH as A, type BurnedInCaptionsAnalysis as B, type CaptionReplacement as C, type ChaptersPromptOverrides as D, type ChaptersPromptSections as E, type ChaptersResult as F, type ChaptersType as G, DEFAULT_DESCRIPTION_LENGTH as H, type ISO639_1 as I, DEFAULT_SUMMARY_KEYWORD_LIMIT as J, DEFAULT_TITLE_LENGTH as K, type LanguageCodePair as L, type EditCaptionsOptions as M, type EditCaptionsResult as N, type EmbeddingsOptions as O, type EmbeddingsResult as P, type EngagementInsightsOptions as Q, type EngagementInsightsResult as R, type SupportedISO639_1 as S, GOOGLE_VISION_LIKELIHOOD_TO_SCORE as T, HIVE_SEXUAL_CATEGORIES as U, HIVE_VIOLENCE_CATEGORIES as V, type HiveModerationOutput as W, type HiveModerationSource as X, type ModerationOptions as Y, type ModerationProvider as Z, type ModerationResult as _, type ISO639_3 as a, type OverallInsight as a0, type ProfanityDetectionPayload as a1, type Question as a2, type QuestionAnswer as a3, type QuestionAnswerType as a4, type ReplacementRecord as a5, type SummarizationOptions as a6, type SummarizationPromptOverrides as a7, type SummarizationPromptSections as a8, type SummaryAndTagsResult as a9, normalizeTranslatedVtt as aA, profanityDetectionSchema as aB, questionAnswerSchema as aC, shouldSplitChunkTranslationError as aD, summarySchema as aE, transformCueText as aF, translateAudio as aG, translateCaptions as aH, translationSchema as aI, validateNeverTranslateTerms as aJ, verifyNeverTranslateTerms as aK, type SummaryType as aa, type ThumbnailModerationScore as ab, type TranslationChunkingOptions as ac, type TranslationOptions as ad, type TranslationPayload as ae, type TranslationResult as af, aggregateTokenUsage as ag, applyOverrideLists as ah, applyReplacements as ai, askQuestions as aj, buildReplacementRegex as ak, burnedInCaptionsSchema as al, censorVttContent as am, chapterSchema as an, chaptersSchema as ao, createReplacer as ap, editCaptions as aq, extractTranscriptSegmentsForHotspots as ar, generateChapters as as, generateEmbeddings as at, generateEngagementInsights as au, generateVideoEmbeddings as av, getModerationScores as aw, getSummaryAndTags as ax, hasBurnedInCaptions as ay, mapShotsToHotspots as az, type SupportedISO639_3 as b, getLanguageName as c, isValidISO639_1 as d, isValidISO639_3 as e, toISO639_3 as f, getLanguageCodePair as g, index as h, isUndeterminedLanguageCode as i, ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH as j, ASK_QUESTIONS_MAX_QUESTION_LENGTH as k, type AskQuestionsOptions as l, type AskQuestionsResult as m, type AskQuestionsType as n, type AudioTranslationOptions as o, type AudioTranslationResult as p, type AutoCensorProfanityOptions as q, type BurnedInCaptionsOptions as r, type BurnedInCaptionsPromptOverrides as s, toISO639_1 as t, type BurnedInCaptionsPromptSections as u, type BurnedInCaptionsResult as v, type CensorMode as w, type Chapter as x, type ChapterSystemPromptSections as y, type ChaptersOptions as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as WorkflowCredentialsInput, n as WorkflowScope, A as AssetTextTrack, d as MuxAsset, T as TextChunk, b as ChunkingStrategy, q as CompletedShotsResult, r as ErroredShotsResult, H as Hotspot, s as HotspotOptions, t as HotspotResponse, u as PendingShotsResult, v as Shot, w as ShotRequestOptions, x as ShotsResult, y as WaitForShotsOptions, z as getHotspotsForAsset, B as getHotspotsForPlaybackId, D as getHotspotsForVideo, F as getShotsForAsset, G as requestShotsForAsset, J as waitForShotsForAsset } from './shots-
|
|
1
|
+
import { l as WorkflowCredentialsInput, n as WorkflowScope, A as AssetTextTrack, d as MuxAsset, T as TextChunk, b as ChunkingStrategy, q as CompletedShotsResult, r as ErroredShotsResult, H as Hotspot, s as HotspotOptions, t as HotspotResponse, u as PendingShotsResult, v as Shot, w as ShotRequestOptions, x as ShotsResult, y as WaitForShotsOptions, z as getHotspotsForAsset, B as getHotspotsForPlaybackId, D as getHotspotsForVideo, F as getShotsForAsset, G as requestShotsForAsset, J as waitForShotsForAsset } from './shots-BMbViFbZ.js';
|
|
2
2
|
|
|
3
3
|
interface HeatmapOptions {
|
|
4
4
|
/** Time window for results, e.g., '7:days' (default: '7:days') */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { I as ISO639_1, a as ISO639_3, L as LanguageCodePair, S as SupportedISO639_1, b as SupportedISO639_3, g as getLanguageCodePair, c as getLanguageName, i as isUndeterminedLanguageCode, d as isValidISO639_1, e as isValidISO639_3, t as toISO639_1, f as toISO639_3, h as workflows } from './index-
|
|
2
|
-
import { W as WorkflowCredentials, S as StoragePutObjectInput, a as StoragePresignGetObjectInput } from './shots-
|
|
3
|
-
export { A as AssetTextTrack, C as ChunkEmbedding, b as ChunkingStrategy, E as Encrypted, c as EncryptedPayload, I as ImageSubmissionMode, M as MuxAIOptions, d as MuxAsset, P as PlaybackAsset, e as PlaybackPolicy, f as ScopedMuxAIOptions, g as StorageAdapter, T as TextChunk, h as TokenChunkingConfig, i as TokenUsage, j as ToneType, U as UsageMetadata, V as VTTChunkingConfig, k as VideoEmbeddingsResult, l as WorkflowCredentialsInput, m as WorkflowMuxClient, n as WorkflowScope, o as decryptFromWorkflow, p as encryptForWorkflow } from './shots-
|
|
1
|
+
export { I as ISO639_1, a as ISO639_3, L as LanguageCodePair, S as SupportedISO639_1, b as SupportedISO639_3, g as getLanguageCodePair, c as getLanguageName, i as isUndeterminedLanguageCode, d as isValidISO639_1, e as isValidISO639_3, t as toISO639_1, f as toISO639_3, h as workflows } from './index-Chccb380.js';
|
|
2
|
+
import { W as WorkflowCredentials, S as StoragePutObjectInput, a as StoragePresignGetObjectInput } from './shots-BMbViFbZ.js';
|
|
3
|
+
export { A as AssetTextTrack, C as ChunkEmbedding, b as ChunkingStrategy, E as Encrypted, c as EncryptedPayload, I as ImageSubmissionMode, M as MuxAIOptions, d as MuxAsset, P as PlaybackAsset, e as PlaybackPolicy, f as ScopedMuxAIOptions, g as StorageAdapter, T as TextChunk, h as TokenChunkingConfig, i as TokenUsage, j as ToneType, U as UsageMetadata, V as VTTChunkingConfig, k as VideoEmbeddingsResult, l as WorkflowCredentialsInput, m as WorkflowMuxClient, n as WorkflowScope, o as decryptFromWorkflow, p as encryptForWorkflow } from './shots-BMbViFbZ.js';
|
|
4
4
|
import { WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@workflow/serde';
|
|
5
|
-
export { i as primitives } from './index-
|
|
5
|
+
export { i as primitives } from './index-SjpXUdXl.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import '@ai-sdk/anthropic';
|
|
8
8
|
import '@ai-sdk/google';
|
|
9
9
|
import '@ai-sdk/openai';
|
|
10
10
|
import '@mux/mux-node';
|
|
11
11
|
|
|
12
|
-
var version = "0.
|
|
12
|
+
var version = "0.33.0";
|
|
13
13
|
|
|
14
14
|
type MuxAiErrorType = "validation_error" | "processing_error" | "timeout_error" | "content_policy_error";
|
|
15
15
|
/**
|