@xuda.io/ai_module 1.1.4698 → 1.1.4700
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 +39 -17
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6090,23 +6090,45 @@ export const get_profile_avatar = async function (profile_picture, uid, prompt,
|
|
|
6090
6090
|
// background: 'transparent',
|
|
6091
6091
|
// });
|
|
6092
6092
|
|
|
6093
|
-
const ai_avatar_response = await client.images.edit({
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
});
|
|
6108
|
-
account_module.record_ai_usage(uid, ai_avatar_response.usage.input_tokens, ai_avatar_response.usage.output_tokens, 'profile avatar', prompt, model, { profile_picture }, account_profile_info);
|
|
6109
|
-
imageBase64 = ai_avatar_response.data[0].b64_json;
|
|
6093
|
+
// const ai_avatar_response = await client.images.edit({
|
|
6094
|
+
// model,
|
|
6095
|
+
// image: image_blob_ret.image_blob, //logo
|
|
6096
|
+
// prompt: `
|
|
6097
|
+
// Create a transparent PNG profile image for a business account featuring building branded as ${name}.
|
|
6098
|
+
// Display the attached logo clearly as prominent exterior signage.
|
|
6099
|
+
|
|
6100
|
+
// show ${obj?.[business_size] || 'office building'}
|
|
6101
|
+
// The building’s architecture and overall atmosphere should reflect the nature of the business,
|
|
6102
|
+
// aligning with ${mainCategory} and ${subCategory}.
|
|
6103
|
+
|
|
6104
|
+
// Use the provided bio (${bio}) to understand the company’s focus and personality, and adapt the architectural style to match the ${country} country’s local design language. Select an appropriate building type for the specific business category, and present a contemporary, creative office environment with a strong, recognizable brand identity.
|
|
6105
|
+
// The background should be fully removed, remove trees,clouds,sky or any landscape objects`,
|
|
6106
|
+
// background: 'transparent',
|
|
6107
|
+
// });
|
|
6108
|
+
// account_module.record_ai_usage(uid, ai_avatar_response.usage.input_tokens, ai_avatar_response.usage.output_tokens, 'profile avatar', prompt, model, { profile_picture }, account_profile_info);
|
|
6109
|
+
// imageBase64 = ai_avatar_response.data[0].b64_json;
|
|
6110
|
+
|
|
6111
|
+
imageBase64 = await create_image(
|
|
6112
|
+
uid,
|
|
6113
|
+
`
|
|
6114
|
+
|
|
6115
|
+
Create a transparent PNG profile image depicting ${obj?.[business_size]}.
|
|
6116
|
+
The building’s architecture, materials, and overall atmosphere must reflect the business nature,
|
|
6117
|
+
aligned with ${mainCategory} and ${subCategory}.
|
|
6118
|
+
Completely remove the background.
|
|
6119
|
+
Do not include trees, clouds, sky, landscape, or any environmental elements.
|
|
6120
|
+
Only the building should be visible on a fully transparent background.
|
|
6121
|
+
|
|
6122
|
+
`,
|
|
6123
|
+
undefined,
|
|
6124
|
+
undefined,
|
|
6125
|
+
1,
|
|
6126
|
+
undefined,
|
|
6127
|
+
undefined,
|
|
6128
|
+
{},
|
|
6129
|
+
account_profile_info,
|
|
6130
|
+
);
|
|
6131
|
+
|
|
6110
6132
|
avatar_source = 'fictional';
|
|
6111
6133
|
} else {
|
|
6112
6134
|
/// PERSONAL
|