@xuda.io/ai_module 1.1.4759 → 1.1.4761

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 +11 -9
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6458,10 +6458,11 @@ const create_ai_agent_image = async function (req, job_id, headers) {
6458
6458
  const uniqueId = Date.now() + '_' + Math.random().toString(36).substring(7);
6459
6459
  const tempOutputPath = path.join(tempDir, `output_${uniqueId}.png`);
6460
6460
 
6461
- const { app_id, uid, ai_agent_id, tags, account_profile_info } = req;
6462
-
6463
- const ai_agent_doc = await db_module.get_app_couch_doc_native(app_id, ai_agent_id);
6461
+ const { app_id, uid, ai_agent_id, tags } = req;
6462
+ const account_profile_info = await get_active_account_profile_info(uid);
6463
+ const ai_agent_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, ai_agent_id);
6464
6464
  const account_doc = await db_module.get_couch_doc_native('xuda_accounts', uid);
6465
+
6465
6466
  // faceless humanoid for business
6466
6467
  if (account_doc.account_info.account_type === 'business') {
6467
6468
  const prompt = `
@@ -6511,11 +6512,7 @@ const create_ai_agent_image = async function (req, job_id, headers) {
6511
6512
  imageBase64 = Buffer.from(await image_blob_ret.image_blob.arrayBuffer()).toString('base64');
6512
6513
  // const model = 'chatgpt-image-latest';
6513
6514
  const model = 'gpt-image-1-mini';
6514
- const ai_avatar_response = await client.images.edit({
6515
- model,
6516
- image: image_blob_ret.image_blob,
6517
-
6518
- prompt: `
6515
+ const prompt=`
6519
6516
  Create a futuristic, profile portrait with a transparent background.
6520
6517
  make the character look like the person from the provided image with complete metal face hairless ,
6521
6518
  The humanoid must remain completely metal.
@@ -6536,7 +6533,12 @@ const create_ai_agent_image = async function (req, job_id, headers) {
6536
6533
  - Material finish
6537
6534
  - Light interaction Use advanced or reflective materials to convey intelligence and sophistication.
6538
6535
  The overall composition should symbolize the fusion of human creativity and machine intelligence.
6539
- `,
6536
+ `
6537
+ const ai_avatar_response = await client.images.edit({
6538
+ model,
6539
+ image: image_blob_ret.image_blob,
6540
+
6541
+ prompt,
6540
6542
  background: 'transparent',
6541
6543
  });
6542
6544
  imageBase64 = ai_avatar_response.data[0].b64_json;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4759",
3
+ "version": "1.1.4761",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",