@xuda.io/ai_module 1.1.3802 → 1.1.3804

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 +4 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4227,7 +4227,7 @@ const contact_chat_conversation = async function (req, job_id, headers) {
4227
4227
  ],
4228
4228
  });
4229
4229
 
4230
- const obj = { id: item.data[0].id, ts: Date.now(), uid, read: true };
4230
+ const obj = { id: item.data[0].id, ts: Date.now(), uid, read: true, conversation_type: 'chat' };
4231
4231
  receiver_conversation_doc.messages.push(obj);
4232
4232
  await db_module.save_app_couch_doc_native(receiver_app_id, receiver_conversation_doc);
4233
4233
  sender_conversation_doc.messages.push({ ...obj, ...{ read: false } });
@@ -4264,11 +4264,11 @@ const chat_note = async function (req, job_id, headers) {
4264
4264
 
4265
4265
  const obj = { id: item.data[0].id, ts: Date.now(), uid, read: true, conversation_type: 'note' };
4266
4266
  // receiver_conversation_doc.messages.push(obj);
4267
- await db_module.save_app_couch_doc_native(receiver_app_id, receiver_conversation_doc);
4267
+ // await db_module.save_app_couch_doc_native(receiver_app_id, receiver_conversation_doc);
4268
4268
  sender_conversation_doc.messages.push({ ...obj, ...{ read: false } });
4269
4269
  await db_module.save_app_couch_doc_native(sender_app_id, sender_conversation_doc);
4270
4270
 
4271
- update_conversation_mood_level(conversation_id, prompt, uid, receiver_contact_doc.contact_uid, conversation_doc.reference_type === 'contacts');
4271
+ // update_conversation_mood_level(conversation_id, prompt, uid, receiver_contact_doc.contact_uid, conversation_doc.reference_type === 'contacts');
4272
4272
 
4273
4273
  return { code: 15, data: item };
4274
4274
  };
@@ -4982,7 +4982,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4982
4982
  content: [{ type: 'input_text', text: `the user attached file name: ${file.filename} with content: ${transcript.data || transcript}` }],
4983
4983
  });
4984
4984
 
4985
- prompt += generate_XU_markdown('attachment', file); //`[![Alt Text](${file.file_url})]`;
4985
+ prompt += await generate_XU_markdown('attachment', file); //`[![Alt Text](${file.file_url})]`;
4986
4986
  }
4987
4987
 
4988
4988
  const items = await client.conversations.items.create(conversation_id, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3802",
3
+ "version": "1.1.3804",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",