@xuda.io/ai_module 1.1.4363 → 1.1.4364

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 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -5679,7 +5679,7 @@ export const create_profile_avatar = async function (req, job_id, headers) {
5679
5679
  const uniqueId = Date.now() + '_' + Math.random().toString(36).substring(7);
5680
5680
  const tempOutputPath = path.join(tempDir, `output_${uniqueId}.png`);
5681
5681
 
5682
- const { url, uid, account_obj, prompt, is_profile_avatar, account_profile_info, docType = 'account', _id, metadata = {}, profile_picture, business_size = 'unknown',name } = req;
5682
+ const { url, uid, account_obj, prompt, is_profile_avatar, account_profile_info, docType = 'account', _id, metadata = {}, profile_picture, business_size = 'unknown', name } = req;
5683
5683
 
5684
5684
  // async function normalizeBase64To1024(base64Image) {
5685
5685
  // const inputBuffer = Buffer.from(base64Image, 'base64');
@@ -6005,9 +6005,9 @@ export const create_profile_avatar = async function (req, job_id, headers) {
6005
6005
  };
6006
6006
 
6007
6007
  let drive_ret = await drive_module.upload_drive_file_user({ uid, path: '/Profile Images' }, job_id, headers, file_obj);
6008
- drive_ret.avatar_source=avatar_source
6008
+ drive_ret.avatar_source = avatar_source;
6009
6009
 
6010
- return drive_ret;
6010
+ return drive_ret;
6011
6011
  // if (drive_ret.code > 0) {
6012
6012
  // // if (!is_profile_avatar) {
6013
6013
  // // let db_doc = await db_module.get_couch_doc_native('xuda_accounts', account_obj._id);
@@ -6036,7 +6036,7 @@ return drive_ret;
6036
6036
  if (error.response?.data) {
6037
6037
  console.error('OpenAI API response:', error.response.data);
6038
6038
  }
6039
- return {code:-56:data:error.message}
6039
+ return { code: -56, data: error.message };
6040
6040
  }
6041
6041
  };
6042
6042
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4363",
3
+ "version": "1.1.4364",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",