@websolutespa/bom-llm 0.0.30 → 0.0.31
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/CHANGELOG.md +6 -0
- package/dist/umd/index.js +10 -5
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/umd/index.js
CHANGED
|
@@ -19343,11 +19343,16 @@ ${Object.entries(vars).map(_ref2 => {
|
|
|
19343
19343
|
let chunks = [];
|
|
19344
19344
|
let didError = false;
|
|
19345
19345
|
try {
|
|
19346
|
-
|
|
19347
|
-
|
|
19348
|
-
|
|
19349
|
-
|
|
19350
|
-
|
|
19346
|
+
// console.log('textToChunks.text', text);
|
|
19347
|
+
if (text.match(/(",|},|],)$/)) {
|
|
19348
|
+
const textToReplace = textToChunksLastUnparsed.text + text;
|
|
19349
|
+
const replacedText = textToReplace.replace(/(,$)/, '');
|
|
19350
|
+
// console.log('textToChunks.replacedText', replacedText);
|
|
19351
|
+
const jsonChunks = JSON.parse(`[${replacedText}]`);
|
|
19352
|
+
chunks = jsonChunks;
|
|
19353
|
+
} else {
|
|
19354
|
+
textToChunksLastUnparsed.text += text;
|
|
19355
|
+
}
|
|
19351
19356
|
} catch (error) {
|
|
19352
19357
|
console.log('textToChunks.error', error, text);
|
|
19353
19358
|
didError = true;
|