@xuda.io/ai_module 1.1.5076 → 1.1.5078
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 +5 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1335,7 +1335,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1335
1335
|
include_docs: true,
|
|
1336
1336
|
descending: false,
|
|
1337
1337
|
});
|
|
1338
|
-
|
|
1338
|
+
|
|
1339
1339
|
let conversations = {};
|
|
1340
1340
|
let docs = [];
|
|
1341
1341
|
for (let val of ret.rows || []) {
|
|
@@ -1346,7 +1346,9 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
|
|
1348
1348
|
for (let val of ret.rows || []) {
|
|
1349
|
-
if (val.value.type === 'conversation')
|
|
1349
|
+
if (val.value.type === 'conversation') {
|
|
1350
|
+
docs.push(conversations[val.value.conversation_id]);
|
|
1351
|
+
}
|
|
1350
1352
|
}
|
|
1351
1353
|
|
|
1352
1354
|
return { docs };
|
|
@@ -1407,7 +1409,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1407
1409
|
|
|
1408
1410
|
const contact_chat_conversation_count_ret = await chat_conversation_count();
|
|
1409
1411
|
const contact_chat_conversation_read_ret = await chat_conversation_read();
|
|
1410
|
-
|
|
1412
|
+
debugger;
|
|
1411
1413
|
for (let doc of ai_chats.docs || []) {
|
|
1412
1414
|
let reference_doc;
|
|
1413
1415
|
|