@xuda.io/ai_module 1.1.4558 → 1.1.4560

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 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4097,10 +4097,10 @@ function getFirstNWords(text, n = 10) {
4097
4097
  }
4098
4098
 
4099
4099
  export const create_conversation = async function (req, job_id, headers) {
4100
- const { uid, prompt, perform_ai_execution = true, email_id, email_direction = 'out', from_mailbox } = req;
4100
+ const { profile_id, uid, prompt, perform_ai_execution = true, email_id, email_direction = 'out', from_mailbox } = req;
4101
4101
  let { reference_type, reference_id = '', conversation_type } = req;
4102
4102
 
4103
- const account_profile_info = await account_module.get_active_account_profile_info(uid);
4103
+ const account_profile_info = await account_module.get_active_account_profile_info(uid, profile_id);
4104
4104
  const { account_profile_obj } = account_profile_info;
4105
4105
  try {
4106
4106
  if (conversation_type === 'email') {
@@ -4250,11 +4250,11 @@ const contactGuardrailAgent = new Agent({
4250
4250
  // };
4251
4251
 
4252
4252
  export const submit_chat_conversation = async function (req, job_id, headers) {
4253
- const { uid } = req;
4253
+ const { profile_id, uid } = req;
4254
4254
  let { conversation_id } = req;
4255
4255
  try {
4256
4256
  if (!conversation_id) throw new Error('missing conversation_id');
4257
- const account_profile_info = await account_module.get_active_account_profile_info(uid);
4257
+ const account_profile_info = await account_module.get_active_account_profile_info(uid, profile_id);
4258
4258
 
4259
4259
  let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
4260
4260
  req.conversation_doc = conversation_doc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4558",
3
+ "version": "1.1.4560",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",