@xuda.io/ai_module 1.1.5379 → 1.1.5381

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 -6
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3694,7 +3694,6 @@ const contactGuardrailAgent = new Agent({
3694
3694
  // };
3695
3695
 
3696
3696
  export const submit_chat_conversation = async function (req, job_id, headers) {
3697
- debugger;
3698
3697
  const { profile_id, uid } = req;
3699
3698
  let { conversation_id } = req;
3700
3699
  try {
@@ -3748,7 +3747,7 @@ export const submit_chat_conversation = async function (req, job_id, headers) {
3748
3747
  conversation_doc.conversation_item_id = ret.data.id;
3749
3748
  await db_module.save_app_couch_doc(account_profile_info.app_id, conversation_doc);
3750
3749
  }
3751
- debugger;
3750
+
3752
3751
  return ret;
3753
3752
  } catch (err) {
3754
3753
  return { code: -14, data: err.message || String(err) };
@@ -4197,14 +4196,13 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4197
4196
  const job_info = await jobs_ms.get_job_info({ job_id });
4198
4197
 
4199
4198
  if (job_info.code < 0 || job_info.data.stat === 4) {
4200
- debugger;
4201
4199
  clearInterval(interval);
4202
4200
  resolve({ code: -1, data: 'aborted' });
4203
- }
4204
- if (job_info?.data?.payload?.skip_suggestions) {
4205
- debugger;
4201
+ return;
4202
+ } else if (job_info?.data?.payload?.skip_suggestions) {
4206
4203
  clearInterval(interval);
4207
4204
  resolve({ code: -1, data: 'skipped' });
4205
+ return;
4208
4206
  }
4209
4207
  }, 500);
4210
4208
  const ret = await get_chat_suggestions({ uid, type: 'chat prompt', ai_agents, conversation_item_id: out_conversation_item_save_ret.data.id, context: prompt });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5379",
3
+ "version": "1.1.5381",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",