@botbotgo/better-call 0.1.37 → 0.1.38
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/package.json +1 -1
- package/scripts/demo.mjs +14 -1
package/package.json
CHANGED
package/scripts/demo.mjs
CHANGED
|
@@ -158,6 +158,19 @@ try {
|
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
const gatewayRepair =
|
|
162
|
+
gatewayResult != null && typeof gatewayResult === "object"
|
|
163
|
+
? gatewayResult
|
|
164
|
+
: {
|
|
165
|
+
status: "error",
|
|
166
|
+
originalToolName: "research",
|
|
167
|
+
toolName: null,
|
|
168
|
+
reason: "repairToolCall returned no result.",
|
|
169
|
+
errorType: null,
|
|
170
|
+
errorMessage: null,
|
|
171
|
+
errorCause: null,
|
|
172
|
+
};
|
|
173
|
+
|
|
161
174
|
const repairedCalls = Array.isArray(reliableResult?.calls) ? reliableResult.calls : null;
|
|
162
175
|
const repairedCall = repairedCalls && repairedCalls.length > 0 ? repairedCalls[0] : null;
|
|
163
176
|
|
|
@@ -171,7 +184,7 @@ const report = {
|
|
|
171
184
|
repaired: repairedCall,
|
|
172
185
|
diagnostics: reliableResult?.diagnostics ?? null,
|
|
173
186
|
},
|
|
174
|
-
gatewayRepair
|
|
187
|
+
gatewayRepair,
|
|
175
188
|
};
|
|
176
189
|
|
|
177
190
|
if (json) {
|