mulmocast 0.1.5 → 0.1.7
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/assets/templates/ani.json +48 -0
- package/assets/templates/ani_ja.json +45 -0
- package/lib/actions/audio.js +2 -0
- package/lib/actions/image_agents.d.ts +28 -22
- package/lib/actions/image_agents.js +4 -4
- package/lib/actions/images.js +12 -21
- package/lib/actions/translate.d.ts +4 -1
- package/lib/actions/translate.js +6 -3
- package/lib/agents/combine_audio_files_agent.js +106 -86
- package/lib/agents/movie_replicate_agent.js +4 -3
- package/lib/agents/tts_elevenlabs_agent.js +1 -1
- package/lib/agents/tts_nijivoice_agent.js +2 -3
- package/lib/cli/commands/tool/scripting/builder.js +1 -1
- package/lib/cli/commands/tool/scripting/handler.d.ts +1 -1
- package/lib/cli/commands/tool/story_to_script/builder.js +1 -1
- package/lib/cli/commands/tool/story_to_script/handler.d.ts +1 -1
- package/lib/index.browser.d.ts +1 -3
- package/lib/index.browser.js +2 -4
- package/lib/index.common.d.ts +2 -0
- package/lib/index.common.js +3 -0
- package/lib/index.node.d.ts +7 -0
- package/lib/index.node.js +8 -0
- package/lib/methods/mulmo_presentation_style.d.ts +15 -1
- package/lib/methods/mulmo_presentation_style.js +10 -11
- package/lib/tools/story_to_script.d.ts +1 -1
- package/lib/types/schema.d.ts +343 -322
- package/lib/types/schema.js +21 -14
- package/lib/types/type.d.ts +3 -2
- package/lib/utils/context.d.ts +73 -72
- package/lib/utils/ffmpeg_utils.js +6 -0
- package/lib/utils/image_plugins/image.d.ts +2 -2
- package/lib/utils/image_plugins/movie.d.ts +2 -2
- package/lib/utils/preprocess.d.ts +37 -36
- package/lib/utils/provider2agent.d.ts +9 -7
- package/lib/utils/provider2agent.js +12 -7
- package/lib/utils/utils.d.ts +1 -2
- package/lib/utils/utils.js +7 -2
- package/package.json +11 -11
- package/scripts/templates/presentation.json~ +0 -119
package/lib/types/schema.js
CHANGED
|
@@ -96,7 +96,7 @@ export const mulmoChartMediaSchema = z
|
|
|
96
96
|
.object({
|
|
97
97
|
type: z.literal("chart"),
|
|
98
98
|
title: z.string(),
|
|
99
|
-
chartData: z.record(z.any()),
|
|
99
|
+
chartData: z.record(z.string(), z.any()),
|
|
100
100
|
})
|
|
101
101
|
.strict();
|
|
102
102
|
export const mulmoMermaidMediaSchema = z
|
|
@@ -223,12 +223,14 @@ export const htmlPromptParamsSchema = z
|
|
|
223
223
|
systemPrompt: z.string().default("").optional(),
|
|
224
224
|
prompt: z.string().default(""),
|
|
225
225
|
data: z.any().optional(),
|
|
226
|
-
images: z.record(z.any()).optional(),
|
|
226
|
+
images: z.record(z.string(), z.any()).optional(),
|
|
227
227
|
})
|
|
228
228
|
.strict();
|
|
229
|
+
export const text2MovieProviderSchema = z.enum(Object.keys(provider2MovieAgent)).default(defaultProviders.text2movie);
|
|
230
|
+
const defaultSpeaker = "Presenter";
|
|
229
231
|
export const mulmoBeatSchema = z
|
|
230
232
|
.object({
|
|
231
|
-
speaker: speakerIdSchema.default(
|
|
233
|
+
speaker: speakerIdSchema.default(defaultSpeaker),
|
|
232
234
|
text: z.string().default("").describe("Text to be spoken. If empty, the audio is not generated."),
|
|
233
235
|
id: z.string().optional().describe("Unique identifier for the beat."),
|
|
234
236
|
description: z.string().optional(),
|
|
@@ -239,9 +241,10 @@ export const mulmoBeatSchema = z
|
|
|
239
241
|
audioParams: beatAudioParamsSchema.optional(), // beat specific parameters
|
|
240
242
|
movieParams: z
|
|
241
243
|
.object({
|
|
244
|
+
provider: text2MovieProviderSchema.optional(),
|
|
242
245
|
model: z.string().optional(),
|
|
243
|
-
fillOption: mulmoFillOptionSchema.optional(),
|
|
244
|
-
speed: z.number().optional().describe("Speed of the video. 1.0 is normal speed. 0.5 is half speed. 2.0 is double speed."),
|
|
246
|
+
fillOption: mulmoFillOptionSchema.optional(), // for movie.ts
|
|
247
|
+
speed: z.number().optional().describe("Speed of the video. 1.0 is normal speed. 0.5 is half speed. 2.0 is double speed."), // for movie.ts
|
|
245
248
|
})
|
|
246
249
|
.optional(),
|
|
247
250
|
htmlImageParams: mulmoHtmlImageParamsSchema.optional(),
|
|
@@ -275,7 +278,6 @@ export const mulmoSpeechParamsSchema = z
|
|
|
275
278
|
})
|
|
276
279
|
.strict();
|
|
277
280
|
export const text2HtmlImageProviderSchema = z.enum(htmlLLMProvider).default(defaultProviders.text2Html);
|
|
278
|
-
export const text2MovieProviderSchema = z.enum(Object.keys(provider2MovieAgent)).default(defaultProviders.text2movie);
|
|
279
281
|
// NOTE: This is UI only. (until we figure out how to use it in mulmoMovieParamsSchema)
|
|
280
282
|
export const mulmoGoogleMovieModelSchema = z
|
|
281
283
|
.object({
|
|
@@ -296,10 +298,10 @@ export const mulmoTransitionSchema = z.object({
|
|
|
296
298
|
});
|
|
297
299
|
export const mulmoMovieParamsSchema = z
|
|
298
300
|
.object({
|
|
299
|
-
provider: text2MovieProviderSchema.optional(),
|
|
300
|
-
model: z.string().optional(), // default: provider specific
|
|
301
|
-
transition: mulmoTransitionSchema.optional(),
|
|
302
|
-
fillOption: mulmoFillOptionSchema.optional(),
|
|
301
|
+
provider: text2MovieProviderSchema.optional(), // for agent
|
|
302
|
+
model: z.string().optional(), // default: provider specific. for agent
|
|
303
|
+
transition: mulmoTransitionSchema.optional(), // for movie.ts
|
|
304
|
+
fillOption: mulmoFillOptionSchema.optional(), // for movie.ts
|
|
303
305
|
})
|
|
304
306
|
.strict();
|
|
305
307
|
export const mulmoPresentationStyleSchema = z.object({
|
|
@@ -307,16 +309,21 @@ export const mulmoPresentationStyleSchema = z.object({
|
|
|
307
309
|
canvasSize: mulmoCanvasDimensionSchema, // has default value
|
|
308
310
|
speechParams: mulmoSpeechParamsSchema.default({
|
|
309
311
|
speakers: {
|
|
310
|
-
|
|
312
|
+
[defaultSpeaker]: {
|
|
311
313
|
voiceId: "shimmer",
|
|
312
314
|
displayName: {
|
|
313
|
-
en:
|
|
315
|
+
en: defaultSpeaker,
|
|
314
316
|
},
|
|
315
317
|
},
|
|
316
318
|
},
|
|
317
319
|
}),
|
|
318
|
-
imageParams: mulmoImageParamsSchema.optional()
|
|
319
|
-
|
|
320
|
+
imageParams: mulmoImageParamsSchema.optional().default({
|
|
321
|
+
provider: defaultProviders.text2image,
|
|
322
|
+
images: {},
|
|
323
|
+
}),
|
|
324
|
+
movieParams: mulmoMovieParamsSchema.optional().default({
|
|
325
|
+
provider: defaultProviders.text2movie,
|
|
326
|
+
}),
|
|
320
327
|
htmlImageParams: mulmoHtmlImageParamsSchema
|
|
321
328
|
.extend({
|
|
322
329
|
provider: text2HtmlImageProviderSchema,
|
package/lib/types/type.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { langSchema, localizedTextSchema, mulmoBeatSchema, mulmoScriptSchema, mulmoStudioSchema, mulmoStudioBeatSchema, mulmoStoryboardSchema, mulmoStoryboardSceneSchema, mulmoStudioMultiLingualSchema, mulmoStudioMultiLingualDataSchema, speakerDictionarySchema, mulmoImageParamsSchema, mulmoImageParamsImagesSchema, mulmoFillOptionSchema, mulmoMovieParamsSchema, mulmoSpeechParamsSchema, textSlideParamsSchema, speechOptionsSchema, speakerDataSchema, mulmoCanvasDimensionSchema, mulmoScriptTemplateSchema, mulmoScriptTemplateFileSchema, text2ImageProviderSchema, text2HtmlImageProviderSchema, text2MovieProviderSchema, text2SpeechProviderSchema, mulmoPresentationStyleSchema, multiLingualTextsSchema, mulmoMermaidMediaSchema, mulmoTextSlideMediaSchema, mulmoMarkdownMediaSchema, mulmoImageMediaSchema, mulmoChartMediaSchema, mediaSourceSchema, mulmoSessionStateSchema, mulmoOpenAIImageModelSchema, mulmoGoogleImageModelSchema, mulmoGoogleMovieModelSchema, mulmoReplicateMovieModelSchema, mulmoImagePromptMediaSchema } from "./schema.js";
|
|
1
|
+
import { langSchema, localizedTextSchema, mulmoBeatSchema, mulmoScriptSchema, mulmoStudioSchema, mulmoStudioBeatSchema, mulmoStoryboardSchema, mulmoStoryboardSceneSchema, mulmoStudioMultiLingualSchema, mulmoStudioMultiLingualDataSchema, speakerDictionarySchema, mulmoImageParamsSchema, mulmoImageParamsImagesSchema, mulmoFillOptionSchema, mulmoMovieParamsSchema, mulmoSpeechParamsSchema, textSlideParamsSchema, speechOptionsSchema, speakerDataSchema, mulmoCanvasDimensionSchema, mulmoScriptTemplateSchema, mulmoScriptTemplateFileSchema, text2ImageProviderSchema, text2HtmlImageProviderSchema, text2MovieProviderSchema, text2SpeechProviderSchema, mulmoPresentationStyleSchema, multiLingualTextsSchema, mulmoImageAssetSchema, mulmoMermaidMediaSchema, mulmoTextSlideMediaSchema, mulmoMarkdownMediaSchema, mulmoImageMediaSchema, mulmoChartMediaSchema, mediaSourceSchema, mulmoSessionStateSchema, mulmoOpenAIImageModelSchema, mulmoGoogleImageModelSchema, mulmoGoogleMovieModelSchema, mulmoReplicateMovieModelSchema, mulmoImagePromptMediaSchema } from "./schema.js";
|
|
2
2
|
import { pdf_modes, pdf_sizes, storyToScriptGenerateMode } from "../utils/const.js";
|
|
3
|
-
import { LLM } from "../utils/
|
|
3
|
+
import type { LLM } from "../utils/provider2agent.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
export type LANG = z.infer<typeof langSchema>;
|
|
6
6
|
export type MulmoBeat = z.infer<typeof mulmoBeatSchema>;
|
|
@@ -36,6 +36,7 @@ export type MulmoGoogleImageModel = z.infer<typeof mulmoGoogleImageModelSchema>;
|
|
|
36
36
|
export type MulmoGoogleMovieModel = z.infer<typeof mulmoGoogleMovieModelSchema>;
|
|
37
37
|
export type MulmoReplicateMovieModel = z.infer<typeof mulmoReplicateMovieModelSchema>;
|
|
38
38
|
export type MulmoImagePromptMedia = z.infer<typeof mulmoImagePromptMediaSchema>;
|
|
39
|
+
export type MulmoImageAsset = z.infer<typeof mulmoImageAssetSchema>;
|
|
39
40
|
export type MulmoTextSlideMedia = z.infer<typeof mulmoTextSlideMediaSchema>;
|
|
40
41
|
export type MulmoMarkdownMedia = z.infer<typeof mulmoMarkdownMediaSchema>;
|
|
41
42
|
export type MulmoImageMedia = z.infer<typeof mulmoImageMediaSchema>;
|
package/lib/utils/context.d.ts
CHANGED
|
@@ -19,6 +19,31 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
19
19
|
captionFile?: string | undefined;
|
|
20
20
|
}[];
|
|
21
21
|
script: {
|
|
22
|
+
imageParams: {
|
|
23
|
+
provider: string;
|
|
24
|
+
model?: string | undefined;
|
|
25
|
+
style?: string | undefined;
|
|
26
|
+
moderation?: string | undefined;
|
|
27
|
+
images?: Record<string, {
|
|
28
|
+
type: "image";
|
|
29
|
+
source: {
|
|
30
|
+
url: string;
|
|
31
|
+
kind: "url";
|
|
32
|
+
} | {
|
|
33
|
+
kind: "base64";
|
|
34
|
+
data: string;
|
|
35
|
+
} | {
|
|
36
|
+
text: string;
|
|
37
|
+
kind: "text";
|
|
38
|
+
} | {
|
|
39
|
+
path: string;
|
|
40
|
+
kind: "path";
|
|
41
|
+
};
|
|
42
|
+
} | {
|
|
43
|
+
type: "imagePrompt";
|
|
44
|
+
prompt: string;
|
|
45
|
+
}> | undefined;
|
|
46
|
+
};
|
|
22
47
|
audioParams: {
|
|
23
48
|
padding: number;
|
|
24
49
|
introPadding: number;
|
|
@@ -41,6 +66,17 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
41
66
|
kind: "path";
|
|
42
67
|
} | undefined;
|
|
43
68
|
};
|
|
69
|
+
movieParams: {
|
|
70
|
+
provider?: string | undefined;
|
|
71
|
+
model?: string | undefined;
|
|
72
|
+
fillOption?: {
|
|
73
|
+
style: "aspectFit" | "aspectFill";
|
|
74
|
+
} | undefined;
|
|
75
|
+
transition?: {
|
|
76
|
+
type: "fade" | "slideout_left";
|
|
77
|
+
duration: number;
|
|
78
|
+
} | undefined;
|
|
79
|
+
};
|
|
44
80
|
$mulmocast: {
|
|
45
81
|
version: "1.0";
|
|
46
82
|
credit?: "closing" | undefined;
|
|
@@ -228,6 +264,7 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
228
264
|
} | undefined;
|
|
229
265
|
movieParams?: {
|
|
230
266
|
speed?: number | undefined;
|
|
267
|
+
provider?: string | undefined;
|
|
231
268
|
model?: string | undefined;
|
|
232
269
|
fillOption?: {
|
|
233
270
|
style: "aspectFit" | "aspectFill";
|
|
@@ -255,42 +292,6 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
255
292
|
lang?: string | undefined;
|
|
256
293
|
title?: string | undefined;
|
|
257
294
|
description?: string | undefined;
|
|
258
|
-
imageParams?: {
|
|
259
|
-
provider: string;
|
|
260
|
-
model?: string | undefined;
|
|
261
|
-
style?: string | undefined;
|
|
262
|
-
moderation?: string | undefined;
|
|
263
|
-
images?: Record<string, {
|
|
264
|
-
type: "image";
|
|
265
|
-
source: {
|
|
266
|
-
url: string;
|
|
267
|
-
kind: "url";
|
|
268
|
-
} | {
|
|
269
|
-
kind: "base64";
|
|
270
|
-
data: string;
|
|
271
|
-
} | {
|
|
272
|
-
text: string;
|
|
273
|
-
kind: "text";
|
|
274
|
-
} | {
|
|
275
|
-
path: string;
|
|
276
|
-
kind: "path";
|
|
277
|
-
};
|
|
278
|
-
} | {
|
|
279
|
-
type: "imagePrompt";
|
|
280
|
-
prompt: string;
|
|
281
|
-
}> | undefined;
|
|
282
|
-
} | undefined;
|
|
283
|
-
movieParams?: {
|
|
284
|
-
provider?: string | undefined;
|
|
285
|
-
model?: string | undefined;
|
|
286
|
-
fillOption?: {
|
|
287
|
-
style: "aspectFit" | "aspectFill";
|
|
288
|
-
} | undefined;
|
|
289
|
-
transition?: {
|
|
290
|
-
type: "fade" | "slideout_left";
|
|
291
|
-
duration: number;
|
|
292
|
-
} | undefined;
|
|
293
|
-
} | undefined;
|
|
294
295
|
htmlImageParams?: {
|
|
295
296
|
provider: string;
|
|
296
297
|
model?: string | undefined;
|
|
@@ -336,6 +337,31 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
336
337
|
};
|
|
337
338
|
};
|
|
338
339
|
presentationStyle: {
|
|
340
|
+
imageParams: {
|
|
341
|
+
provider: string;
|
|
342
|
+
model?: string | undefined;
|
|
343
|
+
style?: string | undefined;
|
|
344
|
+
moderation?: string | undefined;
|
|
345
|
+
images?: Record<string, {
|
|
346
|
+
type: "image";
|
|
347
|
+
source: {
|
|
348
|
+
url: string;
|
|
349
|
+
kind: "url";
|
|
350
|
+
} | {
|
|
351
|
+
kind: "base64";
|
|
352
|
+
data: string;
|
|
353
|
+
} | {
|
|
354
|
+
text: string;
|
|
355
|
+
kind: "text";
|
|
356
|
+
} | {
|
|
357
|
+
path: string;
|
|
358
|
+
kind: "path";
|
|
359
|
+
};
|
|
360
|
+
} | {
|
|
361
|
+
type: "imagePrompt";
|
|
362
|
+
prompt: string;
|
|
363
|
+
}> | undefined;
|
|
364
|
+
};
|
|
339
365
|
audioParams: {
|
|
340
366
|
padding: number;
|
|
341
367
|
introPadding: number;
|
|
@@ -358,6 +384,17 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
358
384
|
kind: "path";
|
|
359
385
|
} | undefined;
|
|
360
386
|
};
|
|
387
|
+
movieParams: {
|
|
388
|
+
provider?: string | undefined;
|
|
389
|
+
model?: string | undefined;
|
|
390
|
+
fillOption?: {
|
|
391
|
+
style: "aspectFit" | "aspectFill";
|
|
392
|
+
} | undefined;
|
|
393
|
+
transition?: {
|
|
394
|
+
type: "fade" | "slideout_left";
|
|
395
|
+
duration: number;
|
|
396
|
+
} | undefined;
|
|
397
|
+
};
|
|
361
398
|
$mulmocast: {
|
|
362
399
|
version: "1.0";
|
|
363
400
|
credit?: "closing" | undefined;
|
|
@@ -380,42 +417,6 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
|
|
|
380
417
|
}>;
|
|
381
418
|
model?: string | undefined;
|
|
382
419
|
};
|
|
383
|
-
imageParams?: {
|
|
384
|
-
provider: string;
|
|
385
|
-
model?: string | undefined;
|
|
386
|
-
style?: string | undefined;
|
|
387
|
-
moderation?: string | undefined;
|
|
388
|
-
images?: Record<string, {
|
|
389
|
-
type: "image";
|
|
390
|
-
source: {
|
|
391
|
-
url: string;
|
|
392
|
-
kind: "url";
|
|
393
|
-
} | {
|
|
394
|
-
kind: "base64";
|
|
395
|
-
data: string;
|
|
396
|
-
} | {
|
|
397
|
-
text: string;
|
|
398
|
-
kind: "text";
|
|
399
|
-
} | {
|
|
400
|
-
path: string;
|
|
401
|
-
kind: "path";
|
|
402
|
-
};
|
|
403
|
-
} | {
|
|
404
|
-
type: "imagePrompt";
|
|
405
|
-
prompt: string;
|
|
406
|
-
}> | undefined;
|
|
407
|
-
} | undefined;
|
|
408
|
-
movieParams?: {
|
|
409
|
-
provider?: string | undefined;
|
|
410
|
-
model?: string | undefined;
|
|
411
|
-
fillOption?: {
|
|
412
|
-
style: "aspectFit" | "aspectFill";
|
|
413
|
-
} | undefined;
|
|
414
|
-
transition?: {
|
|
415
|
-
type: "fade" | "slideout_left";
|
|
416
|
-
duration: number;
|
|
417
|
-
} | undefined;
|
|
418
|
-
} | undefined;
|
|
419
420
|
htmlImageParams?: {
|
|
420
421
|
provider: string;
|
|
421
422
|
model?: string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ffmpeg from "fluent-ffmpeg";
|
|
2
2
|
import { GraphAILogger } from "graphai";
|
|
3
|
+
import fs from "fs";
|
|
3
4
|
export const setFfmpegPath = (ffmpegPath) => {
|
|
4
5
|
ffmpeg.setFfmpegPath(ffmpegPath);
|
|
5
6
|
};
|
|
@@ -61,6 +62,11 @@ export const FfmpegContextGenerateOutput = (context, output, options = []) => {
|
|
|
61
62
|
};
|
|
62
63
|
export const ffmpegGetMediaDuration = (filePath) => {
|
|
63
64
|
return new Promise((resolve, reject) => {
|
|
65
|
+
// Only check file existence for local paths, not URLs
|
|
66
|
+
if (!filePath.startsWith("http://") && !filePath.startsWith("https://") && !fs.existsSync(filePath)) {
|
|
67
|
+
reject(new Error(`File not found: ${filePath}`));
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
64
70
|
ffmpeg.ffprobe(filePath, (err, metadata) => {
|
|
65
71
|
if (err) {
|
|
66
72
|
GraphAILogger.info("Error while getting metadata:", err);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const imageType = "image";
|
|
2
|
-
export declare const process: (params: import("../../index.
|
|
3
|
-
export declare const path: (params: import("../../index.
|
|
2
|
+
export declare const process: (params: import("../../index.common.js").ImageProcessorParams) => string | undefined;
|
|
3
|
+
export declare const path: (params: import("../../index.common.js").ImageProcessorParams) => string | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const imageType = "movie";
|
|
2
|
-
export declare const process: (params: import("../../index.
|
|
3
|
-
export declare const path: (params: import("../../index.
|
|
2
|
+
export declare const process: (params: import("../../index.common.js").ImageProcessorParams) => string | undefined;
|
|
3
|
+
export declare const path: (params: import("../../index.common.js").ImageProcessorParams) => string | undefined;
|
|
@@ -14,6 +14,31 @@ export declare const createOrUpdateStudioData: (_mulmoScript: MulmoScript, curre
|
|
|
14
14
|
captionFile?: string | undefined;
|
|
15
15
|
}[];
|
|
16
16
|
script: {
|
|
17
|
+
imageParams: {
|
|
18
|
+
provider: string;
|
|
19
|
+
model?: string | undefined;
|
|
20
|
+
style?: string | undefined;
|
|
21
|
+
moderation?: string | undefined;
|
|
22
|
+
images?: Record<string, {
|
|
23
|
+
type: "image";
|
|
24
|
+
source: {
|
|
25
|
+
url: string;
|
|
26
|
+
kind: "url";
|
|
27
|
+
} | {
|
|
28
|
+
kind: "base64";
|
|
29
|
+
data: string;
|
|
30
|
+
} | {
|
|
31
|
+
text: string;
|
|
32
|
+
kind: "text";
|
|
33
|
+
} | {
|
|
34
|
+
path: string;
|
|
35
|
+
kind: "path";
|
|
36
|
+
};
|
|
37
|
+
} | {
|
|
38
|
+
type: "imagePrompt";
|
|
39
|
+
prompt: string;
|
|
40
|
+
}> | undefined;
|
|
41
|
+
};
|
|
17
42
|
audioParams: {
|
|
18
43
|
padding: number;
|
|
19
44
|
introPadding: number;
|
|
@@ -36,6 +61,17 @@ export declare const createOrUpdateStudioData: (_mulmoScript: MulmoScript, curre
|
|
|
36
61
|
kind: "path";
|
|
37
62
|
} | undefined;
|
|
38
63
|
};
|
|
64
|
+
movieParams: {
|
|
65
|
+
provider?: string | undefined;
|
|
66
|
+
model?: string | undefined;
|
|
67
|
+
fillOption?: {
|
|
68
|
+
style: "aspectFit" | "aspectFill";
|
|
69
|
+
} | undefined;
|
|
70
|
+
transition?: {
|
|
71
|
+
type: "fade" | "slideout_left";
|
|
72
|
+
duration: number;
|
|
73
|
+
} | undefined;
|
|
74
|
+
};
|
|
39
75
|
$mulmocast: {
|
|
40
76
|
version: "1.0";
|
|
41
77
|
credit?: "closing" | undefined;
|
|
@@ -223,6 +259,7 @@ export declare const createOrUpdateStudioData: (_mulmoScript: MulmoScript, curre
|
|
|
223
259
|
} | undefined;
|
|
224
260
|
movieParams?: {
|
|
225
261
|
speed?: number | undefined;
|
|
262
|
+
provider?: string | undefined;
|
|
226
263
|
model?: string | undefined;
|
|
227
264
|
fillOption?: {
|
|
228
265
|
style: "aspectFit" | "aspectFill";
|
|
@@ -250,42 +287,6 @@ export declare const createOrUpdateStudioData: (_mulmoScript: MulmoScript, curre
|
|
|
250
287
|
lang?: string | undefined;
|
|
251
288
|
title?: string | undefined;
|
|
252
289
|
description?: string | undefined;
|
|
253
|
-
imageParams?: {
|
|
254
|
-
provider: string;
|
|
255
|
-
model?: string | undefined;
|
|
256
|
-
style?: string | undefined;
|
|
257
|
-
moderation?: string | undefined;
|
|
258
|
-
images?: Record<string, {
|
|
259
|
-
type: "image";
|
|
260
|
-
source: {
|
|
261
|
-
url: string;
|
|
262
|
-
kind: "url";
|
|
263
|
-
} | {
|
|
264
|
-
kind: "base64";
|
|
265
|
-
data: string;
|
|
266
|
-
} | {
|
|
267
|
-
text: string;
|
|
268
|
-
kind: "text";
|
|
269
|
-
} | {
|
|
270
|
-
path: string;
|
|
271
|
-
kind: "path";
|
|
272
|
-
};
|
|
273
|
-
} | {
|
|
274
|
-
type: "imagePrompt";
|
|
275
|
-
prompt: string;
|
|
276
|
-
}> | undefined;
|
|
277
|
-
} | undefined;
|
|
278
|
-
movieParams?: {
|
|
279
|
-
provider?: string | undefined;
|
|
280
|
-
model?: string | undefined;
|
|
281
|
-
fillOption?: {
|
|
282
|
-
style: "aspectFit" | "aspectFill";
|
|
283
|
-
} | undefined;
|
|
284
|
-
transition?: {
|
|
285
|
-
type: "fade" | "slideout_left";
|
|
286
|
-
duration: number;
|
|
287
|
-
} | undefined;
|
|
288
|
-
} | undefined;
|
|
289
290
|
htmlImageParams?: {
|
|
290
291
|
provider: string;
|
|
291
292
|
model?: string | undefined;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
export declare const defaultProviders: {
|
|
2
|
-
tts: string;
|
|
3
|
-
text2image: string;
|
|
4
|
-
text2movie: string;
|
|
5
|
-
text2Html: string;
|
|
6
|
-
llm: string;
|
|
7
|
-
};
|
|
8
1
|
export declare const provider2TTSAgent: {
|
|
9
2
|
nijivoice: {
|
|
10
3
|
agentName: string;
|
|
@@ -42,10 +35,12 @@ export declare const provider2ImageAgent: {
|
|
|
42
35
|
export declare const provider2MovieAgent: {
|
|
43
36
|
replicate: {
|
|
44
37
|
agentName: string;
|
|
38
|
+
defaultModel: `${string}/${string}`;
|
|
45
39
|
models: string[];
|
|
46
40
|
};
|
|
47
41
|
google: {
|
|
48
42
|
agentName: string;
|
|
43
|
+
defaultModel: string;
|
|
49
44
|
models: string[];
|
|
50
45
|
};
|
|
51
46
|
};
|
|
@@ -71,6 +66,13 @@ export declare const provider2LLMAgent: {
|
|
|
71
66
|
readonly max_tokens: 4096;
|
|
72
67
|
};
|
|
73
68
|
};
|
|
69
|
+
export declare const defaultProviders: {
|
|
70
|
+
tts: keyof typeof provider2TTSAgent;
|
|
71
|
+
text2image: keyof typeof provider2ImageAgent;
|
|
72
|
+
text2movie: keyof typeof provider2MovieAgent;
|
|
73
|
+
text2Html: keyof typeof provider2LLMAgent;
|
|
74
|
+
llm: keyof typeof provider2LLMAgent;
|
|
75
|
+
};
|
|
74
76
|
export declare const llm: (keyof typeof provider2LLMAgent)[];
|
|
75
77
|
export type LLM = keyof typeof provider2LLMAgent;
|
|
76
78
|
export declare const htmlLLMProvider: string[];
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
export const defaultProviders = {
|
|
2
|
-
tts: "openai",
|
|
3
|
-
text2image: "openai",
|
|
4
|
-
text2movie: "google",
|
|
5
|
-
text2Html: "openai",
|
|
6
|
-
llm: "openai",
|
|
7
|
-
};
|
|
8
1
|
export const provider2TTSAgent = {
|
|
9
2
|
nijivoice: {
|
|
10
3
|
agentName: "ttsNijivoiceAgent",
|
|
@@ -44,19 +37,24 @@ export const provider2ImageAgent = {
|
|
|
44
37
|
export const provider2MovieAgent = {
|
|
45
38
|
replicate: {
|
|
46
39
|
agentName: "movieReplicateAgent",
|
|
40
|
+
defaultModel: "bytedance/seedance-1-lite",
|
|
47
41
|
models: [
|
|
48
42
|
"bytedance/seedance-1-lite",
|
|
49
43
|
"bytedance/seedance-1-pro",
|
|
50
44
|
"kwaivgi/kling-v1.6-pro",
|
|
51
45
|
"kwaivgi/kling-v2.1",
|
|
46
|
+
"kwaivgi/kling-v2.1-master",
|
|
52
47
|
"google/veo-2",
|
|
53
48
|
"google/veo-3",
|
|
54
49
|
"google/veo-3-fast",
|
|
55
50
|
"minimax/video-01",
|
|
51
|
+
"minimax/hailuo-02",
|
|
52
|
+
"pixverse/pixverse-v4.5",
|
|
56
53
|
],
|
|
57
54
|
},
|
|
58
55
|
google: {
|
|
59
56
|
agentName: "movieGoogleAgent",
|
|
57
|
+
defaultModel: "veo-2.0-generate-001",
|
|
60
58
|
models: ["veo-2.0-generate-001"],
|
|
61
59
|
},
|
|
62
60
|
};
|
|
@@ -83,5 +81,12 @@ export const provider2LLMAgent = {
|
|
|
83
81
|
max_tokens: 4096,
|
|
84
82
|
},
|
|
85
83
|
};
|
|
84
|
+
export const defaultProviders = {
|
|
85
|
+
tts: "openai",
|
|
86
|
+
text2image: "openai",
|
|
87
|
+
text2movie: "replicate",
|
|
88
|
+
text2Html: "openai",
|
|
89
|
+
llm: "openai",
|
|
90
|
+
};
|
|
86
91
|
export const llm = Object.keys(provider2LLMAgent);
|
|
87
92
|
export const htmlLLMProvider = ["openai", "anthropic"];
|
package/lib/utils/utils.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { ConfigDataDictionary, DefaultConfigData } from "graphai";
|
|
2
2
|
import { MulmoBeat, MulmoStudioMultiLingualData } from "../types/index.js";
|
|
3
|
-
import { llm } from "./provider2agent.js";
|
|
4
3
|
import type { LLM } from "./provider2agent.js";
|
|
5
|
-
export { LLM, llm };
|
|
6
4
|
export declare const llmPair: (_llm?: LLM, _model?: string) => {
|
|
7
5
|
agent: "openAIAgent" | "anthropicAgent" | "geminiAgent" | "groqAgent";
|
|
8
6
|
model: string;
|
|
@@ -22,3 +20,4 @@ type CleanableObject = {
|
|
|
22
20
|
[key: string]: CleanableValue;
|
|
23
21
|
};
|
|
24
22
|
export declare const deepClean: <T extends CleanableValue>(input: T) => T | undefined;
|
|
23
|
+
export {};
|
package/lib/utils/utils.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as crypto from "crypto";
|
|
2
|
-
import { provider2LLMAgent
|
|
3
|
-
export { llm };
|
|
2
|
+
import { provider2LLMAgent } from "./provider2agent.js";
|
|
4
3
|
export const llmPair = (_llm, _model) => {
|
|
5
4
|
const llmKey = _llm ?? "openai";
|
|
6
5
|
const agent = provider2LLMAgent[llmKey]?.agentName ?? provider2LLMAgent.openai.agentName;
|
|
@@ -56,12 +55,18 @@ export const settings2GraphAIConfig = (settings, env) => {
|
|
|
56
55
|
apiKey: getKey("IMAGE", "OPENAI_API_KEY"),
|
|
57
56
|
baseURL: getKey("IMAGE", "OPENAI_BASE_URL"),
|
|
58
57
|
},
|
|
58
|
+
imageGoogleAgent: {
|
|
59
|
+
projectId: getKey("IMAGE", "GOOGLE_PROJECT_ID"),
|
|
60
|
+
},
|
|
59
61
|
anthropicAgent: {
|
|
60
62
|
apiKey: getKey("LLM", "ANTHROPIC_API_TOKEN"),
|
|
61
63
|
},
|
|
62
64
|
movieReplicateAgent: {
|
|
63
65
|
apiKey: getKey("MOVIE", "REPLICATE_API_TOKEN"),
|
|
64
66
|
},
|
|
67
|
+
movieGoogleAgent: {
|
|
68
|
+
projectId: getKey("MOVIE", "GOOGLE_PROJECT_ID"),
|
|
69
|
+
},
|
|
65
70
|
ttsNijivoiceAgent: {
|
|
66
71
|
apiKey: getKey("TTS", "NIJIVOICE_API_KEY"),
|
|
67
72
|
},
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mulmocast",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "lib/index.js",
|
|
6
|
+
"main": "lib/index.node.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"types": "./lib/index.d.ts",
|
|
10
|
-
"default": "./lib/index.js"
|
|
9
|
+
"types": "./lib/index.node.d.ts",
|
|
10
|
+
"default": "./lib/index.node.js"
|
|
11
11
|
},
|
|
12
12
|
"./browser": {
|
|
13
13
|
"types": "./lib/index.browser.d.ts",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@graphai/input_agents": "^1.0.1",
|
|
68
68
|
"@graphai/openai_agent": "^2.0.3",
|
|
69
69
|
"@graphai/stream_agent_filter": "^2.0.2",
|
|
70
|
-
"@graphai/vanilla": "^2.0.
|
|
70
|
+
"@graphai/vanilla": "^2.0.6",
|
|
71
71
|
"@graphai/vanilla_node_agents": "^2.0.1",
|
|
72
72
|
"@modelcontextprotocol/sdk": "^1.15.1",
|
|
73
73
|
"@tavily/core": "^0.5.9",
|
|
@@ -75,12 +75,12 @@
|
|
|
75
75
|
"clipboardy": "^4.0.0",
|
|
76
76
|
"dotenv": "^17.2.0",
|
|
77
77
|
"fluent-ffmpeg": "^2.1.3",
|
|
78
|
-
"google-auth-library": "^
|
|
79
|
-
"graphai": "^2.0.
|
|
78
|
+
"google-auth-library": "^10.1.0",
|
|
79
|
+
"graphai": "^2.0.13",
|
|
80
80
|
"inquirer": "^12.7.0",
|
|
81
|
-
"marked": "^16.
|
|
81
|
+
"marked": "^16.1.1",
|
|
82
82
|
"ora": "^8.2.0",
|
|
83
|
-
"puppeteer": "^24.
|
|
83
|
+
"puppeteer": "^24.14.0",
|
|
84
84
|
"replicate": "^1.0.1",
|
|
85
85
|
"yaml": "^2.8.0",
|
|
86
86
|
"yargs": "^18.0.0",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
"@types/fluent-ffmpeg": "^2.1.26",
|
|
95
95
|
"@types/yargs": "^17.0.33",
|
|
96
96
|
"eslint": "^9.31.0",
|
|
97
|
-
"eslint-config-prettier": "^10.1.
|
|
98
|
-
"eslint-plugin-prettier": "^5.5.
|
|
97
|
+
"eslint-config-prettier": "^10.1.8",
|
|
98
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
99
99
|
"eslint-plugin-sonarjs": "^3.0.4",
|
|
100
100
|
"prettier": "^3.6.2",
|
|
101
101
|
"ts-node": "^10.9.2",
|