@xuda.io/ai_module 1.1.4474 → 1.1.4475
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 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4361,7 +4361,7 @@ const chat_note = async function (req, job_id, headers) {
|
|
|
4361
4361
|
};
|
|
4362
4362
|
|
|
4363
4363
|
const chat_email = async function (req, job_id, headers) {
|
|
4364
|
-
const { uid, email_id } = req;
|
|
4364
|
+
const { uid, email_id, perform_ai_execution = true } = req;
|
|
4365
4365
|
const account_profile_info = await account_module.get_active_account_profile_info(uid);
|
|
4366
4366
|
let { prompt: body, conversation_doc, attachments = [], ai_agents } = req;
|
|
4367
4367
|
try {
|
|
@@ -4369,9 +4369,9 @@ const chat_email = async function (req, job_id, headers) {
|
|
|
4369
4369
|
|
|
4370
4370
|
const sender_app_id = account_profile_info.app_id;
|
|
4371
4371
|
let sender_conversation_doc = await db_module.get_app_couch_doc_native(sender_app_id, conversation_id);
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4372
|
+
if (perform_ai_execution) {
|
|
4373
|
+
await attachment_handler(uid, sender_app_id, conversation_id, attachments, account_profile_info);
|
|
4374
|
+
}
|
|
4375
4375
|
const item = await client.conversations.items.create(conversation_id, {
|
|
4376
4376
|
items: [
|
|
4377
4377
|
{
|