@xuda.io/ai_module 1.1.5147 → 1.1.5148

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 +8 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4162,6 +4162,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4162
4162
  let prompt_suggestions = [];
4163
4163
  setTimeout(async () => {
4164
4164
  debugger;
4165
+ if (!activate_prompt_suggestions) return;
4165
4166
  const prompt_suggestions_ret = await get_chat_suggestions(uid, ai_agents, out_conversation_item_save_ret.data.id);
4166
4167
  if (prompt_suggestions_ret.code > -1) prompt_suggestions = prompt_suggestions_ret.data;
4167
4168
  }, 1);
@@ -4661,12 +4662,14 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4661
4662
  await attachment_handler(uid, app_id, conversation_id, attachments, account_profile_info);
4662
4663
  }
4663
4664
  ////////////
4664
- if ((typeof ai_agents === 'undefined' || ai_agents.length > 0) && !prompt_suggestions.length) {
4665
- await _utils.delay(5000);
4666
- }
4665
+ if (activate_prompt_suggestions) {
4666
+ if (!prompt_suggestions.length) {
4667
+ await _utils.delay(5000);
4668
+ }
4667
4669
 
4668
- if (prompt_suggestions.length) {
4669
- await render_suggestions();
4670
+ if (prompt_suggestions.length) {
4671
+ await render_suggestions();
4672
+ }
4670
4673
  }
4671
4674
  ///////////
4672
4675
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5147",
3
+ "version": "1.1.5148",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",