@sprucelabs/sprucebot-llm 18.1.1 → 18.1.3

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.
@@ -235,7 +235,7 @@ export default class ResponseParserV2 {
235
235
  }
236
236
  const name = span.name;
237
237
  // Always strip the call from the user-facing message once recognized.
238
- callbackStrippedMessage = stripCallFromMessage(callbackStrippedMessage, span.fullMatch);
238
+ callbackStrippedMessage = stripCallFromMessage(callbackStrippedMessage, span.fullMatch.trim());
239
239
  let options;
240
240
  try {
241
241
  options = span.argsJson ? JSON.parse(span.argsJson) : undefined;
@@ -257,7 +257,7 @@ export default class ResponseParserV2 {
257
257
  }
258
258
  try {
259
259
  if (callback === null || callback === void 0 ? void 0 : callback.parameters) {
260
- validateAndNormalizeCallbackOptions(callback.parameters, options);
260
+ validateAndNormalizeCallbackOptions(callback.parameters, options !== null && options !== void 0 ? options : {});
261
261
  }
262
262
  const results = yield (callback === null || callback === void 0 ? void 0 : callback.cb(options));
263
263
  callbackResults += this.renderCallbackResults({ name, results });
@@ -228,7 +228,7 @@ class ResponseParserV2 {
228
228
  }
229
229
  const name = span.name;
230
230
  // Always strip the call from the user-facing message once recognized.
231
- callbackStrippedMessage = stripCallFromMessage(callbackStrippedMessage, span.fullMatch);
231
+ callbackStrippedMessage = stripCallFromMessage(callbackStrippedMessage, span.fullMatch.trim());
232
232
  let options;
233
233
  try {
234
234
  options = span.argsJson ? JSON.parse(span.argsJson) : undefined;
@@ -250,7 +250,7 @@ class ResponseParserV2 {
250
250
  }
251
251
  try {
252
252
  if (callback?.parameters) {
253
- (0, validateAndNormalizeCallbackOptions_1.default)(callback.parameters, options);
253
+ (0, validateAndNormalizeCallbackOptions_1.default)(callback.parameters, options ?? {});
254
254
  }
255
255
  const results = await callback?.cb(options);
256
256
  callbackResults += this.renderCallbackResults({ name, results });
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "eta"
9
9
  ]
10
10
  },
11
- "version": "18.1.1",
11
+ "version": "18.1.3",
12
12
  "files": [
13
13
  "build"
14
14
  ],