@xuda.io/ai_module 1.1.5513 → 1.1.5515

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 +10 -14
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -5124,15 +5124,17 @@ 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
+ const items = [
5128
+ {
5129
+ type: 'message',
5130
+ role: 'user',
5131
+ content: [{ type: 'input_text', text }],
5132
+ },
5133
+ ];
5134
+
5127
5135
  try {
5128
5136
  const item = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
5129
- items: [
5130
- {
5131
- type: 'message',
5132
- role: 'user',
5133
- content: [{ type: 'input_text', text }],
5134
- },
5135
- ],
5137
+ items,
5136
5138
  });
5137
5139
  } catch (err) {
5138
5140
  throw err;
@@ -5141,13 +5143,7 @@ const add_conversation_item = async function (uid, profile_id, conversation_id,
5141
5143
  try {
5142
5144
  let contact_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, contact_id);
5143
5145
  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
- ],
5146
+ items,
5151
5147
  });
5152
5148
  } catch (err) {
5153
5149
  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.5515",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",