@sprucelabs/sprucebot-llm 18.1.6 → 18.1.7
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.
|
@@ -244,11 +244,17 @@ export default class ResponseParserV2 {
|
|
|
244
244
|
let callbackResults = '';
|
|
245
245
|
const spans = extractCallbackSpans(message);
|
|
246
246
|
for (const span of spans) {
|
|
247
|
-
|
|
247
|
+
const name = span.name;
|
|
248
|
+
if (name === 'results') {
|
|
249
|
+
callbackResults += this.renderCallbackResults({
|
|
250
|
+
name,
|
|
251
|
+
error: `Agent cannot respond with built-in response callback @results()`,
|
|
252
|
+
});
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
if (RESERVED_CALLBACK_NAMES.has(name)) {
|
|
248
256
|
continue;
|
|
249
257
|
}
|
|
250
|
-
const name = span.name;
|
|
251
|
-
// Always strip the call from the user-facing message once recognized.
|
|
252
258
|
callbackStrippedMessage = stripCallFromMessage(callbackStrippedMessage, span.fullMatch.trim());
|
|
253
259
|
let options;
|
|
254
260
|
try {
|
|
@@ -237,11 +237,17 @@ class ResponseParserV2 {
|
|
|
237
237
|
let callbackResults = '';
|
|
238
238
|
const spans = extractCallbackSpans(message);
|
|
239
239
|
for (const span of spans) {
|
|
240
|
-
|
|
240
|
+
const name = span.name;
|
|
241
|
+
if (name === 'results') {
|
|
242
|
+
callbackResults += this.renderCallbackResults({
|
|
243
|
+
name,
|
|
244
|
+
error: `Agent cannot respond with built-in response callback @results()`,
|
|
245
|
+
});
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
if (RESERVED_CALLBACK_NAMES.has(name)) {
|
|
241
249
|
continue;
|
|
242
250
|
}
|
|
243
|
-
const name = span.name;
|
|
244
|
-
// Always strip the call from the user-facing message once recognized.
|
|
245
251
|
callbackStrippedMessage = stripCallFromMessage(callbackStrippedMessage, span.fullMatch.trim());
|
|
246
252
|
let options;
|
|
247
253
|
try {
|