@ai-sdk/langchain 2.0.320 → 2.0.322
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 +17 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/utils.ts +5 -2
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,10 @@ import {
|
|
|
13
13
|
ToolMessage,
|
|
14
14
|
AIMessageChunk
|
|
15
15
|
} from "@langchain/core/messages";
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
convertUint8ArrayToBase64,
|
|
18
|
+
secureJsonParse
|
|
19
|
+
} from "@ai-sdk/provider-utils";
|
|
17
20
|
function parseLangGraphEvent(event) {
|
|
18
21
|
return event.length === 3 ? [event[0], event[1], event[2]] : [void 0, event[0], event[1]];
|
|
19
22
|
}
|
|
@@ -995,7 +998,7 @@ function processLangGraphEvent(event, state, controller) {
|
|
|
995
998
|
const functionData = tc.function;
|
|
996
999
|
let args;
|
|
997
1000
|
try {
|
|
998
|
-
args = (functionData == null ? void 0 : functionData.arguments) ?
|
|
1001
|
+
args = (functionData == null ? void 0 : functionData.arguments) ? secureJsonParse(functionData.arguments) : {};
|
|
999
1002
|
} catch (e) {
|
|
1000
1003
|
args = {};
|
|
1001
1004
|
}
|