@xuda.io/ai_module 1.1.4328 → 1.1.4330
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 +6 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6734,16 +6734,19 @@ 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
|
-
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://
|
|
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://fb.com/person_image.png", nothing else`;
|
|
6742
|
+
|
|
6743
|
+
originalname = normalizeFilename(name) + '_xu_profile.png';
|
|
6742
6744
|
break;
|
|
6743
6745
|
}
|
|
6744
6746
|
|
|
6745
6747
|
case 'business': {
|
|
6746
6748
|
prompt = `find "${name}" icon/logo, Return only png,jpg image url single result e.g: "https://example.com/logo_image.png", nothing else`;
|
|
6749
|
+
originalname = normalizeFilename(name) + '_xu_logo.png';
|
|
6747
6750
|
break;
|
|
6748
6751
|
}
|
|
6749
6752
|
|
|
@@ -6807,7 +6810,7 @@ const get_profile_image = async function (uid, account_type = 'personal', name,
|
|
|
6807
6810
|
console.log(file);
|
|
6808
6811
|
|
|
6809
6812
|
const file_obj = {
|
|
6810
|
-
originalname
|
|
6813
|
+
originalname,
|
|
6811
6814
|
path: outputPath,
|
|
6812
6815
|
mimetype: `image/png`,
|
|
6813
6816
|
};
|