@xuda.io/ai_module 1.1.3627 → 1.1.3629

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 +49 -36
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3029,45 +3029,57 @@ export const update_thumbnail = async function (type, doc, app_id, uid, job_id,
3029
3029
  let db_doc;
3030
3030
 
3031
3031
  switch (type) {
3032
- case 'ai_agent': {
3033
- db_doc = await get_db_doc();
3032
+ // case 'ai_agent': {
3033
+ // db_doc = await get_db_doc();
3034
3034
 
3035
- prompt = `
3036
- Create a futuristic, faceless humanoid profile portrait with a transparent background.
3035
+ // prompt = `
3036
+ // Create a futuristic, faceless humanoid profile portrait with a transparent background.
3037
3037
 
3038
- Center the character facing forward, with subtle top spacing, showing only the head and shoulders.
3039
- The humanoid must remain completely faceless.
3038
+ // Center the character facing forward, with subtle top spacing, showing only the head and shoulders.
3039
+ // The humanoid must remain completely faceless.
3040
3040
 
3041
- Style the humanoid with functional, minimal attire integrated into its form
3042
- (such as collars, layered panels, shoulder structures, or fabric-like surfaces),
3043
- avoiding human fashion tropes.
3041
+ // Style the humanoid with functional, minimal attire integrated into its form
3042
+ // (such as collars, layered panels, shoulder structures, or fabric-like surfaces),
3043
+ // avoiding human fashion tropes.
3044
3044
 
3045
- Select exactly ONE accessory category per generation (do not combine):
3046
- - Head-mounted element (visor, band, halo ring)
3047
- - Chest or collar element (badge, glyph, embedded tag)
3048
- - Floating or projected element (holographic symbol, light node)
3049
- - Structural or partially visible object that reinforces the role
3045
+ // Select exactly ONE accessory category per generation (do not combine):
3046
+ // - Head-mounted element (visor, band, halo ring)
3047
+ // - Chest or collar element (badge, glyph, embedded tag)
3048
+ // - Floating or projected element (holographic symbol, light node)
3049
+ // - Structural or partially visible object that reinforces the role
3050
3050
 
3051
- Accessories must directly reinforce the identity of
3052
- "${db_doc.properties.menuName} - ${db_doc.studio_meta.agent_assistant_name}".
3051
+ // Accessories must directly reinforce the identity of
3052
+ // "${db_doc.properties.menuName} - ${db_doc.studio_meta.agent_assistant_name}".
3053
3053
 
3054
- Use a consistent, fixed color palette across all generations.
3055
- Do not introduce new colors.
3056
- All variation must come from geometry, materials, texture, and lighting.
3054
+ // Use a consistent, fixed color palette across all generations.
3055
+ // Do not introduce new colors.
3056
+ // All variation must come from geometry, materials, texture, and lighting.
3057
3057
 
3058
- Vary at least two of the following:
3059
- - Head geometry
3060
- - Surface structure
3061
- - Material finish
3062
- - Light interaction
3058
+ // Vary at least two of the following:
3059
+ // - Head geometry
3060
+ // - Surface structure
3061
+ // - Material finish
3062
+ // - Light interaction
3063
3063
 
3064
- Use advanced or reflective materials to convey intelligence and sophistication.
3065
- The overall composition should symbolize the fusion of human creativity and machine intelligence.
3064
+ // Use advanced or reflective materials to convey intelligence and sophistication.
3065
+ // The overall composition should symbolize the fusion of human creativity and machine intelligence.
3066
3066
 
3067
- `;
3068
- //and a hat
3069
- const images_arr = await create_and_upload_image_to_drive('studio', 'Progs Thumbnails', doc._id, prompt, 1, uid, app_id, job_id, headers, false, tags);
3067
+ // `;
3068
+ // //and a hat
3069
+ // const images_arr = await create_and_upload_image_to_drive('studio', 'Progs Thumbnails', doc._id, prompt, 1, uid, app_id, job_id, headers, false, tags);
3070
+
3071
+ // db_doc = await get_db_doc();
3072
+ // db_doc.studio_meta.thumbnail_request_ts = Date.now();
3073
+ // db_doc.studio_meta.agent_image = images_arr;
3074
+ // // db_doc.studio_meta.agent_assistant_name = agent_assistant_name.data;
3070
3075
 
3076
+ // break;
3077
+ // }
3078
+
3079
+ case 'ai_agent': {
3080
+ db_doc = await get_db_doc();
3081
+
3082
+ images_arr = create_ai_agent_image;
3071
3083
  db_doc = await get_db_doc();
3072
3084
  db_doc.studio_meta.thumbnail_request_ts = Date.now();
3073
3085
  db_doc.studio_meta.agent_image = images_arr;
@@ -3075,6 +3087,7 @@ export const update_thumbnail = async function (type, doc, app_id, uid, job_id,
3075
3087
 
3076
3088
  break;
3077
3089
  }
3090
+
3078
3091
  case 'conversation': {
3079
3092
  prompt = `create image: ${doc.title}`;
3080
3093
 
@@ -5860,15 +5873,15 @@ export const create_ai_agent_image = async function (req, job_id, headers) {
5860
5873
  const drive_ret = await drive_module.upload_drive_file_studio({ uid, app_id, path: '/Progs Thumbnails' }, job_id, headers, file_obj);
5861
5874
 
5862
5875
  if (drive_ret.code > 0) {
5863
- let db_doc = await db_module.get_app_couch_doc_native(app_id, ai_agent_id);
5864
- db_doc.studio_meta.thumbnail_request_ts = Date.now();
5865
- db_doc.studio_meta.agent_image = drive_ret.data;
5876
+ // let db_doc = await db_module.get_app_couch_doc_native(app_id, ai_agent_id);
5877
+ // db_doc.studio_meta.thumbnail_request_ts = Date.now();
5878
+ // db_doc.studio_meta.agent_image = drive_ret.data;
5866
5879
 
5867
- const save_ret = await db_module.save_app_couch_doc_native(app_id, db_doc);
5868
- console.log(save_ret);
5880
+ // const save_ret = await db_module.save_app_couch_doc_native(app_id, db_doc);
5881
+ // console.log(save_ret);
5869
5882
 
5870
- return save_ret;
5871
- // account_module.update_contacts_with_account_changes(db_doc._id, ['profile_avatar']);
5883
+ // return save_ret;
5884
+ return drive_ret;
5872
5885
  } else {
5873
5886
  throw new Error(drive_ret.data);
5874
5887
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3627",
3
+ "version": "1.1.3629",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",