Skip to content

Commit 084b77b

Browse files
authored
feat: add new code samples
feat: add new code samples
2 parents c3fdff8 + 66fe2a5 commit 084b77b

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

packages/generators-v2/src/code-samples/video.sample.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ export const videoSample = (options, fullSchema) => {
3939
image_url:
4040
'https://s2-111386.kwimgs.com/bs2/mmu-aiplatform-temp/kling/20240620/1.jpeg',
4141
});
42+
} else if (
43+
requiredModelParams?.includes('video_url') &&
44+
requiredModelParams?.includes('image_url') &&
45+
lengthRequiredParams === 2
46+
) {
47+
Object.assign(params, {
48+
video_url:
49+
'https://cdn.aimlapi.com/flamingo/files/b/0a8752bc/2xrNS217ngQ3wzXqA7LXr_output.mp4',
50+
image_url:
51+
'https://cdn.aimlapi.com/flamingo/files/b/0a875302/8NaxQrQxDNHppHtqcchMm.png',
52+
});
4253
} else if (
4354
requiredModelParams?.includes('video_url') &&
4455
Boolean(schema?.properties?.prompt)
@@ -49,6 +60,17 @@ export const videoSample = (options, fullSchema) => {
4960
prompt:
5061
'Add a small fairy as a rider on the raccoon’s back. She must have a black-and-golden face and a cloak in the colors of a dark emerald tropical butterfly with bright blue shimmering spots.',
5162
});
63+
} else if (
64+
requiredModelParams?.includes('video_urls') &&
65+
Boolean(schema?.properties?.prompt)
66+
) {
67+
Object.assign(params, {
68+
video_urls: [
69+
'https://zovi0.github.io/public_misc/kling-v2-master-t2v-racoon.mp4'
70+
],
71+
prompt:
72+
'Add a small fairy as a rider on the raccoon’s back. She must have a black-and-golden face and a cloak in the colors of a dark emerald tropical butterfly with bright blue shimmering spots.',
73+
});
5274
} else if (
5375
requiredModelParams?.includes('character') &&
5476
requiredModelParams?.includes('reference')
@@ -158,7 +180,7 @@ export const videoSample = (options, fullSchema) => {
158180
: "A menacing evil dragon appears in a distance above the tallest mountain, then rushes toward the camera with its jaws open, revealing massive fangs. We see it’s coming.",
159181
});
160182
} else {
161-
console.error(`Unable to generate code sample for model ${options.name}`);
183+
console.error(`UNABLE TO GENERATE CODE SAMPLE FOR MODEL ${options.name}`);
162184
return;
163185
}
164186

0 commit comments

Comments
 (0)