@xuda.io/ai_module 1.1.4345 → 1.1.4347

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 +18 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -5290,7 +5290,17 @@ setTimeout(async () => {
5290
5290
  // },
5291
5291
  // });
5292
5292
 
5293
- ret = await get_profile_image(uid, 'business', 'ioshka media', {}, account_profile_info);
5293
+ // ret = await get_profile_image(uid, 'business', 'ioshka media', {}, account_profile_info);
5294
+ ret = await get_profile_image(
5295
+ uid,
5296
+ 'personal',
5297
+ 'Glenn Willett',
5298
+ {
5299
+ email: 'glennwillett@schoolsponsoringregionzft.com',
5300
+ body: 'We have a couple middle and elementary schools a few minutes from you in Boca Raton that have available sponsorship slots. The parents would see your sponsorship in the student progress reports each week.Is it okay if I send over the available spots?',
5301
+ },
5302
+ account_profile_info,
5303
+ );
5294
5304
 
5295
5305
  console.log(ret);
5296
5306
  }, 1000);
@@ -6724,7 +6734,7 @@ export const is_business_contact = async function (uid, email, name, subject, bo
6724
6734
  } catch (error) {}
6725
6735
  };
6726
6736
 
6727
- const get_profile_image = async function (uid, account_type = 'business', name, facts = {}, headers, account_profile_info) {
6737
+ const get_profile_image = async function (uid, account_type = 'business', name, facts = {}, account_profile_info) {
6728
6738
  function normalizeFilename(name) {
6729
6739
  return name
6730
6740
  .toLowerCase() // lowercase
@@ -6763,7 +6773,6 @@ const get_profile_image = async function (uid, account_type = 'business', name,
6763
6773
  uid,
6764
6774
  prompt,
6765
6775
  model: 'gpt-5-nano',
6766
-
6767
6776
  metadata: { func: 'get_profile_image' },
6768
6777
  account_profile_info,
6769
6778
  tools: [{ type: 'web_search_preview' }],
@@ -6772,6 +6781,8 @@ const get_profile_image = async function (uid, account_type = 'business', name,
6772
6781
 
6773
6782
  return ret.data;
6774
6783
  };
6784
+
6785
+ debugger;
6775
6786
  try {
6776
6787
  let url = await get_url();
6777
6788
  if (!url.includes('https://')) {
@@ -6781,7 +6792,10 @@ const get_profile_image = async function (uid, account_type = 'business', name,
6781
6792
  try {
6782
6793
  file = await get_image_blob_from_downloaded_image(url);
6783
6794
  } catch (err) {
6784
- if (!err.message.includes('Failed to fetch image URL')) return console.error(err);
6795
+ if (!err.message.includes('Failed to fetch image URL')) {
6796
+ console.error(err);
6797
+ return '';
6798
+ }
6785
6799
 
6786
6800
  try {
6787
6801
  url = await get_url();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4345",
3
+ "version": "1.1.4347",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",