@xuda.io/ai_module 1.1.4474 → 1.1.4476

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.
Files changed (2) hide show
  1. package/index.mjs +5 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4053,7 +4053,7 @@ export const submit_chat_gpt_prompt = async function (req) {
4053
4053
  }
4054
4054
  };
4055
4055
  export const create_conversation = async function (req, job_id, headers) {
4056
- const { uid, prompt, perform_ai_execution = true } = req;
4056
+ const { uid, prompt, perform_ai_execution = true, email_direction = 'out' } = req;
4057
4057
  let { reference_type, reference_id = '', conversation_type } = req;
4058
4058
 
4059
4059
  function getFirstTenWords(text) {
@@ -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
- await attachment_handler(uid, sender_app_id, conversation_id, attachments, account_profile_info);
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
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4474",
3
+ "version": "1.1.4476",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",