@xuda.io/ai_module 1.1.4264 → 1.1.4266
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 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4350,7 +4350,7 @@ export const submit_chat_conversation = async function (req, job_id, headers) {
|
|
|
4350
4350
|
}
|
|
4351
4351
|
};
|
|
4352
4352
|
|
|
4353
|
-
const update_conversation_mood_level = async function (uid,
|
|
4353
|
+
const update_conversation_mood_level = async function (uid, target_contacts = [], conversation_id, prompt, sender_uid, receiver_uid, update_contact, account_profile_info) {
|
|
4354
4354
|
try {
|
|
4355
4355
|
// analyze the mood of the conversation
|
|
4356
4356
|
const mood_level = await submit_chat_gpt_prompt({
|
|
@@ -4366,6 +4366,11 @@ const update_conversation_mood_level = async function (uid, target = [], convers
|
|
|
4366
4366
|
|
|
4367
4367
|
const mood_level_obj = JSON5.parse(mood_level.data);
|
|
4368
4368
|
|
|
4369
|
+
for await (const target of target_contacts) {
|
|
4370
|
+
const account_profile_info = await account_module.get_active_account_profile_info(target.uid);
|
|
4371
|
+
let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
|
|
4372
|
+
}
|
|
4373
|
+
|
|
4369
4374
|
//////// Sender
|
|
4370
4375
|
if (sender_uid) {
|
|
4371
4376
|
const sender_app_id = await account_module.get_account_default_project_id(sender_uid);
|