@xuda.io/ai_module 1.1.4378 → 1.1.4380
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 +3 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4258,7 +4258,7 @@ export const create_conversation = async function (req, job_id, headers) {
|
|
|
4258
4258
|
);
|
|
4259
4259
|
} else {
|
|
4260
4260
|
// other cases rather then chat
|
|
4261
|
-
await update_conversation_mood_level(uid, [{ uid: account_profile_info.uid, contact_id: reference_id }], conversation_obj.id, prompt, null,
|
|
4261
|
+
await update_conversation_mood_level(uid, [{ uid: account_profile_info.uid, contact_id: reference_id }], conversation_obj.id, prompt, null, recipient_contact_id, conversation_doc.reference_type === 'contacts', account_profile_info);
|
|
4262
4262
|
}
|
|
4263
4263
|
}
|
|
4264
4264
|
}, 1000);
|
|
@@ -6775,7 +6775,7 @@ export const is_business_contact = async function (uid, email, name, subject, bo
|
|
|
6775
6775
|
} catch (error) {}
|
|
6776
6776
|
};
|
|
6777
6777
|
|
|
6778
|
-
export const get_profile_picture = async function (uid, account_type = 'business', name,
|
|
6778
|
+
export const get_profile_picture = async function (uid, account_type = 'business', name, metadata = {}, account_profile_info, job_id, headers) {
|
|
6779
6779
|
const tempDir = os.tmpdir();
|
|
6780
6780
|
const uniqueId = Date.now() + '_' + Math.random().toString(36).substring(7);
|
|
6781
6781
|
const tempOutputPath = path.join(tempDir, `output_${uniqueId}.png`);
|
|
@@ -6793,7 +6793,7 @@ export const get_profile_picture = async function (uid, account_type = 'business
|
|
|
6793
6793
|
|
|
6794
6794
|
switch (account_type) {
|
|
6795
6795
|
case 'personal': {
|
|
6796
|
-
prompt = `find "${name}" person profile image base on the following facts: "${JSON.stringify(
|
|
6796
|
+
prompt = `find "${name}" person profile image base on the following facts: "${JSON.stringify(metadata)}", Return only png,jpg image url single result e.g: "https://fb.com/person_image.png", nothing else`;
|
|
6797
6797
|
factual_prompt = `analyze the the person info base on the name and the facts: {"name": "${name || ''}", facts: "${JSON.stringify(
|
|
6798
6798
|
facts,
|
|
6799
6799
|
)}" 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`;
|