@ai-sdk/openai 4.0.70 → 4.0.71
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 +10 -0
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +4 -4
- package/dist/internal/index.js.map +1 -1
- package/package.json +2 -2
- package/src/image/openai-image-model.ts +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 4.0.71
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e76a0a3: fix(openai): cancel image edit URL downloads when the request is aborted
|
|
8
|
+
- Updated dependencies [2973485]
|
|
9
|
+
- Updated dependencies [a4db5ea]
|
|
10
|
+
- Updated dependencies [2937ea2]
|
|
11
|
+
- @ai-sdk/provider-utils@5.0.45
|
|
12
|
+
|
|
3
13
|
## 4.0.70
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -2680,10 +2680,10 @@ var OpenAIImageModel = class _OpenAIImageModel {
|
|
|
2680
2680
|
})
|
|
2681
2681
|
],
|
|
2682
2682
|
{ type: file.mediaType }
|
|
2683
|
-
) : downloadBlob(file.url)
|
|
2683
|
+
) : downloadBlob(file.url, { abortSignal })
|
|
2684
2684
|
)
|
|
2685
2685
|
),
|
|
2686
|
-
mask: mask != null ? await fileToBlob(mask) : void 0,
|
|
2686
|
+
mask: mask != null ? await fileToBlob(mask, abortSignal) : void 0,
|
|
2687
2687
|
n,
|
|
2688
2688
|
size,
|
|
2689
2689
|
quality: openaiOptions2.quality,
|
|
@@ -2820,10 +2820,10 @@ function distributeTokenDetails(details, index, total) {
|
|
|
2820
2820
|
}
|
|
2821
2821
|
return result;
|
|
2822
2822
|
}
|
|
2823
|
-
async function fileToBlob(file) {
|
|
2823
|
+
async function fileToBlob(file, abortSignal) {
|
|
2824
2824
|
if (!file) return void 0;
|
|
2825
2825
|
if (file.type === "url") {
|
|
2826
|
-
return downloadBlob(file.url);
|
|
2826
|
+
return downloadBlob(file.url, { abortSignal });
|
|
2827
2827
|
}
|
|
2828
2828
|
const data = file.data instanceof Uint8Array ? file.data : convertBase64ToUint8Array(file.data);
|
|
2829
2829
|
return new Blob([data], { type: file.mediaType });
|
|
@@ -11967,7 +11967,7 @@ var OpenAISkills = class {
|
|
|
11967
11967
|
};
|
|
11968
11968
|
|
|
11969
11969
|
// src/version.ts
|
|
11970
|
-
var VERSION = true ? "4.0.
|
|
11970
|
+
var VERSION = true ? "4.0.71" : "0.0.0-test";
|
|
11971
11971
|
|
|
11972
11972
|
// src/openai-provider.ts
|
|
11973
11973
|
function createOpenAI(options = {}) {
|