@xuda.io/ai_module 1.1.4447 → 1.1.4449
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 +2 -6
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6467,7 +6467,7 @@ export const get_profile_picture = async function (uid, account_type = 'business
|
|
|
6467
6467
|
}
|
|
6468
6468
|
|
|
6469
6469
|
case 'business': {
|
|
6470
|
-
prompt = `
|
|
6470
|
+
prompt = `Search for a large, high-quality "${name}" logo or icon in PNG or JPG format. Output **exclusively** a single valid image URL, like this: "https://example.com/large-logo.png". Do not include any other text, descriptions, or additional information.`;
|
|
6471
6471
|
factual_prompt = `create logo for the company named: "${name}" the logo should only be initials of the name or geometric shape`;
|
|
6472
6472
|
originalname = normalizeFilename(name) + '_xu_logo.png';
|
|
6473
6473
|
resize = {
|
|
@@ -6594,11 +6594,7 @@ async function normalizeBase64To1024(
|
|
|
6594
6594
|
const inputBuffer = Buffer.from(base64Image, 'base64');
|
|
6595
6595
|
|
|
6596
6596
|
const normalizedBuffer = await sharp(inputBuffer)
|
|
6597
|
-
.resize(1024, 1024,
|
|
6598
|
-
fit: 'inside', // Scale up/down to fit inside 1024×1024 while preserving aspect ratio
|
|
6599
|
-
withoutEnlargement: false, // Allow enlargement if original is smaller
|
|
6600
|
-
background: { r: 0, g: 0, b: 0, alpha: 0 }, // Still transparent padding
|
|
6601
|
-
})
|
|
6597
|
+
.resize(1024, 1024, resize)
|
|
6602
6598
|
.png({
|
|
6603
6599
|
quality: 98,
|
|
6604
6600
|
compressionLevel: 8,
|