@umituz/react-native-ai-fal-provider 1.0.42 → 1.0.43
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-fal-provider",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.43",
|
|
4
4
|
"description": "FAL AI provider for React Native - implements IAIProvider interface for unified AI generation",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -237,11 +237,18 @@ export class FalProvider implements IAIProvider {
|
|
|
237
237
|
return FAL_VIDEO_FEATURE_MODELS[feature];
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
buildVideoFeatureInput(
|
|
240
|
+
buildVideoFeatureInput(feature: VideoFeatureType, data: VideoFeatureInputData): Record<string, unknown> {
|
|
241
241
|
const { sourceImageBase64, targetImageBase64, prompt, options } = data;
|
|
242
242
|
|
|
243
|
+
const defaultPrompts: Record<VideoFeatureType, string> = {
|
|
244
|
+
"ai-kiss": "Two people kissing romantically, smooth natural motion, cinematic quality",
|
|
245
|
+
"ai-hug": "Two people hugging warmly, gentle embrace, smooth natural motion, cinematic quality",
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
const effectivePrompt = prompt || defaultPrompts[feature] || "Generate video with natural motion";
|
|
249
|
+
|
|
243
250
|
return buildVideoFromImageInput(sourceImageBase64, {
|
|
244
|
-
|
|
251
|
+
prompt: effectivePrompt,
|
|
245
252
|
target_image: targetImageBase64,
|
|
246
253
|
duration: options?.duration as number,
|
|
247
254
|
...options,
|
|
@@ -85,7 +85,7 @@ export function buildVideoFromImageInput(
|
|
|
85
85
|
options?: VideoFromImageOptions,
|
|
86
86
|
): Record<string, unknown> {
|
|
87
87
|
const params: Record<string, unknown> = {
|
|
88
|
-
|
|
88
|
+
prompt: options?.prompt || options?.motion_prompt,
|
|
89
89
|
num_frames: options?.duration ? Math.ceil(options.duration * 24) : undefined,
|
|
90
90
|
};
|
|
91
91
|
|