@xuda.io/ai_module 1.1.4835 → 1.1.4837

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 +18 -11
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3712,8 +3712,9 @@ const contact_chat_conversation = async function (req, job_id, headers) {
3712
3712
  },
3713
3713
  ],
3714
3714
  });
3715
+ report_ai_status('conversations');
3715
3716
  } catch (err) {
3716
- report_ai_status('vectorStores', err);
3717
+ report_ai_status('conversations', err);
3717
3718
  throw err;
3718
3719
  }
3719
3720
 
@@ -3760,16 +3761,22 @@ const chat_note = async function (req, job_id, headers) {
3760
3761
  let sender_conversation_doc = await db_module.get_app_couch_doc_native(sender_app_id, conversation_id);
3761
3762
 
3762
3763
  await attachment_handler(uid, sender_app_id, conversation_id, attachments, account_profile_info);
3763
-
3764
- const item = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
3765
- items: [
3766
- {
3767
- type: 'message',
3768
- role: 'user',
3769
- content: [{ type: 'input_text', text: body }],
3770
- },
3771
- ],
3772
- });
3764
+ let item;
3765
+ try {
3766
+ item = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
3767
+ items: [
3768
+ {
3769
+ type: 'message',
3770
+ role: 'user',
3771
+ content: [{ type: 'input_text', text: body }],
3772
+ },
3773
+ ],
3774
+ });
3775
+ report_ai_status('conversations');
3776
+ } catch (err) {
3777
+ report_ai_status('conversations', err);
3778
+ throw err;
3779
+ }
3773
3780
 
3774
3781
  // let obj = { id: item.data[0].id, ts: Date.now(), uid, read: true, conversation_type: 'note' };
3775
3782
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4835",
3
+ "version": "1.1.4837",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",