mulmocast 0.1.2 → 0.1.3
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/characters.json +16 -0
- package/assets/templates/html.json +6 -0
- package/lib/actions/audio.js +8 -6
- package/lib/actions/image_agents.d.ts +121 -0
- package/lib/actions/image_agents.js +56 -0
- package/lib/actions/image_references.d.ts +9 -0
- package/lib/actions/image_references.js +79 -0
- package/lib/actions/images.d.ts +9 -109
- package/lib/actions/images.js +68 -184
- package/lib/actions/index.d.ts +2 -0
- package/lib/actions/index.js +2 -0
- package/lib/actions/movie.js +3 -1
- package/lib/actions/pdf.js +5 -2
- package/lib/agents/image_google_agent.d.ts +2 -15
- package/lib/agents/image_google_agent.js +3 -3
- package/lib/agents/image_openai_agent.d.ts +2 -17
- package/lib/agents/image_openai_agent.js +7 -7
- package/lib/agents/movie_google_agent.d.ts +2 -17
- package/lib/agents/movie_google_agent.js +7 -7
- package/lib/agents/movie_replicate_agent.d.ts +2 -16
- package/lib/agents/movie_replicate_agent.js +3 -3
- package/lib/agents/tts_google_agent.d.ts +9 -1
- package/lib/agents/tts_google_agent.js +2 -2
- package/lib/agents/tts_nijivoice_agent.js +1 -1
- package/lib/agents/tts_openai_agent.d.ts +13 -1
- package/lib/agents/tts_openai_agent.js +2 -2
- package/lib/cli/helpers.js +7 -7
- package/lib/methods/index.d.ts +1 -0
- package/lib/methods/index.js +1 -0
- package/lib/methods/mulmo_beat.d.ts +6 -0
- package/lib/methods/mulmo_beat.js +21 -0
- package/lib/methods/mulmo_presentation_style.d.ts +2 -0
- package/lib/methods/mulmo_presentation_style.js +24 -0
- package/lib/methods/mulmo_studio_context.js +3 -0
- package/lib/tools/story_to_script.js +2 -2
- package/lib/types/agent.d.ts +55 -0
- package/lib/types/agent.js +3 -0
- package/lib/types/schema.d.ts +317 -74
- package/lib/types/schema.js +9 -2
- package/lib/types/type.d.ts +3 -2
- package/lib/utils/context.d.ts +12 -2
- package/lib/utils/context.js +1 -0
- package/lib/utils/ffmpeg_utils.d.ts +1 -1
- package/lib/utils/ffmpeg_utils.js +1 -1
- package/lib/utils/file.js +4 -4
- package/lib/utils/filters.js +3 -4
- package/lib/utils/markdown.js +1 -1
- package/lib/utils/preprocess.d.ts +8 -2
- package/lib/utils/string.js +5 -5
- package/lib/utils/utils.d.ts +8 -1
- package/lib/utils/utils.js +51 -36
- package/package.json +7 -6
- package/scripts/templates/html.json +42 -0
- package/scripts/templates/image_refs.json +35 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Story with multiple characters",
|
|
3
|
+
"description": "Template for story with multiple characters.",
|
|
4
|
+
"presentationStyle": {
|
|
5
|
+
"$mulmocast": {
|
|
6
|
+
"version": "1.0",
|
|
7
|
+
"credit": "closing"
|
|
8
|
+
},
|
|
9
|
+
"canvasSize": {
|
|
10
|
+
"width": 1536,
|
|
11
|
+
"height": 1024
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"systemPrompt": "Generate a script for a the given story with multiple characters. Generate image prompts for each character, and make references to them in the beats. Use the JSON below as a template.",
|
|
15
|
+
"scriptName": "image_refs.json"
|
|
16
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Business presentation in HTML",
|
|
3
|
+
"description": "Template for business presentation in HTML.",
|
|
4
|
+
"systemPrompt": "Generate a script for a business presentation of the given topic. Another LLM will generate actual slides from the prompt and data for each beat. Adding optional data would help it to generate more compelling slide. Mention the reference in one of beats, if it exists. The valid type of reference is 'article', 'paper', 'image', 'video', 'audio'. Use the JSON below as a template.",
|
|
5
|
+
"scriptName": "html.json"
|
|
6
|
+
}
|
package/lib/actions/audio.js
CHANGED
|
@@ -91,11 +91,13 @@ const graph_tts = {
|
|
|
91
91
|
agent: ":preprocessor.ttsAgent",
|
|
92
92
|
inputs: {
|
|
93
93
|
text: ":preprocessor.text",
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
cache: {
|
|
95
|
+
force: [":context.force"],
|
|
96
|
+
file: ":preprocessor.audioPath",
|
|
97
|
+
index: ":__mapIndex",
|
|
98
|
+
mulmoContext: ":context",
|
|
99
|
+
sessionType: "audio",
|
|
100
|
+
},
|
|
99
101
|
params: {
|
|
100
102
|
voice: ":preprocessor.voiceId",
|
|
101
103
|
speed: ":preprocessor.speechOptions.speed",
|
|
@@ -239,7 +241,7 @@ export const audio = async (context, settings, callbacks) => {
|
|
|
239
241
|
const outputStudioFilePath = getOutputStudioFilePath(outDirPath, fileName);
|
|
240
242
|
mkdir(outDirPath);
|
|
241
243
|
mkdir(audioSegmentDirPath);
|
|
242
|
-
const config = settings2GraphAIConfig(settings);
|
|
244
|
+
const config = settings2GraphAIConfig(settings, process.env);
|
|
243
245
|
const taskManager = new TaskManager(getConcurrency(context));
|
|
244
246
|
const graph = new GraphAI(graph_data, audioAgents, { agentFilters, taskManager, config });
|
|
245
247
|
graph.injectValue("context", context);
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { MulmoStudioContext, MulmoBeat, MulmoCanvasDimension } from "../types/index.js";
|
|
2
|
+
export declare const imagePreprocessAgent: (namedInputs: {
|
|
3
|
+
context: MulmoStudioContext;
|
|
4
|
+
beat: MulmoBeat;
|
|
5
|
+
index: number;
|
|
6
|
+
imageRefs: Record<string, string>;
|
|
7
|
+
}) => Promise<{
|
|
8
|
+
imagePath: string;
|
|
9
|
+
htmlPrompt: string | undefined;
|
|
10
|
+
htmlPath: string;
|
|
11
|
+
htmlImageSystemPrompt: string[];
|
|
12
|
+
} | {
|
|
13
|
+
imagePath: string | undefined;
|
|
14
|
+
referenceImageForMovie: string | undefined;
|
|
15
|
+
imageParams: {
|
|
16
|
+
provider: "openai" | "google";
|
|
17
|
+
style?: string | undefined;
|
|
18
|
+
model?: string | undefined;
|
|
19
|
+
moderation?: string | undefined;
|
|
20
|
+
images?: Record<string, {
|
|
21
|
+
type: "image";
|
|
22
|
+
source: {
|
|
23
|
+
url: string;
|
|
24
|
+
kind: "url";
|
|
25
|
+
} | {
|
|
26
|
+
kind: "base64";
|
|
27
|
+
data: string;
|
|
28
|
+
} | {
|
|
29
|
+
text: string;
|
|
30
|
+
kind: "text";
|
|
31
|
+
} | {
|
|
32
|
+
path: string;
|
|
33
|
+
kind: "path";
|
|
34
|
+
};
|
|
35
|
+
} | {
|
|
36
|
+
type: "imagePrompt";
|
|
37
|
+
prompt: string;
|
|
38
|
+
}> | undefined;
|
|
39
|
+
};
|
|
40
|
+
movieFile: string | undefined;
|
|
41
|
+
htmlPrompt?: undefined;
|
|
42
|
+
htmlPath?: undefined;
|
|
43
|
+
htmlImageSystemPrompt?: undefined;
|
|
44
|
+
} | {
|
|
45
|
+
imagePath: string;
|
|
46
|
+
imageFromMovie: boolean;
|
|
47
|
+
imageParams: {
|
|
48
|
+
provider: "openai" | "google";
|
|
49
|
+
style?: string | undefined;
|
|
50
|
+
model?: string | undefined;
|
|
51
|
+
moderation?: string | undefined;
|
|
52
|
+
images?: Record<string, {
|
|
53
|
+
type: "image";
|
|
54
|
+
source: {
|
|
55
|
+
url: string;
|
|
56
|
+
kind: "url";
|
|
57
|
+
} | {
|
|
58
|
+
kind: "base64";
|
|
59
|
+
data: string;
|
|
60
|
+
} | {
|
|
61
|
+
text: string;
|
|
62
|
+
kind: "text";
|
|
63
|
+
} | {
|
|
64
|
+
path: string;
|
|
65
|
+
kind: "path";
|
|
66
|
+
};
|
|
67
|
+
} | {
|
|
68
|
+
type: "imagePrompt";
|
|
69
|
+
prompt: string;
|
|
70
|
+
}> | undefined;
|
|
71
|
+
};
|
|
72
|
+
movieFile: string | undefined;
|
|
73
|
+
htmlPrompt?: undefined;
|
|
74
|
+
htmlPath?: undefined;
|
|
75
|
+
htmlImageSystemPrompt?: undefined;
|
|
76
|
+
} | {
|
|
77
|
+
imagePath: string;
|
|
78
|
+
referenceImageForMovie: string;
|
|
79
|
+
imageAgentInfo: import("../types/type.js").Text2ImageAgentInfo;
|
|
80
|
+
prompt: string;
|
|
81
|
+
referenceImages: string[];
|
|
82
|
+
imageParams: {
|
|
83
|
+
provider: "openai" | "google";
|
|
84
|
+
style?: string | undefined;
|
|
85
|
+
model?: string | undefined;
|
|
86
|
+
moderation?: string | undefined;
|
|
87
|
+
images?: Record<string, {
|
|
88
|
+
type: "image";
|
|
89
|
+
source: {
|
|
90
|
+
url: string;
|
|
91
|
+
kind: "url";
|
|
92
|
+
} | {
|
|
93
|
+
kind: "base64";
|
|
94
|
+
data: string;
|
|
95
|
+
} | {
|
|
96
|
+
text: string;
|
|
97
|
+
kind: "text";
|
|
98
|
+
} | {
|
|
99
|
+
path: string;
|
|
100
|
+
kind: "path";
|
|
101
|
+
};
|
|
102
|
+
} | {
|
|
103
|
+
type: "imagePrompt";
|
|
104
|
+
prompt: string;
|
|
105
|
+
}> | undefined;
|
|
106
|
+
};
|
|
107
|
+
movieFile: string | undefined;
|
|
108
|
+
htmlPrompt?: undefined;
|
|
109
|
+
htmlPath?: undefined;
|
|
110
|
+
htmlImageSystemPrompt?: undefined;
|
|
111
|
+
}>;
|
|
112
|
+
export declare const imagePluginAgent: (namedInputs: {
|
|
113
|
+
context: MulmoStudioContext;
|
|
114
|
+
beat: MulmoBeat;
|
|
115
|
+
index: number;
|
|
116
|
+
}) => Promise<void>;
|
|
117
|
+
export declare const htmlImageGeneratorAgent: (namedInputs: {
|
|
118
|
+
file: string;
|
|
119
|
+
canvasSize: MulmoCanvasDimension;
|
|
120
|
+
htmlText: string;
|
|
121
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { MulmoPresentationStyleMethods, MulmoStudioContextMethods, MulmoBeatMethods } from "../methods/index.js";
|
|
2
|
+
import { getBeatPngImagePath, getBeatMoviePath } from "../utils/file.js";
|
|
3
|
+
import { imagePrompt, htmlImageSystemPrompt } from "../utils/prompt.js";
|
|
4
|
+
import { renderHTMLToImage } from "../utils/markdown.js";
|
|
5
|
+
const htmlStyle = (context, beat) => {
|
|
6
|
+
return {
|
|
7
|
+
canvasSize: MulmoPresentationStyleMethods.getCanvasSize(context.presentationStyle),
|
|
8
|
+
textSlideStyle: MulmoPresentationStyleMethods.getTextSlideStyle(context.presentationStyle, beat),
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export const imagePreprocessAgent = async (namedInputs) => {
|
|
12
|
+
const { context, beat, index, imageRefs } = namedInputs;
|
|
13
|
+
const imagePath = getBeatPngImagePath(context, index);
|
|
14
|
+
if (beat.htmlPrompt) {
|
|
15
|
+
const htmlPrompt = MulmoBeatMethods.getHtmlPrompt(beat);
|
|
16
|
+
const htmlPath = imagePath.replace(/\.[^/.]+$/, ".html");
|
|
17
|
+
return { imagePath, htmlPrompt, htmlPath, htmlImageSystemPrompt: htmlImageSystemPrompt(context.presentationStyle.canvasSize) };
|
|
18
|
+
}
|
|
19
|
+
const imageAgentInfo = MulmoPresentationStyleMethods.getImageAgentInfo(context.presentationStyle, beat);
|
|
20
|
+
const returnValue = {
|
|
21
|
+
imageParams: imageAgentInfo.imageParams,
|
|
22
|
+
movieFile: beat.moviePrompt ? getBeatMoviePath(context, index) : undefined,
|
|
23
|
+
};
|
|
24
|
+
if (beat.image) {
|
|
25
|
+
const plugin = MulmoBeatMethods.getPlugin(beat);
|
|
26
|
+
const pluginPath = plugin.path({ beat, context, imagePath, ...htmlStyle(context, beat) });
|
|
27
|
+
// undefined prompt indicates that image generation is not needed
|
|
28
|
+
return { ...returnValue, imagePath: pluginPath, referenceImageForMovie: pluginPath };
|
|
29
|
+
}
|
|
30
|
+
if (beat.moviePrompt && !beat.imagePrompt) {
|
|
31
|
+
return { ...returnValue, imagePath, imageFromMovie: true }; // no image prompt, only movie prompt
|
|
32
|
+
}
|
|
33
|
+
// referenceImages for "edit_image", openai agent.
|
|
34
|
+
const referenceImages = MulmoBeatMethods.getImageReferenceForImageGenerator(beat, imageRefs);
|
|
35
|
+
const prompt = imagePrompt(beat, imageAgentInfo.imageParams.style);
|
|
36
|
+
return { ...returnValue, imagePath, referenceImageForMovie: imagePath, imageAgentInfo, prompt, referenceImages };
|
|
37
|
+
};
|
|
38
|
+
export const imagePluginAgent = async (namedInputs) => {
|
|
39
|
+
const { context, beat, index } = namedInputs;
|
|
40
|
+
const imagePath = getBeatPngImagePath(context, index);
|
|
41
|
+
const plugin = MulmoBeatMethods.getPlugin(beat);
|
|
42
|
+
try {
|
|
43
|
+
MulmoStudioContextMethods.setBeatSessionState(context, "image", index, true);
|
|
44
|
+
const processorParams = { beat, context, imagePath, ...htmlStyle(context, beat) };
|
|
45
|
+
await plugin.process(processorParams);
|
|
46
|
+
MulmoStudioContextMethods.setBeatSessionState(context, "image", index, false);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
MulmoStudioContextMethods.setBeatSessionState(context, "image", index, false);
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
export const htmlImageGeneratorAgent = async (namedInputs) => {
|
|
54
|
+
const { file, canvasSize, htmlText } = namedInputs;
|
|
55
|
+
await renderHTMLToImage(htmlText, file, canvasSize.width, canvasSize.height);
|
|
56
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MulmoStudioContext, MulmoImagePromptMedia } from "../types/index.js";
|
|
2
|
+
export declare const generateReferenceImage: (inputs: {
|
|
3
|
+
context: MulmoStudioContext;
|
|
4
|
+
key: string;
|
|
5
|
+
index: number;
|
|
6
|
+
image: MulmoImagePromptMedia;
|
|
7
|
+
force?: boolean;
|
|
8
|
+
}) => Promise<string>;
|
|
9
|
+
export declare const getImageRefs: (context: MulmoStudioContext) => Promise<Record<string, string>>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import { GraphAI } from "graphai";
|
|
3
|
+
import { getReferenceImagePath } from "../utils/file.js";
|
|
4
|
+
import { getExtention } from "../utils/utils.js";
|
|
5
|
+
import { graphOption } from "./images.js";
|
|
6
|
+
import { MulmoPresentationStyleMethods, MulmoStudioContextMethods } from "../methods/index.js";
|
|
7
|
+
import { imageGoogleAgent, imageOpenaiAgent } from "../agents/index.js";
|
|
8
|
+
// public api
|
|
9
|
+
// Application may call this function directly to generate reference image.
|
|
10
|
+
export const generateReferenceImage = async (inputs) => {
|
|
11
|
+
const { context, key, index, image, force } = inputs;
|
|
12
|
+
const imagePath = getReferenceImagePath(context, key, "png");
|
|
13
|
+
// generate image
|
|
14
|
+
const imageAgentInfo = MulmoPresentationStyleMethods.getImageAgentInfo(context.presentationStyle);
|
|
15
|
+
const prompt = `${image.prompt}\n${imageAgentInfo.imageParams.style || ""}`;
|
|
16
|
+
const image_graph_data = {
|
|
17
|
+
version: 0.5,
|
|
18
|
+
nodes: {
|
|
19
|
+
imageGenerator: {
|
|
20
|
+
agent: imageAgentInfo.agent,
|
|
21
|
+
retry: 2,
|
|
22
|
+
inputs: {
|
|
23
|
+
prompt,
|
|
24
|
+
cache: {
|
|
25
|
+
force: [context.force, force ?? false],
|
|
26
|
+
file: imagePath,
|
|
27
|
+
index,
|
|
28
|
+
mulmoContext: context,
|
|
29
|
+
sessionType: "imageReference",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
params: {
|
|
33
|
+
model: imageAgentInfo.imageParams.model,
|
|
34
|
+
canvasSize: context.presentationStyle.canvasSize,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const options = await graphOption(context);
|
|
40
|
+
const graph = new GraphAI(image_graph_data, { imageGoogleAgent, imageOpenaiAgent }, options);
|
|
41
|
+
await graph.run();
|
|
42
|
+
return imagePath;
|
|
43
|
+
};
|
|
44
|
+
const downLoadImage = async (context, key, url) => {
|
|
45
|
+
const response = await fetch(url);
|
|
46
|
+
if (!response.ok) {
|
|
47
|
+
throw new Error(`Failed to download image: ${url}`);
|
|
48
|
+
}
|
|
49
|
+
const buffer = Buffer.from(await response.arrayBuffer());
|
|
50
|
+
// Detect file extension from Content-Type header or URL
|
|
51
|
+
const extension = getExtention(response.headers.get("content-type"), url);
|
|
52
|
+
const imagePath = getReferenceImagePath(context, key, extension);
|
|
53
|
+
await fs.promises.writeFile(imagePath, buffer);
|
|
54
|
+
return imagePath;
|
|
55
|
+
};
|
|
56
|
+
export const getImageRefs = async (context) => {
|
|
57
|
+
const images = context.presentationStyle.imageParams?.images;
|
|
58
|
+
if (!images) {
|
|
59
|
+
return {};
|
|
60
|
+
}
|
|
61
|
+
const imageRefs = {};
|
|
62
|
+
await Promise.all(Object.keys(images)
|
|
63
|
+
.sort()
|
|
64
|
+
.map(async (key, index) => {
|
|
65
|
+
const image = images[key];
|
|
66
|
+
if (image.type === "imagePrompt") {
|
|
67
|
+
imageRefs[key] = await generateReferenceImage({ context, key, index, image, force: false });
|
|
68
|
+
}
|
|
69
|
+
else if (image.type === "image") {
|
|
70
|
+
if (image.source.kind === "path") {
|
|
71
|
+
imageRefs[key] = MulmoStudioContextMethods.resolveAssetPath(context, image.source.path);
|
|
72
|
+
}
|
|
73
|
+
else if (image.source.kind === "url") {
|
|
74
|
+
imageRefs[key] = await downLoadImage(context, key, image.source.url);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}));
|
|
78
|
+
return imageRefs;
|
|
79
|
+
};
|
package/lib/actions/images.d.ts
CHANGED
|
@@ -1,112 +1,12 @@
|
|
|
1
|
-
import type { CallbackFunction } from "graphai";
|
|
2
|
-
import { MulmoStudioContext
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { GraphOptions, CallbackFunction } from "graphai";
|
|
2
|
+
import { MulmoStudioContext } from "../types/index.js";
|
|
3
|
+
export declare const graphOption: (context: MulmoStudioContext, settings?: Record<string, string>) => Promise<GraphOptions>;
|
|
4
|
+
export declare const images: (context: MulmoStudioContext, settings?: Record<string, string>, callbacks?: CallbackFunction[]) => Promise<MulmoStudioContext>;
|
|
5
|
+
export declare const generateBeatImage: (inputs: {
|
|
6
6
|
index: number;
|
|
7
|
-
imageRefs: Record<string, string>;
|
|
8
|
-
}) => Promise<{
|
|
9
|
-
imageParams: {
|
|
10
|
-
provider: "openai" | "google";
|
|
11
|
-
style?: string | undefined;
|
|
12
|
-
model?: string | undefined;
|
|
13
|
-
moderation?: string | undefined;
|
|
14
|
-
images?: Record<string, {
|
|
15
|
-
type: "image";
|
|
16
|
-
source: {
|
|
17
|
-
url: string;
|
|
18
|
-
kind: "url";
|
|
19
|
-
} | {
|
|
20
|
-
kind: "base64";
|
|
21
|
-
data: string;
|
|
22
|
-
} | {
|
|
23
|
-
text: string;
|
|
24
|
-
kind: "text";
|
|
25
|
-
} | {
|
|
26
|
-
path: string;
|
|
27
|
-
kind: "path";
|
|
28
|
-
};
|
|
29
|
-
}> | undefined;
|
|
30
|
-
};
|
|
31
|
-
movieFile: string | undefined;
|
|
32
|
-
imagePath: string | undefined;
|
|
33
|
-
referenceImage: string | undefined;
|
|
34
|
-
htmlPrompt?: undefined;
|
|
35
|
-
htmlPath?: undefined;
|
|
36
|
-
htmlImageSystemPrompt?: undefined;
|
|
37
|
-
} | {
|
|
38
|
-
imagePath: string;
|
|
39
|
-
htmlPrompt: string;
|
|
40
|
-
htmlPath: string;
|
|
41
|
-
htmlImageSystemPrompt: string[];
|
|
42
|
-
} | {
|
|
43
|
-
imagePath: string;
|
|
44
|
-
images: string[];
|
|
45
|
-
imageFromMovie: boolean;
|
|
46
|
-
imageParams: {
|
|
47
|
-
provider: "openai" | "google";
|
|
48
|
-
style?: string | undefined;
|
|
49
|
-
model?: string | undefined;
|
|
50
|
-
moderation?: string | undefined;
|
|
51
|
-
images?: Record<string, {
|
|
52
|
-
type: "image";
|
|
53
|
-
source: {
|
|
54
|
-
url: string;
|
|
55
|
-
kind: "url";
|
|
56
|
-
} | {
|
|
57
|
-
kind: "base64";
|
|
58
|
-
data: string;
|
|
59
|
-
} | {
|
|
60
|
-
text: string;
|
|
61
|
-
kind: "text";
|
|
62
|
-
} | {
|
|
63
|
-
path: string;
|
|
64
|
-
kind: "path";
|
|
65
|
-
};
|
|
66
|
-
}> | undefined;
|
|
67
|
-
};
|
|
68
|
-
movieFile: string | undefined;
|
|
69
|
-
htmlPrompt?: undefined;
|
|
70
|
-
htmlPath?: undefined;
|
|
71
|
-
htmlImageSystemPrompt?: undefined;
|
|
72
|
-
} | {
|
|
73
|
-
images: string[];
|
|
74
|
-
imageParams: {
|
|
75
|
-
provider: "openai" | "google";
|
|
76
|
-
style?: string | undefined;
|
|
77
|
-
model?: string | undefined;
|
|
78
|
-
moderation?: string | undefined;
|
|
79
|
-
images?: Record<string, {
|
|
80
|
-
type: "image";
|
|
81
|
-
source: {
|
|
82
|
-
url: string;
|
|
83
|
-
kind: "url";
|
|
84
|
-
} | {
|
|
85
|
-
kind: "base64";
|
|
86
|
-
data: string;
|
|
87
|
-
} | {
|
|
88
|
-
text: string;
|
|
89
|
-
kind: "text";
|
|
90
|
-
} | {
|
|
91
|
-
path: string;
|
|
92
|
-
kind: "path";
|
|
93
|
-
};
|
|
94
|
-
}> | undefined;
|
|
95
|
-
};
|
|
96
|
-
movieFile: string | undefined;
|
|
97
|
-
imageAgentInfo: import("../types/type.js").Text2ImageAgentInfo;
|
|
98
|
-
imagePath: string;
|
|
99
|
-
referenceImage: string;
|
|
100
|
-
prompt: string;
|
|
101
|
-
htmlPrompt?: undefined;
|
|
102
|
-
htmlPath?: undefined;
|
|
103
|
-
htmlImageSystemPrompt?: undefined;
|
|
104
|
-
}>;
|
|
105
|
-
export declare const imagePluginAgent: (namedInputs: {
|
|
106
7
|
context: MulmoStudioContext;
|
|
107
|
-
|
|
108
|
-
|
|
8
|
+
settings?: Record<string, string>;
|
|
9
|
+
callbacks?: CallbackFunction[];
|
|
10
|
+
forceMovie?: boolean;
|
|
11
|
+
forceImage?: boolean;
|
|
109
12
|
}) => Promise<void>;
|
|
110
|
-
export declare const getImageRefs: (context: MulmoStudioContext) => Promise<Record<string, string>>;
|
|
111
|
-
export declare const images: (context: MulmoStudioContext, settings?: Record<string, string>, callbacks?: CallbackFunction[]) => Promise<MulmoStudioContext>;
|
|
112
|
-
export declare const generateBeatImage: (index: number, context: MulmoStudioContext, settings?: Record<string, string>, callbacks?: CallbackFunction[]) => Promise<void>;
|