@umituz/react-native-ai-pruna-provider 1.0.38 → 1.0.39
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-pruna-provider",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.39",
|
|
4
4
|
"description": "Pruna AI provider for React Native - implements IAIProvider interface for unified AI generation",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -157,9 +157,14 @@ async function singleSubscribeAttempt<T = unknown>(
|
|
|
157
157
|
requestId,
|
|
158
158
|
});
|
|
159
159
|
|
|
160
|
-
// Wrap result in expected format
|
|
161
|
-
// Pruna returns a URL string — wrap in
|
|
162
|
-
const result = { url: resultUrl } as T;
|
|
160
|
+
// Wrap result in expected format for AI generation content
|
|
161
|
+
// Pruna returns a URL string — wrap in { images: [{ url }] } format
|
|
162
|
+
const result = { images: [{ url: resultUrl }] } as T;
|
|
163
|
+
|
|
164
|
+
generationLogCollector.log(sessionId, TAG, `Result wrapped for AI generation content`, {
|
|
165
|
+
format: 'images: [{ url }]',
|
|
166
|
+
urlPrefix: resultUrl.substring(0, 80) + '...',
|
|
167
|
+
});
|
|
163
168
|
|
|
164
169
|
return { result, requestId };
|
|
165
170
|
}
|
|
@@ -282,7 +287,9 @@ export async function handlePrunaRun<T = unknown>(
|
|
|
282
287
|
generationLogCollector.log(sessionId, runTag, `Run completed in ${elapsed}ms`);
|
|
283
288
|
|
|
284
289
|
options?.onProgress?.({ progress: 100, status: "COMPLETED" as const });
|
|
285
|
-
|
|
290
|
+
|
|
291
|
+
// Wrap result in expected format for AI generation content
|
|
292
|
+
return { images: [{ url: resultUrl }] } as T;
|
|
286
293
|
} catch (error) {
|
|
287
294
|
const elapsed = Date.now() - startTime;
|
|
288
295
|
const message = error instanceof Error ? error.message : String(error);
|