@xuda.io/ai_module 1.1.4735 → 1.1.4737

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 +4 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4629,6 +4629,7 @@ const chat_note = async function (req, job_id, headers) {
4629
4629
  direction: 'out',
4630
4630
  role: 'user',
4631
4631
  read: { [uid]: Date.now() },
4632
+ rtl: _common.detectRTL(body),
4632
4633
  };
4633
4634
 
4634
4635
  const save_ret = await db_module.save_app_couch_doc(sender_app_id, out_conversation_item_obj);
@@ -4749,6 +4750,7 @@ const chat_email = async function (req, job_id, headers) {
4749
4750
  email_id,
4750
4751
  subject,
4751
4752
  last_email_item_id: last_email_item?._id,
4753
+ rtl: _common.detectRTL(body),
4752
4754
  };
4753
4755
 
4754
4756
  const save_ret = await db_module.save_app_couch_doc(sender_app_id, out_conversation_item_obj);
@@ -6038,7 +6040,7 @@ export const get_profile_avatar = async function (profile_picture, uid, prompt,
6038
6040
  imageBase64 = Buffer.from(await image_blob_ret.image_blob.arrayBuffer()).toString('base64');
6039
6041
  if (account_type === 'business') {
6040
6042
  // create avatar from logo - BUSINESS
6041
- const { bio, country, mainCategory, subCategory, is_real_person, name, person_nationality } = metadata;
6043
+ const { bio, country, mainCategory, subCategory, business_has_person, name, person_nationality } = metadata;
6042
6044
 
6043
6045
  // const obj = {
6044
6046
  // free: {
@@ -6127,7 +6129,7 @@ export const get_profile_avatar = async function (profile_picture, uid, prompt,
6127
6129
  // });
6128
6130
  // 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);
6129
6131
  // imageBase64 = ai_avatar_response.data[0].b64_json;
6130
- if (is_real_person) {
6132
+ if (business_has_person) {
6131
6133
  imageBase64 = await create_image(
6132
6134
  uid,
6133
6135
  `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4735",
3
+ "version": "1.1.4737",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",