@xuda.io/ai_module 1.1.4443 → 1.1.4445

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 +15 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4356,7 +4356,7 @@ const chat_email = async function (req, job_id, headers) {
4356
4356
 
4357
4357
  const sender_app_id = account_profile_info.app_id;
4358
4358
  let sender_conversation_doc = await db_module.get_app_couch_doc_native(sender_app_id, conversation_id);
4359
-
4359
+ debugger;
4360
4360
  await attachment_handler(uid, sender_app_id, conversation_id, attachments, account_profile_info);
4361
4361
 
4362
4362
  const item = await client.conversations.items.create(conversation_id, {
@@ -6441,7 +6441,15 @@ export const get_profile_picture = async function (uid, account_type = 'business
6441
6441
  const uniqueId = Date.now() + '_' + Math.random().toString(36).substring(7);
6442
6442
  const tempOutputPath = path.join(tempDir, `output_${uniqueId}.png`);
6443
6443
 
6444
- let prompt, factual_prompt, originalname, factual_image_mode, imageBase64, image_blob_ret, file, profile_picture_source;
6444
+ let prompt,
6445
+ factual_prompt,
6446
+ originalname,
6447
+ factual_image_mode,
6448
+ imageBase64,
6449
+ image_blob_ret,
6450
+ file,
6451
+ profile_picture_source,
6452
+ resize = {};
6445
6453
 
6446
6454
  switch (account_type) {
6447
6455
  case 'personal': {
@@ -6450,6 +6458,11 @@ export const get_profile_picture = async function (uid, account_type = 'business
6450
6458
  facts,
6451
6459
  )}" and create realistic fictional profile picture transparent background ,person in the center of the picture add top margin the person should cover the whole picture`;
6452
6460
  originalname = normalizeFilename(name) + '_xu_profile.png';
6461
+ resize = {
6462
+ fit: 'inside', // Scale up/down to fit inside 1024×1024 while preserving aspect ratio
6463
+ withoutEnlargement: false, // Allow enlargement if original is smaller
6464
+ background: { r: 0, g: 0, b: 0, alpha: 0 },
6465
+ };
6453
6466
  break;
6454
6467
  }
6455
6468
 
@@ -6474,7 +6487,6 @@ export const get_profile_picture = async function (uid, account_type = 'business
6474
6487
  account_profile_info,
6475
6488
  tools: [{ type: 'web_search_preview' }],
6476
6489
  });
6477
- // console.log('=============', ret);
6478
6490
 
6479
6491
  return ret.data;
6480
6492
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4443",
3
+ "version": "1.1.4445",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",