@xuda.io/ai_module 1.1.4796 → 1.1.4797

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 -14
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4678,6 +4678,7 @@ const chat_email = async function (req, job_id, headers) {
4678
4678
  subject,
4679
4679
  last_email_item_id: last_email_item?._id,
4680
4680
  rtl: _common.detectRTL(body),
4681
+ process_stat: perform_ai_execution ? 'full' : 'partial',
4681
4682
  };
4682
4683
 
4683
4684
  const save_ret = await db_module.save_app_couch_doc(sender_app_id, out_conversation_item_obj);
@@ -6719,15 +6720,10 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
6719
6720
  let system_message_items = [];
6720
6721
  for (const file of attachments) {
6721
6722
  file_names.push(file.filename);
6722
- const transcript = await get_transcript(file.filename);
6723
-
6724
- // system_message_items.push({
6725
- // type: 'message',
6726
- // role: 'system',
6727
- // content: [{ type: 'input_text', text: `the user attached file name: ${file.filename} with content: ${transcript.data || transcript}` }],
6728
- // });
6729
-
6730
- // prompt += await generate_XU_markdown('attachment', file); //`[![Alt Text](${file.file_url})]`;
6723
+ let transcript;
6724
+ try {
6725
+ transcript = await get_transcript(file.filename);
6726
+ } catch (error) {}
6731
6727
 
6732
6728
  const items = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
6733
6729
  items: [
@@ -6739,11 +6735,6 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
6739
6735
  ],
6740
6736
  });
6741
6737
 
6742
- // const obj = { id: items.last_id, ts: Date.now(), conversation_type: 'attachment', file };
6743
- // system_message_items.push(obj);
6744
-
6745
- // 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 });
6746
- ///////////////
6747
6738
  let out_conversation_item_obj = {
6748
6739
  _id: await _common.xuda_get_uuid('chat_conversation_item'),
6749
6740
  stat: 3,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4796",
3
+ "version": "1.1.4797",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",