@xuda.io/ai_module 1.1.4327 → 1.1.4329

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 +5 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6734,16 +6734,18 @@ const get_profile_image = async function (uid, account_type = 'personal', name,
6734
6734
  .replace(/^_+|_+$/g, ''); // trim leading/trailing underscores
6735
6735
  }
6736
6736
 
6737
- let prompt;
6737
+ let prompt, originalname;
6738
6738
 
6739
6739
  switch (account_type) {
6740
6740
  case 'personal': {
6741
6741
  prompt = `find "${name}" person profile image base on the following facts: "${JSON.stringify(facts)}", Return only png,jpg image url single result e.g: "https://example.com/person_image.png", nothing else`;
6742
+ originalname = normalizeFilename(name) + '_xu_logo.png';
6742
6743
  break;
6743
6744
  }
6744
6745
 
6745
6746
  case 'business': {
6746
6747
  prompt = `find "${name}" icon/logo, Return only png,jpg image url single result e.g: "https://example.com/logo_image.png", nothing else`;
6748
+ originalname = normalizeFilename(name) + '_xu_profile.png';
6747
6749
  break;
6748
6750
  }
6749
6751
 
@@ -6807,9 +6809,9 @@ const get_profile_image = async function (uid, account_type = 'personal', name,
6807
6809
  console.log(file);
6808
6810
 
6809
6811
  const file_obj = {
6810
- originalname: normalizeFilename(name) + '_xu_logo.png',
6812
+ originalname,
6811
6813
  path: outputPath,
6812
- mimetype: `application/png`,
6814
+ mimetype: `image/png`,
6813
6815
  };
6814
6816
 
6815
6817
  const drive_ret = await drive_module.upload_drive_file_user({ uid, path: '/Profile Images' }, job_id, headers, file_obj);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4327",
3
+ "version": "1.1.4329",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",