@xuda.io/ai_module 1.1.4664 → 1.1.4665
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 +2 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4302,7 +4302,7 @@ export const create_conversation = async function (req, job_id, headers) {
|
|
|
4302
4302
|
|
|
4303
4303
|
const process_conversation = async function (uid, conversation_id, account_profile_info, job_id, headers) {
|
|
4304
4304
|
let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
|
|
4305
|
-
const { conversation_type, prompt } = conversation_doc;
|
|
4305
|
+
const { conversation_type, prompt, reference_id } = conversation_doc;
|
|
4306
4306
|
|
|
4307
4307
|
// Ask GPT for title
|
|
4308
4308
|
if (conversation_type !== 'email') {
|
|
@@ -4383,7 +4383,7 @@ const process_conversation = async function (uid, conversation_id, account_profi
|
|
|
4383
4383
|
} else {
|
|
4384
4384
|
// other cases rather then chat
|
|
4385
4385
|
if (perform_ai_execution) {
|
|
4386
|
-
await update_conversation_mood_level(uid, [{ uid: account_profile_info.uid, contact_id: reference_id }], conversation_doc._id, prompt, null,
|
|
4386
|
+
await update_conversation_mood_level(uid, [{ uid: account_profile_info.uid, contact_id: reference_id }], conversation_doc._id, prompt, null, reference_id, conversation_doc.reference_type === 'contacts', account_profile_info);
|
|
4387
4387
|
}
|
|
4388
4388
|
}
|
|
4389
4389
|
}
|