@eko-ai/eko 4.0.7-alpha.1 → 4.0.8

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.cjs.js CHANGED
@@ -38057,6 +38057,11 @@ async function callWithReAct(rlm, request, toolCallsOrCallback, streamCallback,
38057
38057
  let loopNum = 0;
38058
38058
  let assistantParts = null;
38059
38059
  while (true) {
38060
+ await streamCallback?.({
38061
+ type: "loop_start",
38062
+ request,
38063
+ loopNum,
38064
+ });
38060
38065
  assistantParts = await callLLM(rlm, request, streamCallback, errorHandler, finishHandler);
38061
38066
  if (assistantParts.length > 0) {
38062
38067
  request.messages.push({
@@ -38066,6 +38071,12 @@ async function callWithReAct(rlm, request, toolCallsOrCallback, streamCallback,
38066
38071
  }
38067
38072
  const continueLoop = await loopControl(request, assistantParts, loopNum);
38068
38073
  if (!continueLoop) {
38074
+ await streamCallback?.({
38075
+ type: "loop_end",
38076
+ request,
38077
+ loopNum,
38078
+ continueLoop,
38079
+ });
38069
38080
  break;
38070
38081
  }
38071
38082
  const toolUses = assistantParts.filter((s) => s.type == "tool-call");
@@ -38096,6 +38107,12 @@ async function callWithReAct(rlm, request, toolCallsOrCallback, streamCallback,
38096
38107
  })),
38097
38108
  });
38098
38109
  }
38110
+ await streamCallback?.({
38111
+ type: "loop_end",
38112
+ request,
38113
+ loopNum,
38114
+ continueLoop,
38115
+ });
38099
38116
  loopNum++;
38100
38117
  }
38101
38118
  return assistantParts;