@xuda.io/ai_module 1.1.4986 → 1.1.4988

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 +3 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3363,7 +3363,7 @@ function getFirstNWords(text, n = 10) {
3363
3363
  }
3364
3364
 
3365
3365
  export const create_conversation = async function (req, job_id, headers) {
3366
- const { profile_id, uid, prompt, perform_ai_execution = true, email_id, email_direction = 'out', from_mailbox, date_created } = req;
3366
+ const { profile_id, uid, prompt, perform_ai_execution = true, email_id, email_direction = 'out', from_mailbox, date_created, ai_model = _conf.default_ai_model } = req;
3367
3367
  let { reference_type, reference_id = '', conversation_type, email_recipient_type } = req;
3368
3368
 
3369
3369
  const account_profile_info = await get_active_account_profile_info(uid, profile_id);
@@ -3415,6 +3415,7 @@ export const create_conversation = async function (req, job_id, headers) {
3415
3415
  process_stat: perform_ai_execution ? 'full' : 'partial',
3416
3416
  from_mailbox,
3417
3417
  email_recipient_type,
3418
+ model: ai_model,
3418
3419
  };
3419
3420
  const save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, conversation_doc);
3420
3421
 
@@ -3936,6 +3937,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
3936
3937
  const { uid, gtp_token, profile_id } = req;
3937
3938
  const account_profile_info = await get_active_account_profile_info(uid, profile_id);
3938
3939
  let { prompt, conversation_doc, attachments = [], ai_agents, output_format = 'md', stream = true, with_context = true, ai_model = _conf.default_ai_model } = req;
3940
+
3939
3941
  let model = ai_model;
3940
3942
  if (!_conf.ai_models[model]) {
3941
3943
  throw new Error('model not supported');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4986",
3
+ "version": "1.1.4988",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",