@mux/ai 0.39.0 → 0.40.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/dist/index.d.ts +2 -2
- package/dist/index.js +10 -37
- package/dist/index.js.map +1 -1
- package/dist/workflows/index.d.ts +1 -1
- package/dist/workflows/index.js +9 -36
- package/dist/workflows/index.js.map +1 -1
- package/package.json +17 -3
- package/dist/{index-Wjbq-_Z0.d.ts → index-UhRs9t1h.d.ts} +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH, j as ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH, k as ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL, l as ASK_QUESTIONS_MAX_QUESTION_LENGTH, m as AskQuestionsOptions, n as AskQuestionsResult, o as AskQuestionsType, p as AudioTranslationOptions, q as AudioTranslationResult, r as AutoCensorProfanityOptions, B as BurnedInCaptionsAnalysis, s as BurnedInCaptionsOptions, u as BurnedInCaptionsPromptOverrides, v as BurnedInCaptionsPromptSections, w as BurnedInCaptionsResult, C as CaptionReplacement, x as CensorMode, y as Chapter, z as ChapterSystemPromptSections, D as ChaptersOptions, E as ChaptersPromptOverrides, F as ChaptersPromptSections, G as ChaptersResult, H as ChaptersType, J as DEFAULT_DESCRIPTION_LENGTH, K as DEFAULT_SUMMARY_KEYWORD_LIMIT, M as DEFAULT_TITLE_LENGTH, N as EditCaptionsOptions, O as EditCaptionsResult, P as EmbeddingsOptions, Q as EmbeddingsResult, R as EngagementInsightsOptions, T as EngagementInsightsResult, U as GOOGLE_VISION_LIKELIHOOD_TO_SCORE, V as HIVE_SEXUAL_CATEGORIES, W as HIVE_VIOLENCE_CATEGORIES, X as HiveModerationOutput, Y as HiveModerationSource, Z as ModerationOptions, _ as ModerationProvider, $ as ModerationResult, a0 as MomentInsight, a1 as OverallInsight, a2 as ProfanityDetectionPayload, a3 as Question, a4 as QuestionAnswer, a5 as QuestionAnswerType, a6 as ReplacementRecord, a7 as SpeakerReplacement, a8 as StaticRenditionCleanupOutcome, a9 as SummarizationOptions, aa as SummarizationPromptOverrides, ab as SummarizationPromptSections, ac as SummaryAndTagsResult, ad as SummaryType, ae as ThumbnailModerationScore, af as TranslationChunkingOptions, ag as TranslationOptions, ah as TranslationPayload, ai as TranslationResult, aj as aggregateTokenUsage, ak as applyOverrideLists, al as applyReplacements, am as applySpeakerReplacements, an as askQuestions, ao as buildReplacementRegex, ap as burnedInCaptionsSchema, aq as censorVttContent, ar as chapterSchema, as as chaptersSchema, at as createReplacer, au as editCaptions, av as extractTranscriptSegmentsForHotspots, aw as generateChapters, ax as generateEmbeddings, ay as generateEngagementInsights, az as generateVideoEmbeddings, aA as getModerationScores, aB as getSummaryAndTags, aC as hasBurnedInCaptions, aD as mapShotsToHotspots, aE as normalizeTranslatedVtt, aF as profanityDetectionSchema, aG as questionAnswerSchema, aH as shouldSplitChunkTranslationError, aI as summarySchema, aJ as transformCueText, aK as translateAudio, aL as translateCaptions, aM as translationSchema, aN as validateNeverTranslateTerms, aO as verifyNeverTranslateTerms } from '../index-
|
|
1
|
+
export { A as ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH, j as ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH, k as ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL, l as ASK_QUESTIONS_MAX_QUESTION_LENGTH, m as AskQuestionsOptions, n as AskQuestionsResult, o as AskQuestionsType, p as AudioTranslationOptions, q as AudioTranslationResult, r as AutoCensorProfanityOptions, B as BurnedInCaptionsAnalysis, s as BurnedInCaptionsOptions, u as BurnedInCaptionsPromptOverrides, v as BurnedInCaptionsPromptSections, w as BurnedInCaptionsResult, C as CaptionReplacement, x as CensorMode, y as Chapter, z as ChapterSystemPromptSections, D as ChaptersOptions, E as ChaptersPromptOverrides, F as ChaptersPromptSections, G as ChaptersResult, H as ChaptersType, J as DEFAULT_DESCRIPTION_LENGTH, K as DEFAULT_SUMMARY_KEYWORD_LIMIT, M as DEFAULT_TITLE_LENGTH, N as EditCaptionsOptions, O as EditCaptionsResult, P as EmbeddingsOptions, Q as EmbeddingsResult, R as EngagementInsightsOptions, T as EngagementInsightsResult, U as GOOGLE_VISION_LIKELIHOOD_TO_SCORE, V as HIVE_SEXUAL_CATEGORIES, W as HIVE_VIOLENCE_CATEGORIES, X as HiveModerationOutput, Y as HiveModerationSource, Z as ModerationOptions, _ as ModerationProvider, $ as ModerationResult, a0 as MomentInsight, a1 as OverallInsight, a2 as ProfanityDetectionPayload, a3 as Question, a4 as QuestionAnswer, a5 as QuestionAnswerType, a6 as ReplacementRecord, a7 as SpeakerReplacement, a8 as StaticRenditionCleanupOutcome, a9 as SummarizationOptions, aa as SummarizationPromptOverrides, ab as SummarizationPromptSections, ac as SummaryAndTagsResult, ad as SummaryType, ae as ThumbnailModerationScore, af as TranslationChunkingOptions, ag as TranslationOptions, ah as TranslationPayload, ai as TranslationResult, aj as aggregateTokenUsage, ak as applyOverrideLists, al as applyReplacements, am as applySpeakerReplacements, an as askQuestions, ao as buildReplacementRegex, ap as burnedInCaptionsSchema, aq as censorVttContent, ar as chapterSchema, as as chaptersSchema, at as createReplacer, au as editCaptions, av as extractTranscriptSegmentsForHotspots, aw as generateChapters, ax as generateEmbeddings, ay as generateEngagementInsights, az as generateVideoEmbeddings, aA as getModerationScores, aB as getSummaryAndTags, aC as hasBurnedInCaptions, aD as mapShotsToHotspots, aE as normalizeTranslatedVtt, aF as profanityDetectionSchema, aG as questionAnswerSchema, aH as shouldSplitChunkTranslationError, aI as summarySchema, aJ as transformCueText, aK as translateAudio, aL as translateCaptions, aM as translationSchema, aN as validateNeverTranslateTerms, aO as verifyNeverTranslateTerms } from '../index-UhRs9t1h.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '@ai-sdk/anthropic';
|
|
4
4
|
import '@ai-sdk/google';
|
package/dist/workflows/index.js
CHANGED
|
@@ -2928,11 +2928,8 @@ async function analyzeQuestions({
|
|
|
2928
2928
|
maxRetries: 0,
|
|
2929
2929
|
output: Output.object({ schema: responseSchema }),
|
|
2930
2930
|
experimental_telemetry: { isEnabled: true },
|
|
2931
|
+
system: systemPrompt,
|
|
2931
2932
|
messages: [
|
|
2932
|
-
{
|
|
2933
|
-
role: "system",
|
|
2934
|
-
content: systemPrompt
|
|
2935
|
-
},
|
|
2936
2933
|
{
|
|
2937
2934
|
role: "user",
|
|
2938
2935
|
content: imageDataUrl ? [
|
|
@@ -3346,11 +3343,8 @@ async function analyzeStoryboard({
|
|
|
3346
3343
|
maxRetries: 0,
|
|
3347
3344
|
output: Output2.object({ schema: burnedInCaptionsSchema }),
|
|
3348
3345
|
experimental_telemetry: { isEnabled: true },
|
|
3346
|
+
system: systemPrompt,
|
|
3349
3347
|
messages: [
|
|
3350
|
-
{
|
|
3351
|
-
role: "system",
|
|
3352
|
-
content: systemPrompt
|
|
3353
|
-
},
|
|
3354
3348
|
{
|
|
3355
3349
|
role: "user",
|
|
3356
3350
|
content: [
|
|
@@ -3495,11 +3489,8 @@ async function generateChaptersWithAI({
|
|
|
3495
3489
|
model,
|
|
3496
3490
|
maxRetries: 0,
|
|
3497
3491
|
output: Output3.object({ schema: chaptersSchema }),
|
|
3492
|
+
system: systemPrompt,
|
|
3498
3493
|
messages: [
|
|
3499
|
-
{
|
|
3500
|
-
role: "system",
|
|
3501
|
-
content: systemPrompt
|
|
3502
|
-
},
|
|
3503
3494
|
{
|
|
3504
3495
|
role: "user",
|
|
3505
3496
|
content: userPrompt
|
|
@@ -4271,11 +4262,8 @@ async function identifyProfanityWithAI({
|
|
|
4271
4262
|
model,
|
|
4272
4263
|
maxRetries: 0,
|
|
4273
4264
|
output: Output4.object({ schema: profanityDetectionSchema }),
|
|
4265
|
+
system: SYSTEM_PROMPT3,
|
|
4274
4266
|
messages: [
|
|
4275
|
-
{
|
|
4276
|
-
role: "system",
|
|
4277
|
-
content: SYSTEM_PROMPT3
|
|
4278
|
-
},
|
|
4279
4267
|
{
|
|
4280
4268
|
role: "user",
|
|
4281
4269
|
content: `Identify all profane words and phrases in the following subtitle transcript. Return each unique profane word or phrase exactly as it appears in the text.
|
|
@@ -5390,11 +5378,8 @@ async function generateInsightsWithAI(provider, modelId, systemPrompt, userPromp
|
|
|
5390
5378
|
maxRetries: 0,
|
|
5391
5379
|
output: Output5.object({ schema: engagementInsightsSchema }),
|
|
5392
5380
|
experimental_telemetry: { isEnabled: true },
|
|
5381
|
+
system: systemPrompt,
|
|
5393
5382
|
messages: [
|
|
5394
|
-
{
|
|
5395
|
-
role: "system",
|
|
5396
|
-
content: systemPrompt
|
|
5397
|
-
},
|
|
5398
5383
|
{
|
|
5399
5384
|
role: "user",
|
|
5400
5385
|
content: [
|
|
@@ -6697,11 +6682,8 @@ async function analyzeStoryboard2(imageDataUrl, provider, modelId, userPrompt, s
|
|
|
6697
6682
|
description: "Structured summary with title, description, and keywords.",
|
|
6698
6683
|
schema
|
|
6699
6684
|
}),
|
|
6685
|
+
system: systemPrompt,
|
|
6700
6686
|
messages: [
|
|
6701
|
-
{
|
|
6702
|
-
role: "system",
|
|
6703
|
-
content: systemPrompt
|
|
6704
|
-
},
|
|
6705
6687
|
{
|
|
6706
6688
|
role: "user",
|
|
6707
6689
|
content: [
|
|
@@ -6745,11 +6727,8 @@ async function analyzeAudioOnly(provider, modelId, userPrompt, systemPrompt, des
|
|
|
6745
6727
|
description: "Structured summary with title, description, and keywords.",
|
|
6746
6728
|
schema
|
|
6747
6729
|
}),
|
|
6730
|
+
system: systemPrompt,
|
|
6748
6731
|
messages: [
|
|
6749
|
-
{
|
|
6750
|
-
role: "system",
|
|
6751
|
-
content: systemPrompt
|
|
6752
|
-
},
|
|
6753
6732
|
{
|
|
6754
6733
|
role: "user",
|
|
6755
6734
|
content: userPrompt
|
|
@@ -7813,11 +7792,8 @@ async function translateVttWithAI({
|
|
|
7813
7792
|
model,
|
|
7814
7793
|
maxRetries: 0,
|
|
7815
7794
|
output: Output7.object({ schema: translationSchema }),
|
|
7795
|
+
system: SYSTEM_PROMPT6,
|
|
7816
7796
|
messages: [
|
|
7817
|
-
{
|
|
7818
|
-
role: "system",
|
|
7819
|
-
content: SYSTEM_PROMPT6
|
|
7820
|
-
},
|
|
7821
7797
|
{
|
|
7822
7798
|
role: "user",
|
|
7823
7799
|
content: `Translate from ${fromLanguageCode} to ${toLanguageCode}:${buildNeverTranslateSection(neverTranslate)}
|
|
@@ -7881,11 +7857,8 @@ async function translateCueChunkWithAI({
|
|
|
7881
7857
|
model,
|
|
7882
7858
|
maxRetries: 0,
|
|
7883
7859
|
output: Output7.object({ schema }),
|
|
7860
|
+
system: CUE_TRANSLATION_SYSTEM_PROMPT,
|
|
7884
7861
|
messages: [
|
|
7885
|
-
{
|
|
7886
|
-
role: "system",
|
|
7887
|
-
content: CUE_TRANSLATION_SYSTEM_PROMPT
|
|
7888
|
-
},
|
|
7889
7862
|
{
|
|
7890
7863
|
role: "user",
|
|
7891
7864
|
content: `Translate from ${fromLanguageCode} to ${toLanguageCode}.
|