@xuda.io/ai_module 1.1.4336 → 1.1.4338
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 +8 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -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 get_profile_image = async function (uid, account_type = 'business', name, facts = {}, account_profile_info) {
|
|
6727
|
+
const get_profile_image = async function (uid, account_type = 'business', name, facts = {}, headers, account_profile_info) {
|
|
6728
6728
|
function normalizeFilename(name) {
|
|
6729
6729
|
return name
|
|
6730
6730
|
.toLowerCase() // lowercase
|
|
@@ -6734,17 +6734,23 @@ const get_profile_image = async function (uid, account_type = 'business', name,
|
|
|
6734
6734
|
.replace(/^_+|_+$/g, ''); // trim leading/trailing underscores
|
|
6735
6735
|
}
|
|
6736
6736
|
|
|
6737
|
-
|
|
6737
|
+
const get_factual_image = function () {};
|
|
6738
|
+
|
|
6739
|
+
let prompt, factual_prompt, originalname;
|
|
6738
6740
|
|
|
6739
6741
|
switch (account_type) {
|
|
6740
6742
|
case 'personal': {
|
|
6741
6743
|
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`;
|
|
6744
|
+
factual_prompt = `analyze the the person info base on the name and the facts: {"name": "${name || ''}", facts: "${JSON.stringify(
|
|
6745
|
+
facts,
|
|
6746
|
+
)}" and create realistic fictional profile picture transparent background ,person in the center of the picture add top margin the person should cover the whole picture`;
|
|
6742
6747
|
originalname = normalizeFilename(name) + '_xu_profile.png';
|
|
6743
6748
|
break;
|
|
6744
6749
|
}
|
|
6745
6750
|
|
|
6746
6751
|
case 'business': {
|
|
6747
6752
|
prompt = `find "${name}" icon/logo, Return only png,jpg image url single result e.g: "https://example.com/logo_image.png", nothing else`;
|
|
6753
|
+
factual_prompt = `create logo for the company named: "${name}" the logo should only be initials of the name or geometric shape`;
|
|
6748
6754
|
originalname = normalizeFilename(name) + '_xu_logo.png';
|
|
6749
6755
|
break;
|
|
6750
6756
|
}
|