@xuda.io/ai_module 1.1.3643 → 1.1.3645

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 +17 -7
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3080,7 +3080,7 @@ export const update_thumbnail = async function (type, doc, app_id, uid, job_id,
3080
3080
  const images_arr = await create_ai_agent_image({ app_id, uid, ai_agent_id: doc._id, tags }, job_id, headers);
3081
3081
  db_doc = await get_db_doc();
3082
3082
  db_doc.studio_meta.thumbnail_request_ts = Date.now();
3083
- db_doc.studio_meta.agent_image = images_arr.data;
3083
+ db_doc.studio_meta.agent_image = [images_arr.data];
3084
3084
 
3085
3085
  break;
3086
3086
  }
@@ -5470,14 +5470,24 @@ export const convert_profile_image_to_avatar = async function (req, job_id, head
5470
5470
  // Context: ${JSON.stringify({ bio, business_name, country, mainCategory, subCategory })}`,
5471
5471
  // background: 'transparent',
5472
5472
  // });
5473
+ ///////////////////
5474
+ // const ai_avatar_response = await client.images.edit({
5475
+ // model: 'chatgpt-image-latest',
5476
+ // image: images[0].image_blob, //base photo
5477
+ // prompt: `Create a transparent PNG profile image for a business account featuring building branded as ${business_name}.
5478
+ // Display the attached logo clearly as prominent exterior signage.
5479
+ // The building’s architecture and overall atmosphere should reflect the nature of the business, aligning with ${mainCategory} and ${subCategory}.
5480
+ // 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,
5481
+ // creative office environment with a strong, recognizable brand identity. The background should be fully removed, remove trees,clouds,sky or any landscape objects`,
5482
+ // background: 'transparent',
5483
+ // });
5484
+ /////////////////
5473
5485
  const ai_avatar_response = await client.images.edit({
5474
5486
  model: 'chatgpt-image-latest',
5475
5487
  image: images[0].image_blob, //base photo
5476
- prompt: `Create a transparent PNG profile image for a business account featuring building branded as ${business_name}.
5477
- Display the attached logo clearly as prominent exterior signage.
5478
- The building’s architecture and overall atmosphere should reflect the nature of the business, aligning with ${mainCategory} and ${subCategory}.
5479
- 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,
5480
- creative office environment with a strong, recognizable brand identity. The background should be fully removed, remove trees,clouds,sky or any landscape objects`,
5488
+ prompt: `Create a transparent PNG profile image for a business account featuring building branded as ${business_name}.
5489
+ Display the attached logo clearly as prominent exterior signage. Show a group of employees in front of the building/premises. The building’s architecture and overall atmosphere should reflect the nature of the business, aligning with ${mainCategory} and ${subCategory}. 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.
5490
+ The background should be fully removed, remove trees,clouds,sky or any landscape objects`,
5481
5491
  background: 'transparent',
5482
5492
  });
5483
5493
  imageBase64 = ai_avatar_response.data[0].b64_json;
@@ -5809,7 +5819,7 @@ const create_ai_agent_image = async function (req, job_id, headers) {
5809
5819
  `;
5810
5820
 
5811
5821
  const images_arr = await create_and_upload_image_to_drive('studio', 'Progs Thumbnails', ai_agent_id, prompt, 1, uid, app_id, job_id, headers, false, tags);
5812
- return images_arr;
5822
+ return images_arr[0];
5813
5823
  }
5814
5824
 
5815
5825
  let url = account_doc.account_info.profile_avatar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3643",
3
+ "version": "1.1.3645",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",