@ax-llm/ax 11.0.33 → 11.0.34
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/index.cjs +5 -2
- package/index.cjs.map +1 -1
- package/index.js +5 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4773,6 +4773,9 @@ function matchesContent(content, prefix, startIndex = 0, prefixCache = globalPre
|
|
|
4773
4773
|
);
|
|
4774
4774
|
for (let i = 0; i < prefixes.length - 1; i++) {
|
|
4775
4775
|
const partialPrefix = prefixes[i];
|
|
4776
|
+
if (partialPrefix === "\n" || partialPrefix === ":") {
|
|
4777
|
+
continue;
|
|
4778
|
+
}
|
|
4776
4779
|
if (partialPrefix && contentEnd.endsWith(partialPrefix)) {
|
|
4777
4780
|
return -2;
|
|
4778
4781
|
}
|
|
@@ -5555,7 +5558,7 @@ var streamingExtractValues = (sig, values, xstate, content, streamingValidation
|
|
|
5555
5558
|
}
|
|
5556
5559
|
const isFirst = xstate.extractedFields.length === 0;
|
|
5557
5560
|
const prefix = (isFirst ? "" : "\n") + field.title + ":";
|
|
5558
|
-
let e = matchesContent(content, prefix, xstate.s
|
|
5561
|
+
let e = matchesContent(content, prefix, xstate.s);
|
|
5559
5562
|
switch (e) {
|
|
5560
5563
|
case -1:
|
|
5561
5564
|
if (streamingValidation && values.length == 0 && !field.isOptional) {
|
|
@@ -6485,7 +6488,7 @@ var AxGen = class extends AxProgramWithSignature {
|
|
|
6485
6488
|
}
|
|
6486
6489
|
}
|
|
6487
6490
|
}
|
|
6488
|
-
throw new Error(`Unable to fix validation error: ${err}`);
|
|
6491
|
+
throw new Error(`Unable to fix validation error: ${err?.toString()}`);
|
|
6489
6492
|
}
|
|
6490
6493
|
throw new Error(`Max steps reached: ${maxSteps}`);
|
|
6491
6494
|
}
|