@xuda.io/ai_module 1.1.5214 → 1.1.5215

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 +5 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4708,7 +4708,10 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4708
4708
 
4709
4709
  const render_suggestions = async function () {
4710
4710
  return new Promise(async (resolve, reject) => {
4711
+ let counter = 0;
4712
+ emitToDashboard('suggestions', JSON.stringify(prompt_suggestions));
4711
4713
  let interval = setInterval(async function () {
4714
+ counter++;
4712
4715
  const job_info = await jobs_ms.get_job_info({ job_id });
4713
4716
 
4714
4717
  if (job_info.code < 0 || job_info.data.stat === 4) {
@@ -4719,8 +4722,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4719
4722
  resolve({ code: -1, data: 'skipped' });
4720
4723
  clearInterval(interval);
4721
4724
  }
4722
- }, 500);
4723
- emitToDashboard('suggestions', JSON.stringify(prompt_suggestions));
4725
+ }, 1000);
4726
+
4724
4727
  clearInterval(interval);
4725
4728
  resolve(ret);
4726
4729
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5214",
3
+ "version": "1.1.5215",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",