@umituz/react-native-ai-generation-content 1.72.13 → 1.72.14

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.72.13",
3
+ "version": "1.72.14",
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",
@@ -109,6 +109,11 @@ export class ImageExecutor
109
109
  private buildModelInput(input: ImageGenerationInput) {
110
110
  const { imageUrls, prompt, aspectRatio, outputFormat } = input;
111
111
 
112
+ // Validate required prompt field
113
+ if (!prompt || prompt.trim() === "") {
114
+ throw new Error("Prompt is required for image generation");
115
+ }
116
+
112
117
  const formattedUrls = imageUrls?.map((url) =>
113
118
  url.startsWith("data:") ? url : `data:image/jpeg;base64,${url}`,
114
119
  );
@@ -117,7 +122,7 @@ export class ImageExecutor
117
122
  ...(formattedUrls && formattedUrls.length > 0
118
123
  ? { image_urls: formattedUrls }
119
124
  : {}),
120
- prompt,
125
+ prompt: prompt.trim(),
121
126
  aspect_ratio: aspectRatio ?? "4:3",
122
127
  output_format: outputFormat ?? "jpeg",
123
128
  num_images: 1,