@xuda.io/ai_module 1.1.5593 → 1.1.5595
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 +34 -29
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4355,22 +4355,27 @@ export const submit_chat_conversation = async function (req, job_id, headers) {
|
|
|
4355
4355
|
}
|
|
4356
4356
|
|
|
4357
4357
|
case 'ai_chats': {
|
|
4358
|
+
ret = await ai_chat_conversation(req, job_id, headers);
|
|
4358
4359
|
break;
|
|
4359
4360
|
}
|
|
4360
4361
|
|
|
4361
4362
|
case 'apps': {
|
|
4363
|
+
ret = await chat_studio(req, job_id, headers);
|
|
4362
4364
|
break;
|
|
4363
4365
|
}
|
|
4364
4366
|
|
|
4365
4367
|
case 'ai_agent': {
|
|
4368
|
+
ret = await ai_chat_conversation(req, job_id, headers);
|
|
4366
4369
|
break;
|
|
4367
4370
|
}
|
|
4368
4371
|
|
|
4369
4372
|
case 'studio': {
|
|
4373
|
+
ret = await chat_studio(req, job_id, headers);
|
|
4370
4374
|
break;
|
|
4371
4375
|
}
|
|
4372
4376
|
|
|
4373
4377
|
case 'dashboard': {
|
|
4378
|
+
// ??
|
|
4374
4379
|
break;
|
|
4375
4380
|
}
|
|
4376
4381
|
|
|
@@ -4379,40 +4384,40 @@ export const submit_chat_conversation = async function (req, job_id, headers) {
|
|
|
4379
4384
|
break;
|
|
4380
4385
|
}
|
|
4381
4386
|
|
|
4382
|
-
if (route_to_studio) {
|
|
4383
|
-
|
|
4384
|
-
} else if (conversation_doc.reference_type === 'contacts') {
|
|
4385
|
-
|
|
4387
|
+
// if (route_to_studio) {
|
|
4388
|
+
// ret = await chat_studio(req, job_id, headers);
|
|
4389
|
+
// } else if (conversation_doc.reference_type === 'contacts') {
|
|
4390
|
+
// req._thread_reentry = Date.now() - conversation_doc.date_created_ts > 60000;
|
|
4386
4391
|
|
|
4387
|
-
|
|
4392
|
+
// account_msa.ts_contact(uid, conversation_doc.reference_id);
|
|
4388
4393
|
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4394
|
+
// switch (conversation_doc.conversation_type) {
|
|
4395
|
+
// case 'note': {
|
|
4396
|
+
// ret = await chat_note(req, job_id, headers);
|
|
4397
|
+
// break;
|
|
4398
|
+
// }
|
|
4399
|
+
// case 'ai_chat': {
|
|
4400
|
+
// ret = await ai_chat_conversation(req, job_id, headers);
|
|
4401
|
+
// break;
|
|
4402
|
+
// }
|
|
4398
4403
|
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4404
|
+
// case 'email': {
|
|
4405
|
+
// ret = await chat_email(req, job_id, headers);
|
|
4406
|
+
// break;
|
|
4407
|
+
// }
|
|
4403
4408
|
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4409
|
+
// case 'chat': {
|
|
4410
|
+
// ret = await contact_chat_conversation(req, job_id, headers);
|
|
4411
|
+
// break;
|
|
4412
|
+
// }
|
|
4408
4413
|
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
} else {
|
|
4414
|
-
|
|
4415
|
-
}
|
|
4414
|
+
// default:
|
|
4415
|
+
// ret = { code: -44, data: 'invalid conversation_type ' + conversation_doc.conversation_type };
|
|
4416
|
+
// break;
|
|
4417
|
+
// }
|
|
4418
|
+
// } else {
|
|
4419
|
+
// ret = await ai_chat_conversation(req, job_id, headers);
|
|
4420
|
+
// }
|
|
4416
4421
|
|
|
4417
4422
|
if (ret.code > -1) {
|
|
4418
4423
|
let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
|