@xuda.io/ai_module 1.1.4380 → 1.1.4382

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 +2 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4258,7 +4258,7 @@ export const create_conversation = async function (req, job_id, headers) {
4258
4258
  );
4259
4259
  } else {
4260
4260
  // other cases rather then chat
4261
- await update_conversation_mood_level(uid, [{ uid: account_profile_info.uid, contact_id: reference_id }], conversation_obj.id, prompt, null, recipient_contact_id, conversation_doc.reference_type === 'contacts', account_profile_info);
4261
+ await update_conversation_mood_level(uid, [{ uid: account_profile_info.uid, contact_id: reference_id }], conversation_obj.id, prompt, null, contact_id, conversation_doc.reference_type === 'contacts', account_profile_info);
4262
4262
  }
4263
4263
  }
4264
4264
  }, 1000);
@@ -6870,6 +6870,7 @@ export const get_profile_picture = async function (uid, account_type = 'business
6870
6870
  });
6871
6871
 
6872
6872
  imageBase64 = await normalizeBase64To1024(image_response.data[0].b64_json);
6873
+ record_chat_usage(uid, image_response.usage.input_tokens, image_response.usage.output_tokens, 'profile image', prompt, model, { url }, account_profile_info);
6873
6874
  }
6874
6875
  const outputBuffer = Buffer.from(imageBase64, 'base64');
6875
6876
  const outputPath = tempOutputPath;
@@ -6887,7 +6888,6 @@ export const get_profile_picture = async function (uid, account_type = 'business
6887
6888
 
6888
6889
  let drive_ret = await drive_module.upload_drive_file_user({ uid, path: '/Profile Images' }, job_id, headers, file_obj);
6889
6890
  drive_ret.profile_picture_source = profile_picture_source;
6890
- record_chat_usage(uid, image_response.usage.input_tokens, image_response.usage.output_tokens, 'profile image', prompt, model, { url }, account_profile_info);
6891
6891
 
6892
6892
  return drive_ret;
6893
6893
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4380",
3
+ "version": "1.1.4382",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",