pulse-coder-engine 0.0.1-alpha.12 → 0.0.1-alpha.13

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.
package/dist/index.js CHANGED
@@ -467,6 +467,9 @@ async function loop(context, options) {
467
467
  }
468
468
  }
469
469
  if (finishReason === "stop") {
470
+ if (!text) {
471
+ continue;
472
+ }
470
473
  return text || "Task completed.";
471
474
  }
472
475
  if (finishReason === "length") {
@@ -498,6 +501,9 @@ async function loop(context, options) {
498
501
  }
499
502
  continue;
500
503
  }
504
+ if (!text) {
505
+ continue;
506
+ }
501
507
  return text || "Task completed.";
502
508
  } catch (error) {
503
509
  if (options?.abortSignal?.aborted || error?.name === "AbortError") {