@websolutespa/bom-mixer-llm 1.8.25 → 1.8.26
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/cjs/index.js +12 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/useLlm/message.service.js +12 -12
- package/dist/esm/useLlm/message.service.js.map +1 -1
- package/dist/types/useLlm/message.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/useLlm/message.service.ts +13 -12
package/CHANGELOG.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -1518,21 +1518,21 @@ class MessageDecoder {
|
|
|
1518
1518
|
chunks: x.content.map(x => this.decodeChunk(x))
|
|
1519
1519
|
});
|
|
1520
1520
|
} else {
|
|
1521
|
-
/*
|
|
1522
|
-
if (x.role === 'user') {
|
|
1523
|
-
return ({
|
|
1524
|
-
...x,
|
|
1525
|
-
chunks: [{
|
|
1526
|
-
type: 'text',
|
|
1527
|
-
text: x.content,
|
|
1528
|
-
}],
|
|
1529
|
-
});
|
|
1530
|
-
}
|
|
1531
|
-
*/
|
|
1532
1521
|
this.lastUnparsedText = '';
|
|
1533
|
-
|
|
1522
|
+
const message = Object.assign(Object.assign({}, x), {
|
|
1534
1523
|
chunks: this.chunksToChunkItems(this.textToChunks(x.content))
|
|
1535
1524
|
});
|
|
1525
|
+
if (message.chunks.length === 0) {
|
|
1526
|
+
const chunk = {
|
|
1527
|
+
type: 'text',
|
|
1528
|
+
text: x.content
|
|
1529
|
+
};
|
|
1530
|
+
return Object.assign(Object.assign({}, x), {
|
|
1531
|
+
chunks: [chunk],
|
|
1532
|
+
content: [chunk]
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
return message;
|
|
1536
1536
|
}
|
|
1537
1537
|
});
|
|
1538
1538
|
}
|