@xuda.io/ai_module 1.1.4459 → 1.1.4461

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 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4066,7 +4066,7 @@ export const create_conversation = async function (req, job_id, headers) {
4066
4066
  let { data: ai_credits } = await account_module.get_account_ai_usage(account_profile_info.uid);
4067
4067
 
4068
4068
  try {
4069
- if (ai_credits.credits.total - ai_usage.usage.total < -0.5) {
4069
+ if (ai_credits.credits.total - ai_credits.usage.total < -0.5) {
4070
4070
  throw new Error('ai credits reach to hard limit');
4071
4071
  }
4072
4072
 
@@ -6385,7 +6385,9 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
6385
6385
  },
6386
6386
  ],
6387
6387
  });
6388
- system_message_items.push({ id: items.last_id, ts: Date.now(), conversation_type: 'attachment', file });
6388
+
6389
+ const obj = { id: items.last_id, ts: Date.now(), conversation_type: 'attachment', file };
6390
+ system_message_items.push(obj);
6389
6391
 
6390
6392
  await db_module.save_app_couch_doc_native(uid, { _id: obj.id, stat: 3, docType: 'chat_conversation_item', ts: obj.ts, uid, conversation_type: obj.conversation_type, date_created_ts: obj.ts, conversation_id, file, transcript });
6391
6393
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4459",
3
+ "version": "1.1.4461",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",