@mozaik-ai/core 4.0.5 → 4.0.6

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.mjs CHANGED
@@ -2089,7 +2089,10 @@ var DefaultFunctionCallRunner = class {
2089
2089
  async run(input, tool) {
2090
2090
  try {
2091
2091
  const result = await tool.invoke(JSON.parse(input.args));
2092
- return FunctionCallOutputItem.create(input.callId, JSON.stringify(result));
2092
+ return FunctionCallOutputItem.create(
2093
+ input.callId,
2094
+ typeof result === "string" ? result : JSON.stringify(result)
2095
+ );
2093
2096
  } catch (error) {
2094
2097
  return FunctionCallOutputItem.create(input.callId, `Error calling tool: ${error}`);
2095
2098
  }