@xuda.io/ai_module 1.1.4241 → 1.1.4243
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 +6 -6
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4450,7 +4450,7 @@ const contact_chat_conversation = async function (req, job_id, headers) {
|
|
|
4450
4450
|
const chat_note = async function (req, job_id, headers) {
|
|
4451
4451
|
const { uid } = req;
|
|
4452
4452
|
const account_profile_info = await account_module.get_active_account_profile_info(uid);
|
|
4453
|
-
let { prompt, conversation_doc, attachments = [], ai_agents } = req;
|
|
4453
|
+
let { prompt: body, conversation_doc, attachments = [], ai_agents } = req;
|
|
4454
4454
|
try {
|
|
4455
4455
|
const conversation_id = conversation_doc._id;
|
|
4456
4456
|
|
|
@@ -4464,7 +4464,7 @@ const chat_note = async function (req, job_id, headers) {
|
|
|
4464
4464
|
{
|
|
4465
4465
|
type: 'message',
|
|
4466
4466
|
role: 'user',
|
|
4467
|
-
content: [{ type: 'input_text', text:
|
|
4467
|
+
content: [{ type: 'input_text', text: body }],
|
|
4468
4468
|
},
|
|
4469
4469
|
],
|
|
4470
4470
|
});
|
|
@@ -4474,7 +4474,7 @@ const chat_note = async function (req, job_id, headers) {
|
|
|
4474
4474
|
sender_conversation_doc.messages.push(obj);
|
|
4475
4475
|
await db_module.save_app_couch_doc_native(sender_app_id, sender_conversation_doc);
|
|
4476
4476
|
|
|
4477
|
-
await db_module.save_app_couch_doc_native(sender_app_id, { _id: obj.id, stat: 3, docType: 'chat_conversation_item', uid, conversation_type: obj.conversation_type, date_created_ts: obj.ts, conversation_id,
|
|
4477
|
+
await db_module.save_app_couch_doc_native(sender_app_id, { _id: obj.id, stat: 3, docType: 'chat_conversation_item', uid, conversation_type: obj.conversation_type, date_created_ts: obj.ts, conversation_id, body });
|
|
4478
4478
|
|
|
4479
4479
|
return { code: 15, data: item };
|
|
4480
4480
|
} catch (err) {
|
|
@@ -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 {
|
|
4488
|
+
let { body, conversation_doc, attachments = [], ai_agents } = req;
|
|
4489
4489
|
try {
|
|
4490
4490
|
const conversation_id = conversation_doc._id;
|
|
4491
4491
|
|
|
@@ -4499,7 +4499,7 @@ const chat_email = async function (req, job_id, headers) {
|
|
|
4499
4499
|
{
|
|
4500
4500
|
type: 'message',
|
|
4501
4501
|
role: 'user',
|
|
4502
|
-
content: [{ type: 'input_text', text:
|
|
4502
|
+
content: [{ type: 'input_text', text: body }],
|
|
4503
4503
|
},
|
|
4504
4504
|
],
|
|
4505
4505
|
});
|
|
@@ -4509,7 +4509,7 @@ const chat_email = async function (req, job_id, headers) {
|
|
|
4509
4509
|
sender_conversation_doc.messages.push(obj);
|
|
4510
4510
|
await db_module.save_app_couch_doc_native(sender_app_id, sender_conversation_doc);
|
|
4511
4511
|
|
|
4512
|
-
await db_module.save_app_couch_doc_native(sender_app_id, { _id: obj.id, stat: 3, docType: 'chat_conversation_item', uid, conversation_type: obj.conversation_type, date_created_ts: obj.ts, conversation_id,
|
|
4512
|
+
await db_module.save_app_couch_doc_native(sender_app_id, { _id: obj.id, stat: 3, docType: 'chat_conversation_item', uid, conversation_type: obj.conversation_type, date_created_ts: obj.ts, conversation_id, body });
|
|
4513
4513
|
|
|
4514
4514
|
return { code: 15, data: item };
|
|
4515
4515
|
} catch (err) {
|