@umituz/react-native-ai-generation-content 1.26.1 → 1.26.2
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-generation-content",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.2",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -14,13 +14,13 @@ declare const __DEV__: boolean;
|
|
|
14
14
|
|
|
15
15
|
export interface GenerationModels {
|
|
16
16
|
/** Image generation with face identity preservation (couple photos) */
|
|
17
|
-
readonly imageCoupleMultiRef
|
|
17
|
+
readonly imageCoupleMultiRef?: string;
|
|
18
18
|
/** Text-to-image generation */
|
|
19
|
-
readonly imageTextToImage
|
|
19
|
+
readonly imageTextToImage?: string;
|
|
20
20
|
/** Image-to-video generation */
|
|
21
|
-
readonly imageToVideo
|
|
21
|
+
readonly imageToVideo?: string;
|
|
22
22
|
/** Text-to-video generation */
|
|
23
|
-
readonly textToVideo
|
|
23
|
+
readonly textToVideo?: string;
|
|
24
24
|
/** AI Kiss video */
|
|
25
25
|
readonly aiKiss?: string;
|
|
26
26
|
/** AI Hug video */
|
|
@@ -62,19 +62,30 @@ export const GenerationConfigProvider: React.FC<GenerationConfigProviderProps> =
|
|
|
62
62
|
models,
|
|
63
63
|
}) => {
|
|
64
64
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
65
|
+
const configuredModels = Object.entries(models)
|
|
66
|
+
.filter(([, value]) => !!value)
|
|
67
|
+
.map(([key]) => key);
|
|
68
|
+
|
|
65
69
|
console.log("[GenerationConfigProvider] Initialized with models:", {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
configured: configuredModels,
|
|
71
|
+
imageCoupleMultiRef: models.imageCoupleMultiRef || "not configured",
|
|
72
|
+
imageTextToImage: models.imageTextToImage || "not configured",
|
|
73
|
+
imageToVideo: models.imageToVideo || "not configured",
|
|
74
|
+
textToVideo: models.textToVideo || "not configured",
|
|
70
75
|
});
|
|
71
76
|
}
|
|
72
77
|
|
|
73
78
|
const getModel = (featureType: keyof GenerationModels): string => {
|
|
74
79
|
const model = models[featureType];
|
|
75
80
|
if (!model) {
|
|
81
|
+
const availableModels = Object.keys(models).filter(
|
|
82
|
+
(key) => models[key as keyof GenerationModels]
|
|
83
|
+
);
|
|
84
|
+
|
|
76
85
|
throw new Error(
|
|
77
|
-
`Model not configured for feature: ${featureType}
|
|
86
|
+
`Model not configured for feature: ${featureType}.\n\n` +
|
|
87
|
+
`This app only supports: ${availableModels.join(", ") || "none"}.\n` +
|
|
88
|
+
`Please configure '${featureType}' in your GenerationConfigProvider if you need it.`
|
|
78
89
|
);
|
|
79
90
|
}
|
|
80
91
|
return model;
|