@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 CHANGED
@@ -1,4 +1,4 @@
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-Wjbq-_Z0.js';
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-UhRs9t1h.js';
2
2
  import { W as WorkflowCredentials, S as StoragePutObjectInput, a as StoragePresignGetObjectInput } from './shots-CUI09Ohe.js';
3
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-CUI09Ohe.js';
4
4
  import { WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@workflow/serde';
@@ -9,7 +9,7 @@ import '@ai-sdk/google';
9
9
  import '@ai-sdk/openai';
10
10
  import '@mux/mux-node';
11
11
 
12
- var version = "0.39.0";
12
+ var version = "0.40.0";
13
13
 
14
14
  type MuxAiErrorType = "validation_error" | "processing_error" | "timeout_error" | "content_policy_error";
15
15
  /**
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // package.json
8
- var version = "0.39.0";
8
+ var version = "0.40.0";
9
9
 
10
10
  // src/lib/language-codes.ts
11
11
  var ISO639_1_TO_3 = {
@@ -3897,11 +3897,8 @@ async function analyzeQuestions({
3897
3897
  maxRetries: 0,
3898
3898
  output: Output.object({ schema: responseSchema }),
3899
3899
  experimental_telemetry: { isEnabled: true },
3900
+ system: systemPrompt,
3900
3901
  messages: [
3901
- {
3902
- role: "system",
3903
- content: systemPrompt
3904
- },
3905
3902
  {
3906
3903
  role: "user",
3907
3904
  content: imageDataUrl ? [
@@ -4315,11 +4312,8 @@ async function analyzeStoryboard({
4315
4312
  maxRetries: 0,
4316
4313
  output: Output2.object({ schema: burnedInCaptionsSchema }),
4317
4314
  experimental_telemetry: { isEnabled: true },
4315
+ system: systemPrompt,
4318
4316
  messages: [
4319
- {
4320
- role: "system",
4321
- content: systemPrompt
4322
- },
4323
4317
  {
4324
4318
  role: "user",
4325
4319
  content: [
@@ -4464,11 +4458,8 @@ async function generateChaptersWithAI({
4464
4458
  model,
4465
4459
  maxRetries: 0,
4466
4460
  output: Output3.object({ schema: chaptersSchema }),
4461
+ system: systemPrompt,
4467
4462
  messages: [
4468
- {
4469
- role: "system",
4470
- content: systemPrompt
4471
- },
4472
4463
  {
4473
4464
  role: "user",
4474
4465
  content: userPrompt
@@ -5028,11 +5019,8 @@ async function identifyProfanityWithAI({
5028
5019
  model,
5029
5020
  maxRetries: 0,
5030
5021
  output: Output4.object({ schema: profanityDetectionSchema }),
5022
+ system: SYSTEM_PROMPT3,
5031
5023
  messages: [
5032
- {
5033
- role: "system",
5034
- content: SYSTEM_PROMPT3
5035
- },
5036
5024
  {
5037
5025
  role: "user",
5038
5026
  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.
@@ -5761,11 +5749,8 @@ async function generateInsightsWithAI(provider, modelId, systemPrompt, userPromp
5761
5749
  maxRetries: 0,
5762
5750
  output: Output5.object({ schema: engagementInsightsSchema }),
5763
5751
  experimental_telemetry: { isEnabled: true },
5752
+ system: systemPrompt,
5764
5753
  messages: [
5765
- {
5766
- role: "system",
5767
- content: systemPrompt
5768
- },
5769
5754
  {
5770
5755
  role: "user",
5771
5756
  content: [
@@ -7027,11 +7012,8 @@ async function analyzeStoryboard2(imageDataUrl, provider, modelId, userPrompt, s
7027
7012
  description: "Structured summary with title, description, and keywords.",
7028
7013
  schema
7029
7014
  }),
7015
+ system: systemPrompt,
7030
7016
  messages: [
7031
- {
7032
- role: "system",
7033
- content: systemPrompt
7034
- },
7035
7017
  {
7036
7018
  role: "user",
7037
7019
  content: [
@@ -7075,11 +7057,8 @@ async function analyzeAudioOnly(provider, modelId, userPrompt, systemPrompt, des
7075
7057
  description: "Structured summary with title, description, and keywords.",
7076
7058
  schema
7077
7059
  }),
7060
+ system: systemPrompt,
7078
7061
  messages: [
7079
- {
7080
- role: "system",
7081
- content: systemPrompt
7082
- },
7083
7062
  {
7084
7063
  role: "user",
7085
7064
  content: userPrompt
@@ -8143,11 +8122,8 @@ async function translateVttWithAI({
8143
8122
  model,
8144
8123
  maxRetries: 0,
8145
8124
  output: Output7.object({ schema: translationSchema }),
8125
+ system: SYSTEM_PROMPT6,
8146
8126
  messages: [
8147
- {
8148
- role: "system",
8149
- content: SYSTEM_PROMPT6
8150
- },
8151
8127
  {
8152
8128
  role: "user",
8153
8129
  content: `Translate from ${fromLanguageCode} to ${toLanguageCode}:${buildNeverTranslateSection(neverTranslate)}
@@ -8211,11 +8187,8 @@ async function translateCueChunkWithAI({
8211
8187
  model,
8212
8188
  maxRetries: 0,
8213
8189
  output: Output7.object({ schema }),
8190
+ system: CUE_TRANSLATION_SYSTEM_PROMPT,
8214
8191
  messages: [
8215
- {
8216
- role: "system",
8217
- content: CUE_TRANSLATION_SYSTEM_PROMPT
8218
- },
8219
8192
  {
8220
8193
  role: "user",
8221
8194
  content: `Translate from ${fromLanguageCode} to ${toLanguageCode}.