@xuda.io/ai_module 1.1.4320 → 1.1.4322
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.
- package/index.mjs +14 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5290,7 +5290,7 @@ setTimeout(async () => {
|
|
|
5290
5290
|
// },
|
|
5291
5291
|
// });
|
|
5292
5292
|
|
|
5293
|
-
// ret = await
|
|
5293
|
+
// ret = await get_profile_image(uid, 'bank of america', account_profile_info);
|
|
5294
5294
|
|
|
5295
5295
|
console.log(ret);
|
|
5296
5296
|
}, 1000);
|
|
@@ -6724,7 +6724,7 @@ export const is_business_contact = async function (uid, email, name, subject, bo
|
|
|
6724
6724
|
} catch (error) {}
|
|
6725
6725
|
};
|
|
6726
6726
|
|
|
6727
|
-
const
|
|
6727
|
+
const get_profile_image = async function (uid, account_type = 'personal', name, facts, account_profile_info) {
|
|
6728
6728
|
function normalizeFilename(name) {
|
|
6729
6729
|
return name
|
|
6730
6730
|
.toLowerCase() // lowercase
|
|
@@ -6734,13 +6734,24 @@ const get_profile_image_from_search = async function (uid, account_type, name, f
|
|
|
6734
6734
|
.replace(/^_+|_+$/g, ''); // trim leading/trailing underscores
|
|
6735
6735
|
}
|
|
6736
6736
|
|
|
6737
|
+
let prompt;
|
|
6738
|
+
|
|
6739
|
+
switch (account_type) {
|
|
6740
|
+
case 'personal': {
|
|
6741
|
+
break;
|
|
6742
|
+
}
|
|
6743
|
+
|
|
6744
|
+
default:
|
|
6745
|
+
break;
|
|
6746
|
+
}
|
|
6747
|
+
|
|
6737
6748
|
const get_url = async function () {
|
|
6738
6749
|
const ret = await submit_chat_gpt_prompt({
|
|
6739
6750
|
uid,
|
|
6740
6751
|
prompt: `find "${name}" icon/logo, Return only png,jpg image url single result e.g: "https://example.com/logo_image.png", nothing else`,
|
|
6741
6752
|
model: 'gpt-5-nano',
|
|
6742
6753
|
|
|
6743
|
-
metadata: { func: '
|
|
6754
|
+
metadata: { func: 'get_profile_image' },
|
|
6744
6755
|
account_profile_info,
|
|
6745
6756
|
tools: [{ type: 'web_search_preview' }],
|
|
6746
6757
|
});
|