@xuda.io/ai_module 1.1.3907 → 1.1.3909
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 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1888,6 +1888,11 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1888
1888
|
let ai_chats = { docs: [] };
|
|
1889
1889
|
if (filter_type !== 'pending') {
|
|
1890
1890
|
ai_chats = await db_module.find_app_couch_query(app_id, opt);
|
|
1891
|
+
if (!limit || conversation_id) {
|
|
1892
|
+
ai_chats.total_docs = ai_chats.docs.length;
|
|
1893
|
+
} else {
|
|
1894
|
+
const counter = await db_module.find_app_couch_query(app_id, opt);
|
|
1895
|
+
}
|
|
1891
1896
|
}
|
|
1892
1897
|
|
|
1893
1898
|
let docs = [];
|