@xuda.io/ai_module 1.1.4844 → 1.1.4845

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 +16 -10
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6006,16 +6006,22 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
6006
6006
  } catch (error) {
6007
6007
  process_stat = 'partial';
6008
6008
  }
6009
-
6010
- const items = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
6011
- items: [
6012
- {
6013
- type: 'message',
6014
- role: 'system',
6015
- content: [{ type: 'input_text', text: `the user attached file name: ${file.filename} with content: ${transcript?.data || transcript || ''}` }],
6016
- },
6017
- ],
6018
- });
6009
+ let items;
6010
+ try {
6011
+ items = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
6012
+ items: [
6013
+ {
6014
+ type: 'message',
6015
+ role: 'system',
6016
+ content: [{ type: 'input_text', text: `the user attached file name: ${file.filename} with content: ${transcript?.data || transcript || ''}` }],
6017
+ },
6018
+ ],
6019
+ });
6020
+ report_ai_status('conversations');
6021
+ } catch (err) {
6022
+ report_ai_status('conversations', err);
6023
+ throw err;
6024
+ }
6019
6025
 
6020
6026
  let out_conversation_item_obj = {
6021
6027
  _id: await _common.xuda_get_uuid('chat_conversation_item'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4844",
3
+ "version": "1.1.4845",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",