@xuda.io/ai_module 1.1.5330 → 1.1.5332

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 +7 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3489,11 +3489,13 @@ export const create_conversation = async function (req, job_id, headers) {
3489
3489
  }
3490
3490
  }
3491
3491
 
3492
- let { data: ai_credits } = await account_ms.get_account_ai_usage({ uid: account_profile_info.uid });
3492
+ // let { data: ai_credits } = await account_ms.get_account_ai_usage({ uid: account_profile_info.uid });
3493
3493
 
3494
- if (ai_credits.credits.total - ai_credits.usage.total < -0.5) {
3495
- throw new Error('ai credits reach to hard limit');
3496
- }
3494
+ // if (ai_credits.credits.total - ai_credits.usage.total < -0.5) {
3495
+ // throw new Error('ai credits reach to hard limit');
3496
+ // }
3497
+
3498
+ await validate_credits_limit(uid, profile_id);
3497
3499
 
3498
3500
  let conversation_obj;
3499
3501
  try {
@@ -5439,6 +5441,7 @@ export const create_avatar = async function (req, job_id, headers) {
5439
5441
  const account_info = account_obj.account_info;
5440
5442
 
5441
5443
  // check credits
5444
+ await validate_credits_limit(uid);
5442
5445
 
5443
5446
  if (!metadata) {
5444
5447
  metadata = account_info;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5330",
3
+ "version": "1.1.5332",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",