@xuda.io/ai_module 1.1.4696 → 1.1.4698

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 +19 -7
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6055,14 +6055,24 @@ export const get_profile_avatar = async function (profile_picture, uid, prompt,
6055
6055
  // 'A large group of thirty diverse professional employees, all appearing to be from ${country} (with ethnic features, skin tones, and facial characteristics typical of ${country}), men and women in business attire, standing together smiling in the foreground in front of the building',
6056
6056
  // },
6057
6057
  // };
6058
+ // const obj = {
6059
+ // unknown: `small single-story office building located in ${country}`,
6060
+ // sole: `town house located in ${country} `,
6061
+ // small: `small-sized building located in ${country} `,
6062
+ // medium: `medium-sized multi-story office building located in ${country} `,
6063
+ // large: `large modern multi-story office building located in ${country}`,
6064
+ // enterprise: `large modern hight rise multi-story office building located in ${country}`,
6065
+ // };
6066
+
6058
6067
  const obj = {
6059
- unknown: `small single-story office building located in ${country}`,
6060
- sole: `town house located in ${country} `,
6061
- small: `small-sized building located in ${country} `,
6062
- medium: `medium-sized multi-story office building located in ${country} `,
6063
- large: `large modern multi-story office building located in ${country}`,
6064
- enterprise: `large modern hight rise multi-story office building located in ${country}`,
6068
+ unknown: `small single-story office building `,
6069
+ sole: `town house `,
6070
+ small: `small-sized building `,
6071
+ medium: `medium-sized multi-story office building `,
6072
+ large: `large modern multi-story office building`,
6073
+ enterprise: `large modern hight rise multi-story office building`,
6065
6074
  };
6075
+
6066
6076
  const model = 'chatgpt-image-latest';
6067
6077
  // const ai_avatar_response = await client.images.edit({
6068
6078
  // model,
@@ -6810,6 +6820,7 @@ export const get_profile_picture = async function (uid, account_type = 'business
6810
6820
  const tempOutputPath = path.join(tempDir, `output_${uniqueId}.png`);
6811
6821
 
6812
6822
  let prompt,
6823
+ url,
6813
6824
  factual_prompt,
6814
6825
  originalname,
6815
6826
  factual_image_mode,
@@ -6868,7 +6879,7 @@ export const get_profile_picture = async function (uid, account_type = 'business
6868
6879
  try {
6869
6880
  // first attempt
6870
6881
  if (account_type === 'business') {
6871
- let url = await get_url();
6882
+ url = await get_url();
6872
6883
 
6873
6884
  if (url.substr(0, 8) !== 'https://') {
6874
6885
  profile_picture_source = 'factual';
@@ -6896,6 +6907,7 @@ export const get_profile_picture = async function (uid, account_type = 'business
6896
6907
  factual_image_mode = true;
6897
6908
  profile_picture_source = 'factual';
6898
6909
  }
6910
+
6899
6911
  if (factual_image_mode) {
6900
6912
  imageBase64 = await create_image(uid, factual_prompt, undefined, undefined, 1, undefined, undefined, {}, account_profile_info);
6901
6913
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4696",
3
+ "version": "1.1.4698",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",