@xuda.io/ai_module 1.1.4591 → 1.1.4593
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 +5 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6461,10 +6461,10 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
|
|
|
6461
6461
|
],
|
|
6462
6462
|
});
|
|
6463
6463
|
|
|
6464
|
-
const obj = { id: items.last_id, ts: Date.now(), conversation_type: 'attachment', file };
|
|
6465
|
-
system_message_items.push(obj);
|
|
6464
|
+
// const obj = { id: items.last_id, ts: Date.now(), conversation_type: 'attachment', file };
|
|
6465
|
+
// system_message_items.push(obj);
|
|
6466
6466
|
|
|
6467
|
-
await db_module.save_app_couch_doc_native(account_profile_info.app_id, { _id: obj.id, stat: 3, docType: 'chat_conversation_item', ts: obj.ts, uid, conversation_type: obj.conversation_type, date_created_ts: obj.ts, conversation_id, file, transcript, reference_id: conversation_doc.reference_id });
|
|
6467
|
+
// await db_module.save_app_couch_doc_native(account_profile_info.app_id, { _id: obj.id, stat: 3, docType: 'chat_conversation_item', ts: obj.ts, uid, conversation_type: obj.conversation_type, date_created_ts: obj.ts, conversation_id, file, transcript, reference_id: conversation_doc.reference_id });
|
|
6468
6468
|
///////////////
|
|
6469
6469
|
let out_conversation_item_obj = {
|
|
6470
6470
|
_id: await _common.xuda_get_uuid('chat_conversation_item'),
|
|
@@ -6483,6 +6483,7 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
|
|
|
6483
6483
|
conversation_item_reference_id: items.last_id,
|
|
6484
6484
|
};
|
|
6485
6485
|
await db_module.save_app_couch_doc_native(account_profile_info.app_id, out_conversation_item_obj);
|
|
6486
|
+
system_message_items.push(out_conversation_item_obj);
|
|
6486
6487
|
}
|
|
6487
6488
|
|
|
6488
6489
|
// const items = await client.conversations.items.create(conversation_id, {
|
|
@@ -6495,7 +6496,7 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
|
|
|
6495
6496
|
|
|
6496
6497
|
conversation_doc.ts = Date.now();
|
|
6497
6498
|
conversation_doc.stat = 2;
|
|
6498
|
-
conversation_doc.messages = [...conversation_doc.messages, ...system_message_items];
|
|
6499
|
+
// conversation_doc.messages = [...conversation_doc.messages, ...system_message_items];
|
|
6499
6500
|
// s.push(obj);
|
|
6500
6501
|
await db_module.save_app_couch_doc_native(app_id, conversation_doc);
|
|
6501
6502
|
return system_message_items;
|