@xuda.io/ai_module 1.1.4748 → 1.1.4750

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.
Files changed (2) hide show
  1. package/index.mjs +20 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6123,6 +6123,26 @@ export const get_profile_avatar = async function (profile_picture, uid, prompt,
6123
6123
  // 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);
6124
6124
  // imageBase64 = ai_avatar_response.data[0].b64_json;
6125
6125
  if (is_user) {
6126
+ if (business_has_person) {
6127
+ } else {
6128
+ const ai_avatar_response = await client.images.edit({
6129
+ model,
6130
+ image: image_blob_ret.image_blob, //logo
6131
+ prompt: `
6132
+ Create a transparent PNG profile image for a business account featuring building branded as ${name}.
6133
+ Display the attached logo clearly as prominent exterior signage.
6134
+
6135
+ show ${obj?.[business_size] || 'office building'}
6136
+ The building’s architecture and overall atmosphere should reflect the nature of the business,
6137
+ aligning with ${mainCategory} and ${subCategory}.
6138
+
6139
+ 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.
6140
+ The background should be fully removed, remove trees,clouds,sky or any landscape objects`,
6141
+ background: 'transparent',
6142
+ });
6143
+ 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);
6144
+ imageBase64 = ai_avatar_response.data[0].b64_json;
6145
+ }
6126
6146
  } else {
6127
6147
  if (business_has_person) {
6128
6148
  imageBase64 = await create_image(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4748",
3
+ "version": "1.1.4750",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",