@ai-sdk/provider-utils 3.0.36 → 3.0.37
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 +8 -0
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -709,7 +709,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
709
709
|
}
|
|
710
710
|
|
|
711
711
|
// src/version.ts
|
|
712
|
-
var VERSION = true ? "3.0.
|
|
712
|
+
var VERSION = true ? "3.0.37" : "0.0.0-test";
|
|
713
713
|
|
|
714
714
|
// src/get-from-api.ts
|
|
715
715
|
var getOriginalFetch = () => globalThis.fetch;
|
|
@@ -2908,11 +2908,12 @@ function convertBase64ToUint8Array(base64String) {
|
|
|
2908
2908
|
return Uint8Array.from(latin1string, (byte) => byte.codePointAt(0));
|
|
2909
2909
|
}
|
|
2910
2910
|
function convertUint8ArrayToBase64(array) {
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2911
|
+
const chunks = [];
|
|
2912
|
+
const chunkSize = 4096;
|
|
2913
|
+
for (let i = 0; i < array.length; i += chunkSize) {
|
|
2914
|
+
chunks.push(String.fromCodePoint(...array.subarray(i, i + chunkSize)));
|
|
2914
2915
|
}
|
|
2915
|
-
return btoa(
|
|
2916
|
+
return btoa(chunks.join(""));
|
|
2916
2917
|
}
|
|
2917
2918
|
function convertToBase64(value) {
|
|
2918
2919
|
return value instanceof Uint8Array ? convertUint8ArrayToBase64(value) : value;
|