@xuda.io/ai_module 1.1.4364 → 1.1.4365
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 +3 -3
- 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,
|
|
5682
|
+
const { url, uid, account_obj, prompt, account_profile_info, account_type, 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');
|
|
@@ -5770,7 +5770,7 @@ export const create_profile_avatar = async function (req, job_id, headers) {
|
|
|
5770
5770
|
response_format: z.object({
|
|
5771
5771
|
is_real_person_in_picture: z.boolean().describe('if a postrate of real person in the picture return true otherwise return false'),
|
|
5772
5772
|
}),
|
|
5773
|
-
metadata: { account_id:
|
|
5773
|
+
metadata: { account_id: _id, func: 'detect_real_person_in_image' },
|
|
5774
5774
|
account_profile_info,
|
|
5775
5775
|
});
|
|
5776
5776
|
|
|
@@ -5841,7 +5841,7 @@ export const create_profile_avatar = async function (req, job_id, headers) {
|
|
|
5841
5841
|
} else {
|
|
5842
5842
|
//////////////////
|
|
5843
5843
|
imageBase64 = Buffer.from(await image_blob_ret.image_blob.arrayBuffer()).toString('base64');
|
|
5844
|
-
if (
|
|
5844
|
+
if (account_type === 'business') {
|
|
5845
5845
|
// create avatar from logo - BUSINESS
|
|
5846
5846
|
const { bio, country, mainCategory, subCategory } = metadata;
|
|
5847
5847
|
// const ai_avatar_response = await client.images.edit({
|