@xuda.io/ai_module 1.1.4452 → 1.1.4454

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 +12 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4062,6 +4062,9 @@ export const create_conversation = async function (req, job_id, headers) {
4062
4062
 
4063
4063
  const account_profile_info = await account_module.get_active_account_profile_info(uid);
4064
4064
  const { account_profile_obj } = account_profile_info;
4065
+
4066
+ account_module.get_account_ai_usage(account_profile_info.uid);
4067
+
4065
4068
  try {
4066
4069
  const conversation_obj = await client.conversations.create();
4067
4070
  const t = Date.now();
@@ -5808,6 +5811,7 @@ export const conversation_actions = async function (req, job_id, headers) {
5808
5811
 
5809
5812
  export const modify_profile_avatar = async function (req, job_id, headers) {
5810
5813
  const { methods = [], docType, uid, url, _id, name, account_type } = req;
5814
+ let { metadata } = req;
5811
5815
  const account_profile_info = await account_module.get_active_account_profile_info(uid);
5812
5816
 
5813
5817
  try {
@@ -5846,8 +5850,14 @@ export const modify_profile_avatar = async function (req, job_id, headers) {
5846
5850
  }
5847
5851
  }
5848
5852
 
5849
- let account_obj = await db_module.get_couch_doc_native('xuda_accounts', uid);
5850
- const ret = await get_profile_avatar({ prompt, url: account_obj.account_info?.profile_avatar, uid, account_obj, account_profile_info }, job_id, headers);
5853
+ const account_obj = await db_module.get_couch_doc_native('xuda_accounts', uid);
5854
+ const account_info = account_obj.account_info;
5855
+ if (!metadata) {
5856
+ metadata = account_info;
5857
+ }
5858
+
5859
+ // let account_obj = await db_module.get_couch_doc_native('xuda_accounts', uid);
5860
+ // const ret = await get_profile_avatar({ prompt, url: account_obj.account_info?.profile_avatar, uid, account_obj, account_profile_info }, job_id, headers);
5851
5861
  // return ret;
5852
5862
 
5853
5863
  return await get_profile_avatar(url, uid, prompt, account_profile_info, account_type, docType, _id, metadata, account_info, name, account_info.email, job_id, headers);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4452",
3
+ "version": "1.1.4454",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",