@botpress/runtime 1.7.16 → 1.7.17

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/library.js CHANGED
@@ -48,7 +48,7 @@ var init_define_BUILD = __esm({
48
48
  var define_PACKAGE_VERSIONS_default;
49
49
  var init_define_PACKAGE_VERSIONS = __esm({
50
50
  "<define:__PACKAGE_VERSIONS__>"() {
51
- define_PACKAGE_VERSIONS_default = { runtime: "1.7.16", adk: "1.7.16", sdk: "4.19.0", llmz: "0.0.31", zai: "2.5.0", cognitive: "0.2.0" };
51
+ define_PACKAGE_VERSIONS_default = { runtime: "1.7.17", adk: "1.7.17", sdk: "4.19.0", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
52
52
  }
53
53
  });
54
54
 
@@ -40219,6 +40219,7 @@ If the question is not related to the knowledge bases, do NOT use this tool.`.tr
40219
40219
  Autonomous2.createKnowledgeSearchTool = createKnowledgeSearchTool;
40220
40220
  function createExecute(options) {
40221
40221
  return async (props) => {
40222
+ const mode = props.mode || options.mode;
40222
40223
  const cognitive = context.get("cognitive");
40223
40224
  if (!cognitive) {
40224
40225
  throw new Error("Cognitive client is not available in this context. Make sure to run in a cognitive context.");
@@ -40230,7 +40231,7 @@ If the question is not related to the knowledge bases, do NOT use this tool.`.tr
40230
40231
  {
40231
40232
  "autonomous.max_loops": maxLoops,
40232
40233
  "autonomous.message_types": ["text", "image"],
40233
- "autonomous.mode": options.mode
40234
+ "autonomous.mode": mode
40234
40235
  },
40235
40236
  async (execSpan) => {
40236
40237
  const joinedSignal = createJoinedAbortSignal([props.signal, options.interruption]);
@@ -40249,8 +40250,8 @@ If the question is not related to the knowledge bases, do NOT use this tool.`.tr
40249
40250
  iterationSpan?.ctx ?? execSpan.ctx,
40250
40251
  () => context.run(_originalCtx, () => fn(...props2))
40251
40252
  );
40252
- const _chat = options.mode === "chat" ? context.get("chat") : void 0;
40253
- if (options.mode === "chat" && !_chat) {
40253
+ const _chat = mode === "chat" ? context.get("chat") : void 0;
40254
+ if (mode === "chat" && !_chat) {
40254
40255
  throw new Error("Chat is not available in this context. Make sure to run in chat mode with a chat context.");
40255
40256
  }
40256
40257
  const chat = _chat ? {