@umituz/react-native-ai-generation-content 1.25.23 → 1.25.24
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.25.
|
|
3
|
+
"version": "1.25.24",
|
|
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",
|
|
@@ -40,6 +40,7 @@ type WizardGenerationResult = { imageUrl: string } | { videoUrl: string };
|
|
|
40
40
|
|
|
41
41
|
async function executeImageGeneration(
|
|
42
42
|
input: ImageGenerationInput,
|
|
43
|
+
model: string,
|
|
43
44
|
onProgress?: (progress: number) => void,
|
|
44
45
|
): Promise<{ success: boolean; imageUrl?: string; error?: string }> {
|
|
45
46
|
const { providerRegistry } = await import("../../../../infrastructure/services/provider-registry.service");
|
|
@@ -78,11 +79,11 @@ async function executeImageGeneration(
|
|
|
78
79
|
};
|
|
79
80
|
|
|
80
81
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
81
|
-
console.log("[WizardStrategy] Starting image generation");
|
|
82
|
+
console.log("[WizardStrategy] Starting image generation", { model });
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
let lastStatus = "";
|
|
85
|
-
const result = await provider.subscribe(
|
|
86
|
+
const result = await provider.subscribe(model, modelInput, {
|
|
86
87
|
timeoutMs: 120000,
|
|
87
88
|
onQueueUpdate: (status) => {
|
|
88
89
|
if (status.status === lastStatus) return;
|
|
@@ -245,6 +246,7 @@ export const createWizardStrategy = (
|
|
|
245
246
|
console.log("[WizardStrategy] Executing generation", {
|
|
246
247
|
scenarioId: scenario.id,
|
|
247
248
|
outputType,
|
|
249
|
+
model: scenario.model,
|
|
248
250
|
});
|
|
249
251
|
}
|
|
250
252
|
|
|
@@ -252,8 +254,13 @@ export const createWizardStrategy = (
|
|
|
252
254
|
|
|
253
255
|
// Execute based on output type
|
|
254
256
|
if (outputType === "image") {
|
|
257
|
+
// Validate model is provided by app
|
|
258
|
+
if (!scenario.model) {
|
|
259
|
+
throw new Error("Model is required for image generation. Please configure model in app generation.config.ts");
|
|
260
|
+
}
|
|
261
|
+
|
|
255
262
|
const imageInput = input as ImageGenerationInput;
|
|
256
|
-
const result = await executeImageGeneration(imageInput, onProgress);
|
|
263
|
+
const result = await executeImageGeneration(imageInput, scenario.model, onProgress);
|
|
257
264
|
|
|
258
265
|
if (!result.success || !result.imageUrl) {
|
|
259
266
|
throw new Error(result.error || "Image generation failed");
|
|
@@ -20,6 +20,7 @@ export interface WizardScenarioData {
|
|
|
20
20
|
readonly id: string;
|
|
21
21
|
readonly aiPrompt: string;
|
|
22
22
|
readonly outputType?: WizardOutputType;
|
|
23
|
+
readonly model?: string; // AI model from app config
|
|
23
24
|
readonly title?: string;
|
|
24
25
|
readonly description?: string;
|
|
25
26
|
[key: string]: unknown;
|