@xuda.io/ai_module 1.1.4367 → 1.1.4368

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 +6 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6787,7 +6787,7 @@ export const get_profile_picture = async function (uid, account_type = 'business
6787
6787
  .replace(/^_+|_+$/g, ''); // trim leading/trailing underscores
6788
6788
  }
6789
6789
 
6790
- let prompt, factual_prompt, originalname, factual_image_mode, imageBase64, image_blob_ret, file;
6790
+ let prompt, factual_prompt, originalname, factual_image_mode, imageBase64, image_blob_ret, file, profile_picture_source;
6791
6791
 
6792
6792
  switch (account_type) {
6793
6793
  case 'personal': {
@@ -6828,16 +6828,20 @@ export const get_profile_picture = async function (uid, account_type = 'business
6828
6828
  // debugger;
6829
6829
  try {
6830
6830
  // first attempt
6831
+ profile_picture_source = 'internet search';
6831
6832
  let url = await get_url();
6833
+
6832
6834
  if (url.substr(0, 8) !== 'https://') {
6835
+ profile_picture_source = 'factual';
6833
6836
  // second attempt
6834
6837
  url = await get_url();
6835
6838
  if (url.substr(0, 8) !== 'https://') {
6836
6839
  factual_image_mode = true;
6840
+ profile_picture_source = 'factual';
6837
6841
  }
6838
6842
  } else {
6839
6843
  // success
6840
-
6844
+ profile_picture_source = 'internet search';
6841
6845
  try {
6842
6846
  image_blob_ret = await get_image_blob_from_downloaded_image(url);
6843
6847
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4367",
3
+ "version": "1.1.4368",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",