@xuda.io/ai_module 1.1.4243 → 1.1.4245
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 +4 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4485,7 +4485,7 @@ const chat_note = async function (req, job_id, headers) {
|
|
|
4485
4485
|
const chat_email = async function (req, job_id, headers) {
|
|
4486
4486
|
const { uid } = req;
|
|
4487
4487
|
const account_profile_info = await account_module.get_active_account_profile_info(uid);
|
|
4488
|
-
let { body, conversation_doc, attachments = [], ai_agents } = req;
|
|
4488
|
+
let { prompt: body, conversation_doc, attachments = [], ai_agents } = req;
|
|
4489
4489
|
try {
|
|
4490
4490
|
const conversation_id = conversation_doc._id;
|
|
4491
4491
|
|
|
@@ -4504,7 +4504,7 @@ const chat_email = async function (req, job_id, headers) {
|
|
|
4504
4504
|
],
|
|
4505
4505
|
});
|
|
4506
4506
|
|
|
4507
|
-
let obj = { id: item.data[0].id, ts: Date.now(), uid, read: true, conversation_type: '
|
|
4507
|
+
let obj = { id: item.data[0].id, ts: Date.now(), uid, read: true, conversation_type: 'email' };
|
|
4508
4508
|
|
|
4509
4509
|
sender_conversation_doc.messages.push(obj);
|
|
4510
4510
|
await db_module.save_app_couch_doc_native(sender_app_id, sender_conversation_doc);
|
|
@@ -6607,6 +6607,8 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
|
|
|
6607
6607
|
],
|
|
6608
6608
|
});
|
|
6609
6609
|
system_message_items.push({ id: items.last_id, ts: Date.now(), conversation_type: 'attachment', file });
|
|
6610
|
+
|
|
6611
|
+
await db_module.save_app_couch_doc_native(uid, { _id: obj.id, stat: 3, docType: 'chat_conversation_item', uid, conversation_type: obj.conversation_type, date_created_ts: obj.ts, conversation_id, file });
|
|
6610
6612
|
}
|
|
6611
6613
|
|
|
6612
6614
|
// const items = await client.conversations.items.create(conversation_id, {
|