@xuda.io/ai_module 1.1.5060 → 1.1.5061

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
@@ -1340,15 +1340,15 @@ export const get_ai_chats = async function (req, job_id, headers) {
1340
1340
  let conversations = {};
1341
1341
  let docs = [];
1342
1342
  for (let val of ret.rows || []) {
1343
- // let _conversation = conversations[val.value.conversation_id];
1344
-
1345
1343
  if (!conversations[val.value.conversation_id]) {
1346
1344
  conversations[val.value.conversation_id] = {};
1347
1345
  }
1348
-
1349
1346
  conversations[val.value.conversation_id][val.value.type] = val.doc;
1350
1347
  }
1351
1348
 
1349
+ for (let val of ret.rows || []) {
1350
+ }
1351
+
1352
1352
  return ret;
1353
1353
  };
1354
1354
 
@@ -1382,9 +1382,9 @@ export const get_ai_chats = async function (req, job_id, headers) {
1382
1382
  let ai_chats = { docs: [], total_docs: 0 };
1383
1383
 
1384
1384
  if (filter_type !== 'pending') {
1385
+ ai_chats = await get_data_view();
1385
1386
  if (reference_id && reference_type === 'contacts') {
1386
1387
  ai_chats = await get_data_view();
1387
- debugger;
1388
1388
  } else {
1389
1389
  ai_chats = await get_data_find();
1390
1390
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5060",
3
+ "version": "1.1.5061",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",