@xuda.io/ai_module 1.1.4357 → 1.1.4358
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 +7 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5290,8 +5290,8 @@ setTimeout(async () => {
|
|
|
5290
5290
|
// },
|
|
5291
5291
|
// });
|
|
5292
5292
|
|
|
5293
|
-
// ret = await
|
|
5294
|
-
// ret = await
|
|
5293
|
+
// ret = await get_profile_picture(uid, 'business', 'ioshka media', {}, account_profile_info);
|
|
5294
|
+
// ret = await get_profile_picture(
|
|
5295
5295
|
// uid,
|
|
5296
5296
|
// 'personal',
|
|
5297
5297
|
// 'Glenn Willett',
|
|
@@ -5679,6 +5679,8 @@ 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 = {} } = req;
|
|
5683
|
+
|
|
5682
5684
|
// async function normalizeBase64To1024(base64Image) {
|
|
5683
5685
|
// const inputBuffer = Buffer.from(base64Image, 'base64');
|
|
5684
5686
|
|
|
@@ -5777,7 +5779,7 @@ export const create_profile_avatar = async function (req, job_id, headers) {
|
|
|
5777
5779
|
};
|
|
5778
5780
|
|
|
5779
5781
|
// const drive_module = await import(`${module_path}/drive_module/index.mjs`);
|
|
5780
|
-
|
|
5782
|
+
|
|
5781
5783
|
if (!is_profile_avatar) {
|
|
5782
5784
|
await update_profile_avatar_status(account_obj._id, 2);
|
|
5783
5785
|
}
|
|
@@ -6743,7 +6745,7 @@ export const is_business_contact = async function (uid, email, name, subject, bo
|
|
|
6743
6745
|
} catch (error) {}
|
|
6744
6746
|
};
|
|
6745
6747
|
|
|
6746
|
-
const
|
|
6748
|
+
export const get_profile_picture = async function (uid, account_type = 'business', name, facts = {}, account_profile_info, job_id, headers) {
|
|
6747
6749
|
const tempDir = os.tmpdir();
|
|
6748
6750
|
const uniqueId = Date.now() + '_' + Math.random().toString(36).substring(7);
|
|
6749
6751
|
const tempOutputPath = path.join(tempDir, `output_${uniqueId}.png`);
|
|
@@ -6786,7 +6788,7 @@ const get_profile_image = async function (uid, account_type = 'business', name,
|
|
|
6786
6788
|
uid,
|
|
6787
6789
|
prompt,
|
|
6788
6790
|
model: 'gpt-5-nano',
|
|
6789
|
-
metadata: { func: '
|
|
6791
|
+
metadata: { func: 'get_profile_picture' },
|
|
6790
6792
|
account_profile_info,
|
|
6791
6793
|
tools: [{ type: 'web_search_preview' }],
|
|
6792
6794
|
});
|