@xuda.io/ai_module 1.1.3628 → 1.1.3630
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.
- package/index.mjs +43 -30
- 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
|
-
|
|
3032
|
+
// case 'ai_agent': {
|
|
3033
|
+
// db_doc = await get_db_doc();
|
|
3034
3034
|
|
|
3035
|
-
|
|
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
|
-
|
|
3069
|
-
|
|
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;
|
|
3075
|
+
|
|
3076
|
+
// break;
|
|
3077
|
+
// }
|
|
3070
3078
|
|
|
3079
|
+
case 'ai_agent': {
|
|
3080
|
+
db_doc = await get_db_doc();
|
|
3081
|
+
|
|
3082
|
+
images_arr = await create_ai_agent_image({ app_id, uid, ai_agent_id }, job_id, headers);
|
|
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
|
|
|
@@ -5758,7 +5771,7 @@ export const create_ai_agent_image = async function (req, job_id, headers) {
|
|
|
5758
5771
|
return { is_transparent, image_blob: new Blob([buffer], { type: 'image/png' }) };
|
|
5759
5772
|
}
|
|
5760
5773
|
|
|
5761
|
-
const { app_id, uid,
|
|
5774
|
+
const { app_id, uid, ai_agent_id } = req;
|
|
5762
5775
|
|
|
5763
5776
|
const ai_agent_doc = await db_module.get_app_couch_doc_native(app_id, ai_agent_id);
|
|
5764
5777
|
const account_doc = await db_module.get_couch_doc_native('xuda_accounts', uid);
|