@xuda.io/ai_module 1.1.4747 → 1.1.4748

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 +28 -25
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6122,28 +6122,30 @@ export const get_profile_avatar = async function (profile_picture, uid, prompt,
6122
6122
  // });
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
- if (business_has_person) {
6126
- imageBase64 = await create_image(
6127
- uid,
6128
- `
6125
+ if (is_user) {
6126
+ } else {
6127
+ if (business_has_person) {
6128
+ imageBase64 = await create_image(
6129
+ uid,
6130
+ `
6129
6131
  analyze the the person info : name:${name || ''}, person_nationality: ${person_nationality}
6130
6132
  and create realistic fictional profile picture
6131
6133
  transparent background ,
6132
6134
  person in the center of the picture return only a centered head-and-shoulders portrait facing the camera.
6133
6135
  include no labels or text add top margin the person should cover the whole picture
6134
6136
  `,
6135
- model,
6136
- undefined,
6137
- 1,
6138
- undefined,
6139
- undefined,
6140
- {},
6141
- account_profile_info,
6142
- );
6143
- } else {
6144
- imageBase64 = await create_image(
6145
- uid,
6146
- `
6137
+ model,
6138
+ undefined,
6139
+ 1,
6140
+ undefined,
6141
+ undefined,
6142
+ {},
6143
+ account_profile_info,
6144
+ );
6145
+ } else {
6146
+ imageBase64 = await create_image(
6147
+ uid,
6148
+ `
6147
6149
  Create a transparent PNG profile image show realistic ${obj?.[business_size]} without labels or signs.
6148
6150
  The building’s architecture, materials, and overall atmosphere must reflect the business nature,
6149
6151
  aligned with ${mainCategory} and ${subCategory}.
@@ -6151,16 +6153,17 @@ export const get_profile_avatar = async function (profile_picture, uid, prompt,
6151
6153
  Do not include trees, clouds, sky, landscape, or any environmental elements.
6152
6154
  Only the building should be visible on a fully transparent background.
6153
6155
  `,
6154
- model,
6155
- undefined,
6156
- 1,
6157
- undefined,
6158
- undefined,
6159
- {},
6160
- account_profile_info,
6161
- );
6156
+ model,
6157
+ undefined,
6158
+ 1,
6159
+ undefined,
6160
+ undefined,
6161
+ {},
6162
+ account_profile_info,
6163
+ );
6164
+ }
6165
+ avatar_source = 'fictional';
6162
6166
  }
6163
- avatar_source = 'fictional';
6164
6167
  } else {
6165
6168
  /// PERSONAL
6166
6169
  const create_avatar_from_pic = async function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4747",
3
+ "version": "1.1.4748",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",