@xuda.io/ai_module 1.1.5513 → 1.1.5514

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 +7 -10
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -5124,15 +5124,18 @@ const add_conversation_item = async function (uid, profile_id, conversation_id,
5124
5124
 
5125
5125
  let text = `${new Date()} User Uid: ${uid} User Name: ${account_info.full_name} Type: ${conversation_type}`;
5126
5126
 
5127
- try {
5128
- const item = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
5129
- items: [
5127
+ const items= [
5130
5128
  {
5131
5129
  type: 'message',
5132
5130
  role: 'user',
5133
5131
  content: [{ type: 'input_text', text }],
5134
5132
  },
5135
5133
  ],
5134
+
5135
+
5136
+ try {
5137
+ const item = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
5138
+ items
5136
5139
  });
5137
5140
  } catch (err) {
5138
5141
  throw err;
@@ -5141,13 +5144,7 @@ const add_conversation_item = async function (uid, profile_id, conversation_id,
5141
5144
  try {
5142
5145
  let contact_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, contact_id);
5143
5146
  const item = await client.conversations.items.create(contact_doc.contact_reference_conversation_id, {
5144
- items: [
5145
- {
5146
- type: 'message',
5147
- role: 'user',
5148
- content: [{ type: 'input_text', text }],
5149
- },
5150
- ],
5147
+ items
5151
5148
  });
5152
5149
  } catch (err) {
5153
5150
  throw err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5513",
3
+ "version": "1.1.5514",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",