@xuda.io/account_module 1.2.996 → 1.2.998
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 +12 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2421,6 +2421,7 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
|
|
|
2421
2421
|
});
|
|
2422
2422
|
console.log('ai_usage', ai_usage.rows);
|
|
2423
2423
|
for (const row of ai_usage.rows) {
|
|
2424
|
+
const input_tokens = row.val[0];
|
|
2424
2425
|
}
|
|
2425
2426
|
|
|
2426
2427
|
let membership_plan = _conf?.[acc_obj?.ai_workspace_plan]?.ai_credits || 0;
|
|
@@ -2434,3 +2435,14 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
|
|
|
2434
2435
|
return { code: -55, data: err.message };
|
|
2435
2436
|
}
|
|
2436
2437
|
};
|
|
2438
|
+
|
|
2439
|
+
setTimeout(async () => {
|
|
2440
|
+
const app_id = 'prj712ffdf5aa8adce6cedef988f9c12392'; //'prj3937cb6f9a31c8c7dea25055bba845b1'; //
|
|
2441
|
+
const uid = 'd39126e0e2c51ffbd1aad10709fc8335';
|
|
2442
|
+
|
|
2443
|
+
let ret;
|
|
2444
|
+
|
|
2445
|
+
ret = await get_account_ai_usage({ uid });
|
|
2446
|
+
|
|
2447
|
+
console.log(ret);
|
|
2448
|
+
}, 1000);
|