@botbotgo/better-call 0.1.28 → 0.1.29

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/package.json +1 -1
  2. package/scripts/demo.mjs +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/better-call",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "Small-model tool-call reliability layer for LangChain and custom agent runtimes.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/scripts/demo.mjs CHANGED
@@ -100,6 +100,10 @@ try {
100
100
  };
101
101
  }
102
102
 
103
+ const repairedCall = Array.isArray(reliableResult.calls) && reliableResult.calls.length > 0
104
+ ? reliableResult.calls[0]
105
+ : null;
106
+
103
107
  const report = {
104
108
  wrappedTool: {
105
109
  before: badArgs,
@@ -107,8 +111,8 @@ const report = {
107
111
  },
108
112
  reliableToolCalls: {
109
113
  before: { tool: "stock_price", args: badArgs },
110
- repaired: reliableResult.calls[0],
111
- diagnostics: reliableResult.diagnostics,
114
+ repaired: repairedCall,
115
+ diagnostics: reliableResult.diagnostics ?? null,
112
116
  },
113
117
  gatewayRepair: gatewayResult,
114
118
  };