@xuda.io/ai_module 1.1.5156 → 1.1.5158

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 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4173,7 +4173,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4173
4173
  // const reference_type = conversation_doc.reference_type;
4174
4174
  // const reference_id = conversation_doc.reference_id;
4175
4175
 
4176
- const suggestionsPromise = activate_prompt_suggestions ? get_chat_suggestions(uid, ai_agents, out_conversation_item_save_ret.data.id) : Promise.resolve(null);
4176
+ const suggestionsPromise = activate_prompt_suggestions ? get_chat_suggestions({ uid, ai_agents, conversation_item_id: out_conversation_item_save_ret.data.id }) : Promise.resolve(null);
4177
4177
 
4178
4178
  conversation_doc.stat = 2;
4179
4179
  conversation_doc.ts = Date.now();
@@ -4837,7 +4837,7 @@ setTimeout(async () => {
4837
4837
 
4838
4838
  // await init_studio_units();
4839
4839
  let ret;
4840
- ret = await get_chat_suggestions(uid, [], 'coi_7b65b783af38b91c8ec4c499d3694bab');
4840
+ ret = await get_chat_suggestions({ uid, ai_agents: [], conversation_item_id: 'coi_7b65b783af38b91c8ec4c499d3694bab' });
4841
4841
  // ret = await get_active_account_profile_info(uid);
4842
4842
  // ret = await is_spam_email(uid, 'dsgr8-2994400420@gigs.craigslist.org', 'To: You, From: Us - 70% Off Stickers & Labels Today Only');
4843
4843
  // ret = await is_spam_email(uid, 'noreply@tm.openai.com', 'Please update your Plus payment method', account_profile_info);
@@ -10888,11 +10888,9 @@ export const open_ai_alive_check = async function () {};
10888
10888
  // };
10889
10889
 
10890
10890
  export const get_chat_suggestions = async function (req) {
10891
-
10892
- const(uid, ai_agents, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model)=req
10891
+ const { uid, ai_agents, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model } = req;
10893
10892
 
10894
10893
  try {
10895
- debugger;
10896
10894
  const account_profile_info = await get_active_account_profile_info(uid);
10897
10895
  const account_doc = await db_module.get_couch_doc_native('xuda_accounts', uid);
10898
10896
  const conversation_item_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_item_id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5156",
3
+ "version": "1.1.5158",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",