@iqai/adk 0.3.3 → 0.3.4
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/index.js +9 -1
- package/dist/index.mjs +9 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1774,11 +1774,19 @@ var AiSdkLlm = (_class6 = class extends BaseLlm {
|
|
|
1774
1774
|
(part) => part.functionResponse
|
|
1775
1775
|
);
|
|
1776
1776
|
const contentParts2 = functionResponses.map((part) => {
|
|
1777
|
+
let output = part.functionResponse.response;
|
|
1778
|
+
if (!output || typeof output === "object" && Object.keys(output).length === 0) {
|
|
1779
|
+
output = JSON.stringify(output || {});
|
|
1780
|
+
} else if (typeof output === "object") {
|
|
1781
|
+
output = JSON.stringify(output);
|
|
1782
|
+
} else if (typeof output !== "string") {
|
|
1783
|
+
output = String(output);
|
|
1784
|
+
}
|
|
1777
1785
|
return {
|
|
1778
1786
|
type: "tool-result",
|
|
1779
1787
|
toolCallId: part.functionResponse.id,
|
|
1780
1788
|
toolName: part.functionResponse.name || "unknown",
|
|
1781
|
-
output
|
|
1789
|
+
output
|
|
1782
1790
|
};
|
|
1783
1791
|
});
|
|
1784
1792
|
return {
|
package/dist/index.mjs
CHANGED
|
@@ -1774,11 +1774,19 @@ var AiSdkLlm = class extends BaseLlm {
|
|
|
1774
1774
|
(part) => part.functionResponse
|
|
1775
1775
|
);
|
|
1776
1776
|
const contentParts2 = functionResponses.map((part) => {
|
|
1777
|
+
let output = part.functionResponse.response;
|
|
1778
|
+
if (!output || typeof output === "object" && Object.keys(output).length === 0) {
|
|
1779
|
+
output = JSON.stringify(output || {});
|
|
1780
|
+
} else if (typeof output === "object") {
|
|
1781
|
+
output = JSON.stringify(output);
|
|
1782
|
+
} else if (typeof output !== "string") {
|
|
1783
|
+
output = String(output);
|
|
1784
|
+
}
|
|
1777
1785
|
return {
|
|
1778
1786
|
type: "tool-result",
|
|
1779
1787
|
toolCallId: part.functionResponse.id,
|
|
1780
1788
|
toolName: part.functionResponse.name || "unknown",
|
|
1781
|
-
output
|
|
1789
|
+
output
|
|
1782
1790
|
};
|
|
1783
1791
|
});
|
|
1784
1792
|
return {
|