@xuda.io/ai_module 1.1.4780 → 1.1.4781

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 +13 -13
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -7098,24 +7098,24 @@ export const get_profile_picture = async function (uid, account_type = 'business
7098
7098
  imageBase64 = await normalizeBase64To1024(image_response.data[0].b64_json, resize);
7099
7099
  account_module.record_ai_usage(uid, image_response.usage.input_tokens, image_response.usage.output_tokens, 'profile image', prompt, model, { url }, account_profile_info);
7100
7100
  }
7101
- }
7102
- const outputBuffer = Buffer.from(imageBase64, 'base64');
7103
- const outputPath = tempOutputPath;
7104
- await fs.promises.writeFile(outputPath, outputBuffer);
7105
7101
 
7106
- console.log('Success! Saved →', outputPath);
7102
+ const outputBuffer = Buffer.from(imageBase64, 'base64');
7103
+ const outputPath = tempOutputPath;
7104
+ await fs.promises.writeFile(outputPath, outputBuffer);
7107
7105
 
7108
- console.log(file);
7106
+ console.log('Success! Saved →', outputPath);
7109
7107
 
7110
- const file_obj = {
7111
- originalname,
7112
- path: outputPath,
7113
- mimetype: `image/png`,
7114
- };
7108
+ console.log(file);
7115
7109
 
7116
- let drive_ret = await drive_module.upload_drive_file_user({ uid, path: '/Profile Images' }, job_id, headers, file_obj);
7117
- drive_ret.profile_picture_source = profile_picture_source;
7110
+ const file_obj = {
7111
+ originalname,
7112
+ path: outputPath,
7113
+ mimetype: `image/png`,
7114
+ };
7118
7115
 
7116
+ let drive_ret = await drive_module.upload_drive_file_user({ uid, path: '/Profile Images' }, job_id, headers, file_obj);
7117
+ drive_ret.profile_picture_source = profile_picture_source;
7118
+ }
7119
7119
  return drive_ret;
7120
7120
  } catch (err) {
7121
7121
  console.error(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4780",
3
+ "version": "1.1.4781",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",