@sogni-ai/sogni-intelligence-client 4.4.3 → 4.5.1
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/contracts/hostedToolValidation.d.ts.map +1 -1
- package/dist/contracts/hostedToolValidation.js +4 -0
- package/dist/contracts/hostedToolValidation.js.map +1 -1
- package/dist/contracts/index.d.ts +3 -1
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +20 -2
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/musicComposition.d.ts +3 -0
- package/dist/contracts/musicComposition.d.ts.map +1 -1
- package/dist/contracts/musicComposition.js +30 -3
- package/dist/contracts/musicComposition.js.map +1 -1
- package/dist/contracts/promptLimits.d.ts +74 -0
- package/dist/contracts/promptLimits.d.ts.map +1 -0
- package/dist/contracts/promptLimits.js +317 -0
- package/dist/contracts/promptLimits.js.map +1 -0
- package/dist/media/musicSettings.d.ts +1 -1
- package/dist/tools/definitions/animate-photo/definition.d.ts.map +1 -1
- package/dist/tools/definitions/animate-photo/definition.js +4 -1
- package/dist/tools/definitions/animate-photo/definition.js.map +1 -1
- package/dist/tools/definitions/generate-music/definition.d.ts.map +1 -1
- package/dist/tools/definitions/generate-music/definition.js +5 -2
- package/dist/tools/definitions/generate-music/definition.js.map +1 -1
- package/dist/tools/definitions/generate-video/definition.d.ts.map +1 -1
- package/dist/tools/definitions/generate-video/definition.js +4 -1
- package/dist/tools/definitions/generate-video/definition.js.map +1 -1
- package/dist/tools/definitions/segment-image/definition.d.ts.map +1 -1
- package/dist/tools/definitions/segment-image/definition.js +2 -1
- package/dist/tools/definitions/segment-image/definition.js.map +1 -1
- package/dist/tools/definitions/sound-to-video/definition.d.ts.map +1 -1
- package/dist/tools/definitions/sound-to-video/definition.js +4 -1
- package/dist/tools/definitions/sound-to-video/definition.js.map +1 -1
- package/dist/tools/definitions/video-to-video/definition.d.ts.map +1 -1
- package/dist/tools/definitions/video-to-video/definition.js +4 -1
- package/dist/tools/definitions/video-to-video/definition.js.map +1 -1
- package/dist-esm/contracts/hostedToolValidation.js +4 -0
- package/dist-esm/contracts/hostedToolValidation.js.map +1 -1
- package/dist-esm/contracts/index.js +2 -1
- package/dist-esm/contracts/index.js.map +1 -1
- package/dist-esm/contracts/musicComposition.js +28 -3
- package/dist-esm/contracts/musicComposition.js.map +1 -1
- package/dist-esm/contracts/promptLimits.js +303 -0
- package/dist-esm/contracts/promptLimits.js.map +1 -0
- package/dist-esm/tools/definitions/animate-photo/definition.js +4 -1
- package/dist-esm/tools/definitions/animate-photo/definition.js.map +1 -1
- package/dist-esm/tools/definitions/generate-music/definition.js +5 -2
- package/dist-esm/tools/definitions/generate-music/definition.js.map +1 -1
- package/dist-esm/tools/definitions/generate-video/definition.js +4 -1
- package/dist-esm/tools/definitions/generate-video/definition.js.map +1 -1
- package/dist-esm/tools/definitions/segment-image/definition.js +2 -1
- package/dist-esm/tools/definitions/segment-image/definition.js.map +1 -1
- package/dist-esm/tools/definitions/sound-to-video/definition.js +4 -1
- package/dist-esm/tools/definitions/sound-to-video/definition.js.map +1 -1
- package/dist-esm/tools/definitions/video-to-video/definition.js +4 -1
- package/dist-esm/tools/definitions/video-to-video/definition.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SAM3_TEXT_LENGTH_GUIDANCE = exports.MUSIC_TEXT_LENGTH_LIMITS_GUIDANCE = exports.VIDEO_PROMPT_LENGTH_LIMITS_GUIDANCE = exports.PromptTooLongError = exports.PROMPT_TOO_LONG_ERROR_CODE = void 0;
|
|
4
|
+
exports.resolvePromptLimitFamily = resolvePromptLimitFamily;
|
|
5
|
+
exports.resolveGenerationPromptLimits = resolveGenerationPromptLimits;
|
|
6
|
+
exports.promptLimitInstruction = promptLimitInstruction;
|
|
7
|
+
exports.promptTokenLowerBound = promptTokenLowerBound;
|
|
8
|
+
exports.measurePromptField = measurePromptField;
|
|
9
|
+
exports.checkGenerationPromptLimits = checkGenerationPromptLimits;
|
|
10
|
+
exports.assertGenerationPromptWithinLimits = assertGenerationPromptWithinLimits;
|
|
11
|
+
exports.promptLimitRepairInstruction = promptLimitRepairInstruction;
|
|
12
|
+
exports.promptLengthAdvisory = promptLengthAdvisory;
|
|
13
|
+
exports.checkToolArgumentPromptLimits = checkToolArgumentPromptLimits;
|
|
14
|
+
exports.PROMPT_TOO_LONG_ERROR_CODE = 4102;
|
|
15
|
+
class PromptTooLongError extends Error {
|
|
16
|
+
constructor(modelId, violations) {
|
|
17
|
+
super(`This prompt is too long for the model. ${violations.map(v => v.message).join(' ')}`);
|
|
18
|
+
this.modelId = modelId;
|
|
19
|
+
this.violations = violations;
|
|
20
|
+
this.code = exports.PROMPT_TOO_LONG_ERROR_CODE;
|
|
21
|
+
this.name = 'PromptTooLongError';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.PromptTooLongError = PromptTooLongError;
|
|
25
|
+
const fmt = (value) => Math.round(value).toLocaleString('en-US');
|
|
26
|
+
const ENGLISH_CHARS_PER_TOKEN = 4;
|
|
27
|
+
const WAN22_INSTRUCTION = 'LENGTH LIMIT: Wan 2.2 reads at most 4,096 text tokens (about 3,000 English words or 4,000 Chinese characters), for the prompt and for the negative prompt; keep each under 2,000 English words or 3,000 Chinese characters. Never cut a prompt to fit; rewrite it shorter.';
|
|
28
|
+
const T5_INSTRUCTION = (name) => `LENGTH LIMIT: ${name} reads at most 4,096 text tokens (about 3,000 English words); keep the prompt under 2,000 words. Never cut a prompt to fit; rewrite it shorter.`;
|
|
29
|
+
const LIMITS = {
|
|
30
|
+
'wan2.2': {
|
|
31
|
+
modelName: 'Wan 2.2',
|
|
32
|
+
prompt: { unit: 'tokens', max: 4096, tokenizer: 'umt5', addedTokens: 1 },
|
|
33
|
+
negativePrompt: { unit: 'tokens', max: 4096, tokenizer: 'umt5', addedTokens: 1 },
|
|
34
|
+
instruction: WAN22_INSTRUCTION,
|
|
35
|
+
},
|
|
36
|
+
flux1: {
|
|
37
|
+
modelName: 'FLUX.1',
|
|
38
|
+
prompt: { unit: 'tokens', max: 4096, tokenizer: 't5xxl', addedTokens: 1 },
|
|
39
|
+
negativePrompt: { unit: 'tokens', max: 4096, tokenizer: 't5xxl', addedTokens: 1 },
|
|
40
|
+
instruction: T5_INSTRUCTION('FLUX.1'),
|
|
41
|
+
},
|
|
42
|
+
chroma: {
|
|
43
|
+
modelName: 'Chroma',
|
|
44
|
+
prompt: { unit: 'tokens', max: 4096, tokenizer: 't5xxl', addedTokens: 1 },
|
|
45
|
+
negativePrompt: { unit: 'tokens', max: 4096, tokenizer: 't5xxl', addedTokens: 1 },
|
|
46
|
+
instruction: T5_INSTRUCTION('Chroma'),
|
|
47
|
+
},
|
|
48
|
+
'minimax-h3': {
|
|
49
|
+
modelName: 'MiniMax H3',
|
|
50
|
+
prompt: { unit: 'characters', max: 7000 },
|
|
51
|
+
instruction: 'LENGTH LIMIT: MiniMax H3 accepts at most 7,000 characters; keep the whole prompt under 6,000 characters. Never cut a prompt to fit; rewrite it shorter.',
|
|
52
|
+
},
|
|
53
|
+
wan3: {
|
|
54
|
+
modelName: 'Wan 3',
|
|
55
|
+
prompt: { unit: 'characters', max: 20000 },
|
|
56
|
+
instruction: 'LENGTH LIMIT: Wan 3 accepts at most 20,000 characters; keep the prompt under 17,000 characters. Never cut a prompt to fit; rewrite it shorter.',
|
|
57
|
+
},
|
|
58
|
+
'gpt-image': {
|
|
59
|
+
modelName: 'GPT Image',
|
|
60
|
+
prompt: { unit: 'characters', max: 32000 },
|
|
61
|
+
instruction: 'LENGTH LIMIT: GPT Image accepts at most 32,000 characters; keep the prompt under 27,000 characters. Never cut a prompt to fit; rewrite it shorter.',
|
|
62
|
+
},
|
|
63
|
+
happyhorse: {
|
|
64
|
+
modelName: 'HappyHorse',
|
|
65
|
+
prompt: { unit: 'characters', max: 5000, cjkWeight: 2 },
|
|
66
|
+
instruction: 'LENGTH LIMIT: HappyHorse accepts at most 5,000 characters, and each Chinese (Han) character counts as 2; keep the prompt under 4,200 characters (2,100 Chinese characters). Never cut a prompt to fit; rewrite it shorter.',
|
|
67
|
+
},
|
|
68
|
+
seedance: {
|
|
69
|
+
modelName: 'Seedance',
|
|
70
|
+
advisory: { englishWords: 1000, chineseCharacters: 500 },
|
|
71
|
+
instruction: 'LENGTH: Seedance keeps the most detail with English prompts under 1,000 words or Chinese prompts under 500 characters; longer prompts are accepted but may lose detail.',
|
|
72
|
+
},
|
|
73
|
+
'ace-step': {
|
|
74
|
+
modelName: 'ACE-Step',
|
|
75
|
+
prompt: { unit: 'characters', max: 4096 },
|
|
76
|
+
lyrics: { unit: 'characters', max: 4096 },
|
|
77
|
+
instruction: 'LENGTH LIMIT: ACE-Step accepts at most 4,096 characters of caption/tags and at most 4,096 characters of lyrics, section tags and line breaks included; keep the lyrics under 3,500 characters. Never cut lyrics to fit; write fewer or shorter sections.',
|
|
78
|
+
},
|
|
79
|
+
'minimax-music3': {
|
|
80
|
+
modelName: 'MiniMax Music 3',
|
|
81
|
+
promptWithLyrics: { unit: 'tokens', max: 5000, tokenizer: 'minimax-music3', addedTokens: 8 },
|
|
82
|
+
instruction: 'LENGTH LIMIT: MiniMax Music 3 reads at most 5,000 tokens of caption and lyrics together; keep them under 2,500 English words (or 3,000 Chinese characters) combined. Never cut lyrics to fit; write fewer or shorter sections.',
|
|
83
|
+
},
|
|
84
|
+
sam3: {
|
|
85
|
+
modelName: 'SAM 3',
|
|
86
|
+
prompt: { unit: 'tokens', max: 32, tokenizer: 'clip', addedTokens: 2 },
|
|
87
|
+
instruction: 'LENGTH LIMIT: SAM 3 reads at most 32 tokens, its start and end tokens included; name the object in a short noun phrase of at most 20 words.',
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
function normalizeModelId(modelId) {
|
|
91
|
+
return modelId
|
|
92
|
+
.trim()
|
|
93
|
+
.toLowerCase()
|
|
94
|
+
.replace(/[\s_.]+/g, '-')
|
|
95
|
+
.replace(/-+/g, '-');
|
|
96
|
+
}
|
|
97
|
+
const FAMILY_PATTERNS = [
|
|
98
|
+
['wan3', /^wan3(?:-0)?(?:-|$)/],
|
|
99
|
+
['wan2.2', /^(?:wan22|wan-2-2|wan-v2-2)(?:-|$)|^wan-s2v$/],
|
|
100
|
+
['minimax-h3', /^minimax-h3(?:-|$)/],
|
|
101
|
+
['minimax-music3', /^(?:minimax-music-?3|music3)(?:-|$)/],
|
|
102
|
+
['happyhorse', /^happyhorse(?:-|$)/],
|
|
103
|
+
['seedance', /^(?:dreamina-)?seedance/],
|
|
104
|
+
['gpt-image', /^gpt-image-2(?:-|$)/],
|
|
105
|
+
['flux1', /^flux-?1(?:-|$)|^flux-schnell(?:-|$)/],
|
|
106
|
+
['chroma', /^chroma/],
|
|
107
|
+
['ace-step', /^ace-step(?:-|$)/],
|
|
108
|
+
['sam3', /^sam3(?:-|$)/],
|
|
109
|
+
];
|
|
110
|
+
function resolvePromptLimitFamily(modelId) {
|
|
111
|
+
if (typeof modelId !== 'string' || !modelId.trim())
|
|
112
|
+
return null;
|
|
113
|
+
const normalized = normalizeModelId(modelId);
|
|
114
|
+
for (const [family, pattern] of FAMILY_PATTERNS) {
|
|
115
|
+
if (pattern.test(normalized))
|
|
116
|
+
return family;
|
|
117
|
+
}
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
function resolveGenerationPromptLimits(modelId) {
|
|
121
|
+
const family = resolvePromptLimitFamily(modelId);
|
|
122
|
+
return family ? { family, ...LIMITS[family] } : null;
|
|
123
|
+
}
|
|
124
|
+
function promptLimitInstruction(modelId) {
|
|
125
|
+
return resolveGenerationPromptLimits(modelId)?.instruction ?? null;
|
|
126
|
+
}
|
|
127
|
+
const HAN_CHARACTER = /\p{Script=Han}/gu;
|
|
128
|
+
function characterLength(text, cjkWeight = 1) {
|
|
129
|
+
const characters = Array.from(text).length;
|
|
130
|
+
if (cjkWeight === 1)
|
|
131
|
+
return characters;
|
|
132
|
+
return characters + (text.match(HAN_CHARACTER)?.length ?? 0) * (cjkWeight - 1);
|
|
133
|
+
}
|
|
134
|
+
function countWords(text) {
|
|
135
|
+
return text.split(/\s+/).filter(Boolean).length;
|
|
136
|
+
}
|
|
137
|
+
const VISIBLE = /[\p{L}\p{N}\p{P}\p{S}]/u;
|
|
138
|
+
function countVisibleWords(text) {
|
|
139
|
+
return text.split(/\s+/).filter(word => VISIBLE.test(word)).length;
|
|
140
|
+
}
|
|
141
|
+
const CLIP_PIECES = /'s|'t|'re|'ve|'m|'ll|'d|\p{L}+|\p{N}|[^\s\p{L}\p{N}]+/gu;
|
|
142
|
+
const LETTER_RUNS_AND_DIGITS = /\p{L}+|\p{N}/gu;
|
|
143
|
+
function countMatches(text, pattern) {
|
|
144
|
+
return text.match(pattern)?.length ?? 0;
|
|
145
|
+
}
|
|
146
|
+
function promptTokenLowerBound(limit, text) {
|
|
147
|
+
if (!text)
|
|
148
|
+
return 0;
|
|
149
|
+
let pieces;
|
|
150
|
+
switch (limit.tokenizer) {
|
|
151
|
+
case 'clip':
|
|
152
|
+
pieces = countMatches(text.toLowerCase().replace(/\s+/g, ' ').trim(), CLIP_PIECES);
|
|
153
|
+
break;
|
|
154
|
+
case 'minimax-music3':
|
|
155
|
+
pieces = countMatches(text, LETTER_RUNS_AND_DIGITS);
|
|
156
|
+
break;
|
|
157
|
+
default:
|
|
158
|
+
pieces = countVisibleWords(text);
|
|
159
|
+
}
|
|
160
|
+
return pieces + limit.addedTokens;
|
|
161
|
+
}
|
|
162
|
+
function measurePromptField(limit, text) {
|
|
163
|
+
const characters = characterLength(text);
|
|
164
|
+
if (limit.unit === 'characters') {
|
|
165
|
+
return { measured: characterLength(text, limit.cjkWeight ?? 1), exact: true, characters };
|
|
166
|
+
}
|
|
167
|
+
return { measured: promptTokenLowerBound(limit, text), exact: false, characters };
|
|
168
|
+
}
|
|
169
|
+
const FIELD_LABELS = {
|
|
170
|
+
prompt: 'prompt',
|
|
171
|
+
negativePrompt: 'negative prompt',
|
|
172
|
+
lyrics: 'lyrics',
|
|
173
|
+
promptWithLyrics: 'prompt and lyrics together',
|
|
174
|
+
};
|
|
175
|
+
function violationMessage(field, limit, measurement, modelName) {
|
|
176
|
+
const label = FIELD_LABELS[field];
|
|
177
|
+
const verb = field === 'lyrics' || field === 'promptWithLyrics' ? 'are' : 'is';
|
|
178
|
+
const subject = `Your ${label}`;
|
|
179
|
+
if (field === 'promptWithLyrics') {
|
|
180
|
+
return `Your lyrics alone are at least ${fmt(measurement.measured)} tokens (${fmt(measurement.characters)} characters) with the model's template; ${modelName} reads at most ${fmt(limit.max)} tokens of caption and lyrics together. Shorten them and submit again.`;
|
|
181
|
+
}
|
|
182
|
+
if (limit.unit === 'characters') {
|
|
183
|
+
const weight = limit.cjkWeight ?? 1;
|
|
184
|
+
const counted = weight === 1
|
|
185
|
+
? `${fmt(measurement.measured)} characters`
|
|
186
|
+
: `${fmt(measurement.measured)} characters long, counting each Chinese character ${weight === 2 ? 'twice' : `${weight} times`}`;
|
|
187
|
+
return `${subject} ${verb} ${counted}; ${modelName} accepts at most ${fmt(limit.max)}. Shorten it and submit again.`;
|
|
188
|
+
}
|
|
189
|
+
return `${subject} ${verb} at least ${fmt(measurement.measured)} tokens (${fmt(measurement.characters)} characters); ${modelName} reads at most ${fmt(limit.max)} tokens, roughly ${fmt(limit.max * ENGLISH_CHARS_PER_TOKEN)} characters of English. Shorten it and submit again.`;
|
|
190
|
+
}
|
|
191
|
+
function encodedPositivePrompt(prompt, stylePrompt) {
|
|
192
|
+
const style = typeof stylePrompt === 'string' ? stylePrompt.trim() : '';
|
|
193
|
+
return style ? `${prompt}, ${style}` : prompt;
|
|
194
|
+
}
|
|
195
|
+
function checkGenerationPromptLimits(modelId, text) {
|
|
196
|
+
const limits = resolveGenerationPromptLimits(modelId);
|
|
197
|
+
if (!limits)
|
|
198
|
+
return [];
|
|
199
|
+
const prompt = typeof text.prompt === 'string' ? text.prompt : '';
|
|
200
|
+
const lyrics = typeof text.lyrics === 'string' ? text.lyrics : '';
|
|
201
|
+
const negativePrompt = typeof text.negativePrompt === 'string' ? text.negativePrompt : '';
|
|
202
|
+
const fields = [
|
|
203
|
+
['prompt', limits.prompt, encodedPositivePrompt(prompt, text.stylePrompt)],
|
|
204
|
+
['negativePrompt', limits.negativePrompt, negativePrompt],
|
|
205
|
+
['lyrics', limits.lyrics, lyrics],
|
|
206
|
+
['promptWithLyrics', limits.promptWithLyrics, lyrics],
|
|
207
|
+
];
|
|
208
|
+
const violations = [];
|
|
209
|
+
for (const [field, limit, value] of fields) {
|
|
210
|
+
if (!limit || !value)
|
|
211
|
+
continue;
|
|
212
|
+
const measurement = measurePromptField(limit, value);
|
|
213
|
+
if (measurement.measured <= limit.max)
|
|
214
|
+
continue;
|
|
215
|
+
violations.push({
|
|
216
|
+
field,
|
|
217
|
+
unit: limit.unit,
|
|
218
|
+
max: limit.max,
|
|
219
|
+
measured: measurement.measured,
|
|
220
|
+
exact: measurement.exact,
|
|
221
|
+
characters: measurement.characters,
|
|
222
|
+
message: violationMessage(field, limit, measurement, limits.modelName),
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
return violations;
|
|
226
|
+
}
|
|
227
|
+
function assertGenerationPromptWithinLimits(modelId, text) {
|
|
228
|
+
const violations = checkGenerationPromptLimits(modelId, text);
|
|
229
|
+
if (violations.length > 0)
|
|
230
|
+
throw new PromptTooLongError(String(modelId), violations);
|
|
231
|
+
}
|
|
232
|
+
function promptLimitRepairInstruction(modelId, violations) {
|
|
233
|
+
const modelName = resolveGenerationPromptLimits(modelId)?.modelName ?? 'The model';
|
|
234
|
+
const details = violations.map(v => {
|
|
235
|
+
const label = FIELD_LABELS[v.field];
|
|
236
|
+
const target = Math.floor((v.max * 0.8) / 10) * 10;
|
|
237
|
+
return v.unit === 'characters'
|
|
238
|
+
? `the ${label} came to ${fmt(v.measured)} characters; ${modelName} accepts at most ${fmt(v.max)}, so aim under ${fmt(target)}`
|
|
239
|
+
: `the ${label} came to at least ${fmt(v.measured)} tokens; ${modelName} reads at most ${fmt(v.max)} tokens, so aim under ${fmt(target)}`;
|
|
240
|
+
});
|
|
241
|
+
return `LENGTH REPAIR REQUIRED: ${details.join('; ')}. Rewrite the whole result shorter while keeping its required structure, every exact quoted span, and the user's intent. Do not cut it off mid-sentence or drop required sections; condense wording instead.`;
|
|
242
|
+
}
|
|
243
|
+
function promptLengthAdvisory(modelId, prompt) {
|
|
244
|
+
const limits = resolveGenerationPromptLimits(modelId);
|
|
245
|
+
if (!limits?.advisory || typeof prompt !== 'string' || !prompt)
|
|
246
|
+
return null;
|
|
247
|
+
const chinese = prompt.match(HAN_CHARACTER)?.length ?? 0;
|
|
248
|
+
const words = countWords(prompt.replace(HAN_CHARACTER, ' '));
|
|
249
|
+
if (chinese > limits.advisory.chineseCharacters) {
|
|
250
|
+
return `This ${limits.modelName} prompt has ${fmt(chinese)} Chinese characters; ${limits.modelName} keeps the most detail under ${fmt(limits.advisory.chineseCharacters)}.`;
|
|
251
|
+
}
|
|
252
|
+
if (words > limits.advisory.englishWords) {
|
|
253
|
+
return `This ${limits.modelName} prompt has ${fmt(words)} words; ${limits.modelName} keeps the most detail under ${fmt(limits.advisory.englishWords)}.`;
|
|
254
|
+
}
|
|
255
|
+
return null;
|
|
256
|
+
}
|
|
257
|
+
exports.VIDEO_PROMPT_LENGTH_LIMITS_GUIDANCE = 'PROMPT LENGTH LIMITS (an over-limit request is refused, never cut): MiniMax H3 at most 7,000 characters; HappyHorse at most 5,000 (each Chinese character counts as 2); Wan 3 at most 20,000; Wan 2.2 at most 4,096 tokens (about 3,000 English words) for the prompt and for negativePrompt. Seedance keeps the most detail under 1,000 English words or 500 Chinese characters. Stay well under these; condense wording instead of dropping required content.';
|
|
258
|
+
exports.MUSIC_TEXT_LENGTH_LIMITS_GUIDANCE = 'LENGTH LIMITS (an over-limit request is refused, never cut): ACE-Step accepts at most 4,096 characters of prompt and at most 4,096 characters of lyrics, tags and line breaks included; MiniMax Music 3 (music3) reads at most 5,000 tokens of prompt and lyrics together (about 3,500 English words). Keep ACE-Step lyrics under 3,500 characters.';
|
|
259
|
+
exports.SAM3_TEXT_LENGTH_GUIDANCE = 'SAM 3 reads at most 32 tokens, its start and end tokens included: use a short noun phrase of at most 20 words.';
|
|
260
|
+
const PROMPT_LIMITED_TOOLS = new Set([
|
|
261
|
+
'generate_video',
|
|
262
|
+
'animate_photo',
|
|
263
|
+
'sound_to_video',
|
|
264
|
+
'video_to_video',
|
|
265
|
+
'extend_video',
|
|
266
|
+
'replace_video_segment',
|
|
267
|
+
'generate_image',
|
|
268
|
+
'edit_image',
|
|
269
|
+
'generate_music',
|
|
270
|
+
'segment_image',
|
|
271
|
+
]);
|
|
272
|
+
function toolCallPromptLimitModel(toolName, args) {
|
|
273
|
+
if (!PROMPT_LIMITED_TOOLS.has(toolName))
|
|
274
|
+
return null;
|
|
275
|
+
const text = (value) => (typeof value === 'string' && value.trim() ? value : null);
|
|
276
|
+
switch (toolName) {
|
|
277
|
+
case 'segment_image':
|
|
278
|
+
return 'sam3';
|
|
279
|
+
case 'generate_music': {
|
|
280
|
+
const model = text(args.model);
|
|
281
|
+
if (!model)
|
|
282
|
+
return null;
|
|
283
|
+
return model === 'turbo' || model === 'sft' ? 'ace-step' : model;
|
|
284
|
+
}
|
|
285
|
+
default:
|
|
286
|
+
return text(args.videoModel) ?? text(args.model);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
function checkToolArgumentPromptLimits(toolName, args) {
|
|
290
|
+
const modelId = toolCallPromptLimitModel(toolName, args);
|
|
291
|
+
if (!modelId || !resolveGenerationPromptLimits(modelId))
|
|
292
|
+
return [];
|
|
293
|
+
const str = (value) => (typeof value === 'string' ? value : undefined);
|
|
294
|
+
const violations = [];
|
|
295
|
+
const add = (argument, found) => {
|
|
296
|
+
for (const violation of found) {
|
|
297
|
+
const name = violation.field === 'prompt' ? argument
|
|
298
|
+
: violation.field === 'promptWithLyrics' ? 'lyrics'
|
|
299
|
+
: violation.field;
|
|
300
|
+
violations.push({ ...violation, argument: name, modelId });
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
const promptArgument = toolName === 'segment_image' ? 'text' : 'prompt';
|
|
304
|
+
add(promptArgument, checkGenerationPromptLimits(modelId, {
|
|
305
|
+
prompt: str(args[promptArgument]),
|
|
306
|
+
negativePrompt: str(args.negativePrompt),
|
|
307
|
+
lyrics: str(args.lyrics),
|
|
308
|
+
}));
|
|
309
|
+
if (Array.isArray(args.prompts)) {
|
|
310
|
+
args.prompts.forEach((entry, index) => {
|
|
311
|
+
if (typeof entry === 'string')
|
|
312
|
+
add(`prompts[${index}]`, checkGenerationPromptLimits(modelId, { prompt: entry }));
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
return violations;
|
|
316
|
+
}
|
|
317
|
+
//# sourceMappingURL=promptLimits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptLimits.js","sourceRoot":"","sources":["../../src/contracts/promptLimits.ts"],"names":[],"mappings":";;;AAwNA,4DAOC;AAQD,sEAKC;AAGD,wDAEC;AAwCD,sDAeC;AAYD,gDAMC;AAyCD,kEAgCC;AAGD,gFAMC;AAMD,oEAaC;AAMD,oDAeC;AA2DD,sEA4BC;AA1aY,QAAA,0BAA0B,GAAG,IAAI,CAAC;AAE/C,MAAa,kBAAmB,SAAQ,KAAK;IAE3C,YACkB,OAAe,EACf,UAA2C;QAE3D,KAAK,CAAC,0CAA0C,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAH5E,YAAO,GAAP,OAAO,CAAQ;QACf,eAAU,GAAV,UAAU,CAAiC;QAHpD,SAAI,GAAG,kCAA0B,CAAC;QAMzC,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;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C,CAAC;QACjC,cAAc,EAAE,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC;QACxC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;KACzB,CAAC,CAAC,CAAC;IACJ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACpC,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,GAAG,CAAC,WAAW,KAAK,GAAG,EAAE,2BAA2B,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACnH,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -109,7 +109,7 @@ export declare const MUSIC_KEY_SCALES: readonly ["", "A major", "A minor", "A# m
|
|
|
109
109
|
export declare const MUSIC_LANGUAGES: readonly ["unknown", "en", "es", "fr", "de", "it", "pt", "ru", "ja", "ko", "zh", "ar", "hi", "nl", "pl", "sv", "tr", "vi", "th", "id", "cs", "da", "fi", "el", "he", "hu", "no", "ro", "sk", "uk", "bg", "hr", "lt", "sr", "ca", "is", "ms", "tl", "bn", "fa", "ne", "pa", "sw", "ta", "te", "ur", "az", "ht", "la", "sa", "yue"];
|
|
110
110
|
export declare const LANGUAGE_LABELS: Record<string, string>;
|
|
111
111
|
export declare const MUSIC_LANGUAGE_OPTIONS: {
|
|
112
|
-
value: "unknown" | "id" | "en" | "es" | "fr" | "de" | "it" | "pt" | "ru" | "ja" | "ko" | "zh" | "ar" | "hi" | "nl" | "pl" | "sv" | "tr" | "vi" | "th" | "cs" | "da" | "fi" | "el" | "he" | "hu" | "no" | "ro" | "sk" | "uk" | "bg" | "hr" | "lt" | "sr" | "ca" | "
|
|
112
|
+
value: "unknown" | "id" | "is" | "en" | "es" | "fr" | "de" | "it" | "pt" | "ru" | "ja" | "ko" | "zh" | "ar" | "hi" | "nl" | "pl" | "sv" | "tr" | "vi" | "th" | "cs" | "da" | "fi" | "el" | "he" | "hu" | "no" | "ro" | "sk" | "uk" | "bg" | "hr" | "lt" | "sr" | "ca" | "ms" | "tl" | "bn" | "fa" | "ne" | "pa" | "sw" | "ta" | "te" | "ur" | "az" | "ht" | "la" | "sa" | "yue";
|
|
113
113
|
label: string;
|
|
114
114
|
}[];
|
|
115
115
|
export declare const KEY_SCALE_LABELS: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/tools/definitions/animate-photo/definition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/tools/definitions/animate-photo/definition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAmClD,eAAO,MAAM,UAAU,EAAE,cAsLxB,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.definition = void 0;
|
|
|
4
4
|
const toolPromptMarkers_js_1 = require("../../../contracts/toolPromptMarkers.js");
|
|
5
5
|
const index_js_1 = require("../../../media/index.js");
|
|
6
6
|
const loraGuidance_js_1 = require("../../shared/loraGuidance.js");
|
|
7
|
+
const promptLimits_js_1 = require("../../../contracts/promptLimits.js");
|
|
7
8
|
const H3_LORA_SELECTORS = [
|
|
8
9
|
"minimax-h3-i2v",
|
|
9
10
|
"minimax-h3-i2v-turbo",
|
|
@@ -55,7 +56,9 @@ POSITIVE CONSTRAINT TRANSLATION: For LTX 2.3 and WAN 2.2, the prompt field is a
|
|
|
55
56
|
|
|
56
57
|
WAN 2.2 ("wan22"): 30-150 words, subtle natural movements. Motion-only visual prompt; omit soundtrack, ambience, room tone, music, hums, sighs, spoken words, voice, and SFX cues because WAN does not generate audio.
|
|
57
58
|
|
|
58
|
-
BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary motion, camera, or atmosphere while preserving the user's specified elements. This is one Sogni project with multiple jobs, so prefer it when all outputs share the same source/end frames and generation parameters and only prompt text varies. Example: "{gentle sway with drifting embers|slow paw wave with a tiny head tilt|small hop with soft fur motion}"
|
|
59
|
+
BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary motion, camera, or atmosphere while preserving the user's specified elements. This is one Sogni project with multiple jobs, so prefer it when all outputs share the same source/end frames and generation parameters and only prompt text varies. Example: "{gentle sway with drifting embers|slow paw wave with a tiny head tilt|small hop with soft fur motion}".
|
|
60
|
+
|
|
61
|
+
${promptLimits_js_1.VIDEO_PROMPT_LENGTH_LIMITS_GUIDANCE}`,
|
|
59
62
|
},
|
|
60
63
|
expandPrompt: {
|
|
61
64
|
type: "boolean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/animate-photo/definition.ts"],"names":[],"mappings":";;;AAMA,kFAGiD;AACjD,sDAAmE;AACnE,kEAKsC;
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/animate-photo/definition.ts"],"names":[],"mappings":";;;AAMA,kFAGiD;AACjD,sDAAmE;AACnE,kEAKsC;AACtC,wEAAyF;AASzF,MAAM,iBAAiB,GAAG;IACxB,gBAAgB;IAChB,sBAAsB;IACtB,6BAA6B;IAC7B,oCAAoC;IACpC,kBAAkB;IAClB,wBAAwB;IACxB,+BAA+B;IAC/B,sCAAsC;CAC9B,CAAC;AAEX,MAAM,yBAAyB,GAC7B,wcAAwc,CAAC;AAE9b,QAAA,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,eAAe;QACrB,WAAW,EACT,2+OAA2+O;QAC7+O,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,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;oBACX,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE;oBACvC,WAAW,EACT,sJAAsJ,wCAAsB,OAAO,IAAA,qCAAmB,EAAC,iBAAiB,CAAC,OAAO,iDAA+B,EAAE;iBACpQ;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,OAAO;oBACb,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,CAAC;oBACX,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EAAE,kDAAgC;iBAC9C;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC;AAEF,kBAAU,CAAC,QAAQ,CAAC,WAAW;IAC7B,iGAAiG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-music/definition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-music/definition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,eAAO,MAAM,UAAU,EAAE,cAiFxB,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.definition = void 0;
|
|
4
4
|
const promptOverrideMarker_js_1 = require("../../../contracts/promptOverrideMarker.js");
|
|
5
|
+
const promptLimits_js_1 = require("../../../contracts/promptLimits.js");
|
|
5
6
|
exports.definition = {
|
|
6
7
|
type: 'function',
|
|
7
8
|
function: {
|
|
@@ -31,7 +32,9 @@ Include:
|
|
|
31
32
|
|
|
32
33
|
MODEL "music3": MiniMax Music 3 wants a structured caption instead of a tag list — write the prompt as one paragraph in three labeled parts: "Global Metadata: genre, BPM, key, emotional progression across the song, production profile. Vocal Details: gender, timbre, delivery, harmonies (or: none, purely instrumental). Arrangement: primary and secondary instruments, groove, bass, percussion, textures, how sections evolve." The more specific, the closer the result. Fold tempo and key into this caption — music3 ignores the bpm/keyscale/timesig args.
|
|
33
34
|
|
|
34
|
-
BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary ONE dimension across separate tracks. This is one Sogni project with multiple jobs, so prefer it when all tracks share the same duration, BPM, key, lyrics, model, and generation parameters and only prompt text varies. Lock in any genre/mood/instruments the user specified, vary the rest. Example: "{lo-fi hip hop beat with muted keys|jazz piano trio with brushed drums|ambient electronic with soft pads} with warm reverb and vinyl texture"
|
|
35
|
+
BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary ONE dimension across separate tracks. This is one Sogni project with multiple jobs, so prefer it when all tracks share the same duration, BPM, key, lyrics, model, and generation parameters and only prompt text varies. Lock in any genre/mood/instruments the user specified, vary the rest. Example: "{lo-fi hip hop beat with muted keys|jazz piano trio with brushed drums|ambient electronic with soft pads} with warm reverb and vinyl texture".
|
|
36
|
+
|
|
37
|
+
${promptLimits_js_1.MUSIC_TEXT_LENGTH_LIMITS_GUIDANCE}`,
|
|
35
38
|
},
|
|
36
39
|
duration: {
|
|
37
40
|
type: 'number',
|
|
@@ -51,7 +54,7 @@ BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary
|
|
|
51
54
|
},
|
|
52
55
|
lyrics: {
|
|
53
56
|
type: 'string',
|
|
54
|
-
description: 'Song lyrics. Optional — omit for instrumental music. Format: write lyrics naturally with line breaks. The model will attempt to sing these lyrics with the generated music. Works best with clear, rhythmic phrasing that matches the BPM. For model "music3", structure lyrics with plain section tags on their own lines ([Intro], [Verse], [Pre-Chorus], [Chorus], [Post-Chorus], [Bridge], [Solo], [Outro]) — no modifiers inside brackets, and write enough sections to fill the requested duration since the composer ends the song when the lyric sheet runs out. For instrumental music3 tracks, pass ONLY a skeleton of those tags one per line (e.g. [Intro] [Verse] [Chorus] [Verse] [Solo] [Chorus] [Outro]) — bare instrumental pieces end early without it.',
|
|
57
|
+
description: 'Song lyrics. Optional — omit for instrumental music. Format: write lyrics naturally with line breaks. The model will attempt to sing these lyrics with the generated music. Works best with clear, rhythmic phrasing that matches the BPM. For model "music3", structure lyrics with plain section tags on their own lines ([Intro], [Verse], [Pre-Chorus], [Chorus], [Post-Chorus], [Bridge], [Solo], [Outro]) — no modifiers inside brackets, and write enough sections to fill the requested duration since the composer ends the song when the lyric sheet runs out. For instrumental music3 tracks, pass ONLY a skeleton of those tags one per line (e.g. [Intro] [Verse] [Chorus] [Verse] [Solo] [Chorus] [Outro]) — bare instrumental pieces end early without it. Length: ACE-Step (turbo, sft) accepts at most 4,096 characters of lyrics, tags and line breaks included; music3 reads at most 5,000 tokens of prompt and lyrics together. Over-limit lyrics are refused, never cut.',
|
|
55
58
|
},
|
|
56
59
|
model: {
|
|
57
60
|
type: 'string',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-music/definition.ts"],"names":[],"mappings":";;;AAMA,wFAAqF;
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-music/definition.ts"],"names":[],"mappings":";;;AAMA,wFAAqF;AACrF,wEAAuF;AAE1E,QAAA,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,2OAA2O;QAC7O,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,iDAAuB;;;;;;;;;;;;;;;;;;;EAmBvB,mDAAiC,EAAE;iBAC5B;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4HAA4H;oBAC9H,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,GAAG;iBACb;gBACD,GAAG,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,sJAAsJ;oBACxJ,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,GAAG;iBACb;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,iOAAiO;iBACpO;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,+7BAA+7B;iBACl8B;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC;oBAChC,WAAW,EACT,ksBAAksB;iBACrsB;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;oBAClB,WAAW,EACT,2JAA2J;iBAC9J;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,oQAAoQ;oBACtQ,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-video/definition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-video/definition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAoClD,eAAO,MAAM,UAAU,EAAE,cAgNxB,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.definition = void 0;
|
|
|
4
4
|
const loraGuidance_js_1 = require("../../shared/loraGuidance.js");
|
|
5
5
|
const toolPromptMarkers_js_1 = require("../../../contracts/toolPromptMarkers.js");
|
|
6
6
|
const index_js_1 = require("../../../media/index.js");
|
|
7
|
+
const promptLimits_js_1 = require("../../../contracts/promptLimits.js");
|
|
7
8
|
const H3_LORA_SELECTORS = [
|
|
8
9
|
"minimax-h3-t2v",
|
|
9
10
|
"minimax-h3-t2v-turbo",
|
|
@@ -54,7 +55,9 @@ AVOID: Vague prompts, too many characters at once, conflicting lighting logic, r
|
|
|
54
55
|
|
|
55
56
|
NON-SEEDANCE POSITIVE CONSTRAINTS: For videoModel="ltx25", "ltx23", or "wan22", prompt is a positive prompt. Translate user avoid/no/don't constraints into affirmative production constraints instead of copying negative phrasing. Preserve exact quoted visible text or dialogue when the user explicitly requests it; keep surrounding surfaces blank.
|
|
56
57
|
|
|
57
|
-
BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax. This is one Sogni project with multiple jobs, so prefer it when all outputs share the same references, model, duration, dimensions, and generation parameters and only prompt text varies. Lock in any camera/subject/style the user specified, vary the rest. Example: "slow dolly in on a city street {at dawn with golden light|during a rainstorm|at night with neon reflections}"
|
|
58
|
+
BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax. This is one Sogni project with multiple jobs, so prefer it when all outputs share the same references, model, duration, dimensions, and generation parameters and only prompt text varies. Lock in any camera/subject/style the user specified, vary the rest. Example: "slow dolly in on a city street {at dawn with golden light|during a rainstorm|at night with neon reflections}".
|
|
59
|
+
|
|
60
|
+
${promptLimits_js_1.VIDEO_PROMPT_LENGTH_LIMITS_GUIDANCE}`,
|
|
58
61
|
},
|
|
59
62
|
expandPrompt: {
|
|
60
63
|
type: "boolean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-video/definition.ts"],"names":[],"mappings":";;;AAMA,kEAKsC;AACtC,kFAMiD;AACjD,sDAAmE;
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-video/definition.ts"],"names":[],"mappings":";;;AAMA,kEAKsC;AACtC,kFAMiD;AACjD,sDAAmE;AACnE,wEAAyF;AAUzF,MAAM,iBAAiB,GAAG;IACxB,gBAAgB;IAChB,sBAAsB;IACtB,6BAA6B;IAC7B,oCAAoC;IACpC,gBAAgB;IAChB,sBAAsB;IACtB,uBAAuB;IACvB,gCAAgC;CACxB,CAAC;AAEE,QAAA,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,8uKAA8uK;QAChvK,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,oDAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8B7B,qDAAmC,EAAE;iBAC9B;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,yDAAkC;iBAChD;gBACD,oBAAoB,EAAE;oBACpB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,wEAAiD;iBAC/D;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,2bAA2b;oBAC7b,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC;oBACvD,WAAW,EACT,qHAAqH;iBACxH;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,0EAA0E;iBACxF;gBACD,gBAAgB,EAAE;oBAChB,IAAI,E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DAAgC;iBAC9C;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/tools/definitions/segment-image/definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/tools/definitions/segment-image/definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,eAAO,MAAM,UAAU,EAAE,cAqBxB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.definition = void 0;
|
|
4
|
+
const promptLimits_js_1 = require("../../../contracts/promptLimits.js");
|
|
4
5
|
const coordinate = { type: 'number', minimum: 0, maximum: 1 };
|
|
5
6
|
exports.definition = {
|
|
6
7
|
type: 'function',
|
|
@@ -12,7 +13,7 @@ exports.definition = {
|
|
|
12
13
|
properties: {
|
|
13
14
|
sourceImageIndex: { type: 'integer', description: 'Original source: negative indices select uploads (-1 is the first), non-negative indices select generated images. Omit to use the latest image.' },
|
|
14
15
|
source_image_url: { type: 'string', description: 'REST alternative: retrievable original image URL.' },
|
|
15
|
-
text: { type: 'string', minLength: 1, maxLength: 240, description:
|
|
16
|
+
text: { type: 'string', minLength: 1, maxLength: 240, description: `Object or concept to select, such as the red suitcase. ${promptLimits_js_1.SAM3_TEXT_LENGTH_GUIDANCE}` },
|
|
16
17
|
points: { type: 'array', maxItems: 32, items: { type: 'object', properties: { x: coordinate, y: coordinate, label: { type: 'string', enum: ['positive', 'negative'] } }, required: ['x', 'y', 'label'], additionalProperties: false } },
|
|
17
18
|
boxes: { type: 'array', maxItems: 16, items: { type: 'object', properties: { x0: coordinate, y0: coordinate, x1: coordinate, y1: coordinate, label: { type: 'string', enum: ['positive', 'negative'], description: 'Optional inclusion/exclusion label; defaults to positive. Negative boxes require a text prompt.' } }, required: ['x0', 'y0', 'x1', 'y1'], additionalProperties: false } },
|
|
18
19
|
maxInstances: { type: 'integer', minimum: 1, maximum: 16, description: 'Keep only the strongest N selections. Omit to keep every selection above threshold.' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/segment-image/definition.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/segment-image/definition.ts"],"names":[],"mappings":";;;AACA,wEAA+E;AAE/E,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;AACjD,QAAA,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,mUAAmU;QAChV,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,iJAAiJ,EAAE;gBACrM,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mDAAmD,EAAE;gBACtG,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,0DAA0D,2CAAyB,EAAE,EAAE;gBAC1J,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,KAA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mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/tools/definitions/sound-to-video/definition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAyClD,eAAO,MAAM,UAAU,EAAE,cAkKxB,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.definition = void 0;
|
|
|
4
4
|
const loraGuidance_js_1 = require("../../shared/loraGuidance.js");
|
|
5
5
|
const toolPromptMarkers_js_1 = require("../../../contracts/toolPromptMarkers.js");
|
|
6
6
|
const index_js_1 = require("../../../media/index.js");
|
|
7
|
+
const promptLimits_js_1 = require("../../../contracts/promptLimits.js");
|
|
7
8
|
const MINIMAX_H3_AUDIO_GUIDE_SELECTORS = [
|
|
8
9
|
"minimax-h3-fasth3-ia2v-turbo",
|
|
9
10
|
"minimax-h3-fasth3-ia2v-turbo-2stage",
|
|
@@ -47,7 +48,9 @@ NON-SEEDANCE POSITIVE CONSTRAINTS: For ltx25-ia2v, ltx25-a2v, ltx23-ia2v, ltx23-
|
|
|
47
48
|
|
|
48
49
|
BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary the visual interpretation while keeping audio sync intent consistent. This is one Sogni project with multiple jobs, so prefer it when all outputs share the same audio source/window, image source, model, duration, dimensions, and parameters and only prompt text varies. Example: "{abstract neon visualization|nature scene with swaying trees|urban street with rain} synced to the beat".
|
|
49
50
|
|
|
50
|
-
${toolPromptMarkers_js_1.MINIMAX_H3_AUDIO_GUIDE_PROMPT_DESCRIPTION}
|
|
51
|
+
${toolPromptMarkers_js_1.MINIMAX_H3_AUDIO_GUIDE_PROMPT_DESCRIPTION}
|
|
52
|
+
|
|
53
|
+
${promptLimits_js_1.VIDEO_PROMPT_LENGTH_LIMITS_GUIDANCE}`,
|
|
51
54
|
},
|
|
52
55
|
expandPrompt: {
|
|
53
56
|
type: "boolean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/sound-to-video/definition.ts"],"names":[],"mappings":";;;AAMA,kEAKsC;AACtC,kFAaiD;AACjD,sDAAmE;
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/sound-to-video/definition.ts"],"names":[],"mappings":";;;AAMA,kEAKsC;AACtC,kFAaiD;AACjD,sDAAmE;AACnE,wEAAyF;AAOzF,MAAM,gCAAgC,GAAG;IACvC,8BAA8B;IAC9B,qCAAqC;IACrC,gCAAgC;IAChC,uCAAuC;IACvC,6BAA6B;IAC7B,oCAAoC;CAC5B,CAAC;AAEX,MAAM,yBAAyB,GAC7B,ybAAyb,CAAC;AAE/a,QAAA,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,s6DAAs6D;QACx6D,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,uDAAgC;;;;;;;;;;;;;;;;;;;;;;EAsBhC,gEAAyC;;EAEzC,qDAAmC,EAAE;iBAC9B;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,yDAAkC;iBAChD;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4QAA4Q;wBAC5Q,yEAAkD;iBACrD;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,yPAAyP;iBAC5P;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,2OAA2O;wBAC3O,4EAAqD;iBACxD;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,WAA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EAAuD;iBAC1D;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,OAAO;oBACb,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,CAAC;oBACX,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE;oBACvC,WAAW,EAAE,sEAAsE,wCAAsB,OAAO,IAAA,qCAAmB,EAAC,gCAAgC,CAAC,OAAO,iDAA+B,EAAE;iBAC9M;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,OAAO;oBACb,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,CAAC;oBACX,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EAAE,kDAAgC;iBAC9C;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,oQAAoQ;wBACpQ,wEAAiD;iBACpD;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,iSAAiS;oBACnS,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,ubAAub;iBAC1b;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mCAAwB;iBACtC;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC;AAEF,kBAAU,CAAC,QAAQ,CAAC,WAAW;IAC7B,6FAA6F;QAC7F,iFAA0D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/tools/definitions/video-to-video/definition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/tools/definitions/video-to-video/definition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAUlD,eAAO,MAAM,UAAU,EAAE,cAiJxB,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.definition = void 0;
|
|
4
4
|
const promptOverrideMarker_js_1 = require("../../../contracts/promptOverrideMarker.js");
|
|
5
5
|
const toolPromptMarkers_js_1 = require("../../../contracts/toolPromptMarkers.js");
|
|
6
|
+
const promptLimits_js_1 = require("../../../contracts/promptLimits.js");
|
|
6
7
|
const LITERAL_SEEDANCE_V2V_PROMPT_OVERRIDE = `${promptOverrideMarker_js_1.LITERAL_PROMPT_OVERRIDE} For Seedance, set expandPrompt=false.`;
|
|
7
8
|
exports.definition = {
|
|
8
9
|
type: "function",
|
|
@@ -35,7 +36,9 @@ Present tense. Positive phrasing. Concrete visual details.
|
|
|
35
36
|
|
|
36
37
|
NON-SEEDANCE POSITIVE CONSTRAINTS: For LTX 2.5, LTX 2.3, and WAN 2.2 modes, prompt is a positive prompt. Translate user avoid/no/don't constraints into affirmative production constraints instead of copying negative phrasing. Preserve exact quoted visible text when the user explicitly requests it; keep surrounding surfaces blank.
|
|
37
38
|
|
|
38
|
-
BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary the artistic treatment while keeping control mode and structural intent consistent. Example: "transform to {watercolor with soft edges|oil painting with bold strokes|anime with clean lines} style"
|
|
39
|
+
BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary the artistic treatment while keeping control mode and structural intent consistent. Example: "transform to {watercolor with soft edges|oil painting with bold strokes|anime with clean lines} style".
|
|
40
|
+
|
|
41
|
+
${promptLimits_js_1.VIDEO_PROMPT_LENGTH_LIMITS_GUIDANCE}`,
|
|
39
42
|
},
|
|
40
43
|
expandPrompt: {
|
|
41
44
|
type: "boolean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/video-to-video/definition.ts"],"names":[],"mappings":";;;AAMA,wFAAqF;AACrF,kFAEiD;
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/video-to-video/definition.ts"],"names":[],"mappings":";;;AAMA,wFAAqF;AACrF,kFAEiD;AACjD,wEAAyF;AAEzF,MAAM,oCAAoC,GACxC,GAAG,iDAAuB,wCAAwC,CAAC;AAExD,QAAA,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,w4BAAw4B;QAC14B,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,oCAAoC;;;;;;;;;;;;;;;;;;;;;EAqBpC,qDAAmC,EAAE;iBAC9B;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,qLAAqL;iBACxL;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,qYAAqY;iBACxY;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE;wBACJ,cAAc;wBACd,iBAAiB;wBACjB,OAAO;wBACP,MAAM;wBACN,OAAO;wBACP,UAAU;wBACV,UAAU;wBACV,SAAS;wBACT,cAAc;qBACf;oBACD,WAAW,EACT,2EAA2E;wBAC3E,kMAAkM;wBAClM,sNAAsN;wBACtN,mJAAmJ;wBACnJ,kPAAkP;wBAClP,iJAAiJ;wBACjJ,wJAAwJ;wBACxJ,4KAA4K;wBAC5K,8JAA8J;wBAC9J,4RAA4R,2DAAoC,yHAAyH;wBACzb,2QAA2Q;iBAC9Q;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,yXAAyX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