@xuda.io/ai_module 1.1.4263 → 1.1.4265

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.
Files changed (2) hide show
  1. package/index.mjs +14 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4242,7 +4242,19 @@ export const create_conversation = async function (req, job_id, headers) {
4242
4242
  receiver_conversation_doc.chat_image = sender_conversation_doc.chat_image;
4243
4243
  await db_module.save_app_couch_doc_native(receiver_app_id, receiver_conversation_doc);
4244
4244
 
4245
- await update_conversation_mood_level(uid, conversation_obj.id, prompt, uid, contact_uid_chat_conversation, true, account_profile_info);
4245
+ await update_conversation_mood_level(
4246
+ uid,
4247
+ [
4248
+ { uid: account_profile_info.uid, contact_id: reference_id },
4249
+ { uid: contact_uid_chat_conversation.uid, contact_id: reference_id },
4250
+ ],
4251
+ conversation_obj.id,
4252
+ prompt,
4253
+ uid,
4254
+ contact_uid_chat_conversation,
4255
+ true,
4256
+ account_profile_info,
4257
+ );
4246
4258
  } else {
4247
4259
  // other cases rather then chat
4248
4260
  await update_conversation_mood_level(uid, [{ uid: account_profile_info.uid, contact_id: reference_id }], conversation_obj.id, prompt, null, receiver_contact_doc.contact_uid, conversation_doc.reference_type === 'contacts', account_profile_info);
@@ -4338,7 +4350,7 @@ export const submit_chat_conversation = async function (req, job_id, headers) {
4338
4350
  }
4339
4351
  };
4340
4352
 
4341
- const update_conversation_mood_level = async function (uid, conversation_id, prompt, sender_uid, receiver_uid, update_contact, account_profile_info) {
4353
+ const update_conversation_mood_level = async function (uid, target_contacts = [], conversation_id, prompt, sender_uid, receiver_uid, update_contact, account_profile_info) {
4342
4354
  try {
4343
4355
  // analyze the mood of the conversation
4344
4356
  const mood_level = await submit_chat_gpt_prompt({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4263",
3
+ "version": "1.1.4265",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",