@xuda.io/ai_module 1.1.5567 → 1.1.5568

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.
Files changed (2) hide show
  1. package/index.mjs +16 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6590,7 +6590,9 @@ const create_ai_agent_image = async function (req, job_id, headers) {
6590
6590
  // const model = 'gpt-image-1-mini';
6591
6591
  const prompt = `
6592
6592
  Create a futuristic, profile portrait with a transparent background.
6593
- make the character look like the person from the provided image with complete metal face hairless ,
6593
+ Use the provided image only as loose inspiration for pose, framing, and general visual style.
6594
+ Do not preserve identity and do not create a photorealistic likeness.
6595
+ Make the character a complete metallic, hairless humanoid,
6594
6596
  The humanoid must remain completely metal.
6595
6597
  Center the character facing forward, with subtle top spacing, showing only the head and shoulders.
6596
6598
  Style the humanoid with functional, minimal attire integrated into its form (such as collars,
@@ -6622,6 +6624,19 @@ const create_ai_agent_image = async function (req, job_id, headers) {
6622
6624
  });
6623
6625
  report_ai_status(model);
6624
6626
  } catch (err) {
6627
+ if (err?.code === 'moderation_blocked') {
6628
+ const fallback_prompt = `
6629
+ Create a futuristic metallic humanoid portrait with transparent background.
6630
+ Head and shoulders only, centered, forward-facing.
6631
+ The design should represent "${ai_agent_doc.properties.menuName} - ${ai_agent_doc.studio_meta.agent_assistant_name}".
6632
+ Keep the character fully robotic and non-photorealistic.
6633
+ Use a consistent palette and emphasize intelligence, clarity, and sophistication.
6634
+ `;
6635
+
6636
+ const images_arr = await create_and_upload_image_to_drive('studio', 'Progs Thumbnails', ai_agent_id, fallback_prompt, 1, uid, app_id, job_id, headers, false, tags, account_profile_info);
6637
+ report_ai_status(model, err);
6638
+ return { code: 1, data: images_arr[0] };
6639
+ }
6625
6640
  report_ai_status(model, err);
6626
6641
  throw err;
6627
6642
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5567",
3
+ "version": "1.1.5568",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",