@xuda.io/ai_module 1.1.4697 → 1.1.4699
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 +52 -16
- 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
|
|
6060
|
-
sole: `town house
|
|
6061
|
-
small: `small-sized building
|
|
6062
|
-
medium: `medium-sized multi-story office building
|
|
6063
|
-
large: `large modern multi-story office building
|
|
6064
|
-
enterprise: `large modern hight rise multi-story office building
|
|
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,
|
|
@@ -6080,11 +6090,29 @@ export const get_profile_avatar = async function (profile_picture, uid, prompt,
|
|
|
6080
6090
|
// background: 'transparent',
|
|
6081
6091
|
// });
|
|
6082
6092
|
|
|
6083
|
-
const ai_avatar_response = await client.images.edit({
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6093
|
+
// const ai_avatar_response = await client.images.edit({
|
|
6094
|
+
// model,
|
|
6095
|
+
// image: image_blob_ret.image_blob, //logo
|
|
6096
|
+
// prompt: `
|
|
6097
|
+
// Create a transparent PNG profile image for a business account featuring building branded as ${name}.
|
|
6098
|
+
// Display the attached logo clearly as prominent exterior signage.
|
|
6099
|
+
|
|
6100
|
+
// show ${obj?.[business_size] || 'office building'}
|
|
6101
|
+
// The building’s architecture and overall atmosphere should reflect the nature of the business,
|
|
6102
|
+
// aligning with ${mainCategory} and ${subCategory}.
|
|
6103
|
+
|
|
6104
|
+
// 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.
|
|
6105
|
+
// The background should be fully removed, remove trees,clouds,sky or any landscape objects`,
|
|
6106
|
+
// background: 'transparent',
|
|
6107
|
+
// });
|
|
6108
|
+
// 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);
|
|
6109
|
+
// imageBase64 = ai_avatar_response.data[0].b64_json;
|
|
6110
|
+
|
|
6111
|
+
imageBase64 = await create_image(
|
|
6112
|
+
uid,
|
|
6113
|
+
`
|
|
6114
|
+
|
|
6115
|
+
Create a transparent PNG profile image for a business account featuring building branded as ${name}.
|
|
6088
6116
|
Display the attached logo clearly as prominent exterior signage.
|
|
6089
6117
|
|
|
6090
6118
|
show ${obj?.[business_size] || 'office building'}
|
|
@@ -6092,11 +6120,19 @@ export const get_profile_avatar = async function (profile_picture, uid, prompt,
|
|
|
6092
6120
|
aligning with ${mainCategory} and ${subCategory}.
|
|
6093
6121
|
|
|
6094
6122
|
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.
|
|
6095
|
-
The background should be fully removed, remove trees,clouds,sky or any landscape objects
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6123
|
+
The background should be fully removed, remove trees,clouds,sky or any landscape objects
|
|
6124
|
+
|
|
6125
|
+
|
|
6126
|
+
`,
|
|
6127
|
+
undefined,
|
|
6128
|
+
undefined,
|
|
6129
|
+
1,
|
|
6130
|
+
undefined,
|
|
6131
|
+
undefined,
|
|
6132
|
+
{},
|
|
6133
|
+
account_profile_info,
|
|
6134
|
+
);
|
|
6135
|
+
|
|
6100
6136
|
avatar_source = 'fictional';
|
|
6101
6137
|
} else {
|
|
6102
6138
|
/// PERSONAL
|