@xuda.io/ai_module 1.1.4381 → 1.1.4382
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 +1 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6870,6 +6870,7 @@ export const get_profile_picture = async function (uid, account_type = 'business
|
|
|
6870
6870
|
});
|
|
6871
6871
|
|
|
6872
6872
|
imageBase64 = await normalizeBase64To1024(image_response.data[0].b64_json);
|
|
6873
|
+
record_chat_usage(uid, image_response.usage.input_tokens, image_response.usage.output_tokens, 'profile image', prompt, model, { url }, account_profile_info);
|
|
6873
6874
|
}
|
|
6874
6875
|
const outputBuffer = Buffer.from(imageBase64, 'base64');
|
|
6875
6876
|
const outputPath = tempOutputPath;
|
|
@@ -6887,7 +6888,6 @@ export const get_profile_picture = async function (uid, account_type = 'business
|
|
|
6887
6888
|
|
|
6888
6889
|
let drive_ret = await drive_module.upload_drive_file_user({ uid, path: '/Profile Images' }, job_id, headers, file_obj);
|
|
6889
6890
|
drive_ret.profile_picture_source = profile_picture_source;
|
|
6890
|
-
record_chat_usage(uid, image_response.usage.input_tokens, image_response.usage.output_tokens, 'profile image', prompt, model, { url }, account_profile_info);
|
|
6891
6891
|
|
|
6892
6892
|
return drive_ret;
|
|
6893
6893
|
} catch (err) {
|