@xuda.io/ai_module 1.1.5514 → 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.
- package/index.mjs +9 -10
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5124,18 +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
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5127
|
+
const items = [
|
|
5128
|
+
{
|
|
5129
|
+
type: 'message',
|
|
5130
|
+
role: 'user',
|
|
5131
|
+
content: [{ type: 'input_text', text }],
|
|
5132
|
+
},
|
|
5133
|
+
];
|
|
5135
5134
|
|
|
5136
5135
|
try {
|
|
5137
5136
|
const item = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
|
|
5138
|
-
items
|
|
5137
|
+
items,
|
|
5139
5138
|
});
|
|
5140
5139
|
} catch (err) {
|
|
5141
5140
|
throw err;
|
|
@@ -5144,7 +5143,7 @@ const items= [
|
|
|
5144
5143
|
try {
|
|
5145
5144
|
let contact_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, contact_id);
|
|
5146
5145
|
const item = await client.conversations.items.create(contact_doc.contact_reference_conversation_id, {
|
|
5147
|
-
items
|
|
5146
|
+
items,
|
|
5148
5147
|
});
|
|
5149
5148
|
} catch (err) {
|
|
5150
5149
|
throw err;
|