@xuda.io/ai_module 1.1.5073 → 1.1.5075
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 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3677,7 +3677,7 @@ export const submit_chat_conversation = async function (req, job_id, headers) {
|
|
|
3677
3677
|
req._thread_reentry = Date.now() - conversation_doc.date_created_ts > 60000;
|
|
3678
3678
|
|
|
3679
3679
|
account_msa.ts_contact(uid, conversation_doc.reference_id);
|
|
3680
|
-
|
|
3680
|
+
|
|
3681
3681
|
switch (conversation_doc.conversation_type) {
|
|
3682
3682
|
case 'note': {
|
|
3683
3683
|
ret = await chat_note(req, job_id, headers);
|
|
@@ -3711,6 +3711,13 @@ export const submit_chat_conversation = async function (req, job_id, headers) {
|
|
|
3711
3711
|
} else {
|
|
3712
3712
|
ret = await ai_chat_conversation(req, job_id, headers);
|
|
3713
3713
|
}
|
|
3714
|
+
|
|
3715
|
+
if (ret.code > -1) {
|
|
3716
|
+
let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
|
|
3717
|
+
conversation_doc.conversation_item_id = ret.data.id;
|
|
3718
|
+
await db_module.save_app_couch_doc(account_profile_info.app_id, conversation_doc);
|
|
3719
|
+
}
|
|
3720
|
+
|
|
3714
3721
|
return ret;
|
|
3715
3722
|
} catch (err) {
|
|
3716
3723
|
return { code: -14, data: err.message || String(err) };
|