@aigne/doubao 1.1.5-beta → 1.1.5-beta.2
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
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.5-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/doubao-v1.1.5-beta.1...doubao-v1.1.5-beta.2) (2025-11-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* The following workspace dependencies were updated
|
|
9
|
+
* dependencies
|
|
10
|
+
* @aigne/openai bumped to 0.16.5-beta.2
|
|
11
|
+
* devDependencies
|
|
12
|
+
* @aigne/core bumped to 1.65.1-beta.2
|
|
13
|
+
* @aigne/test-utils bumped to 0.5.58-beta.2
|
|
14
|
+
|
|
15
|
+
## [1.1.5-beta.1](https://github.com/AIGNE-io/aigne-framework/compare/doubao-v1.1.5-beta...doubao-v1.1.5-beta.1) (2025-11-04)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* add fetch utility with timeout and enhanced error handling ([#694](https://github.com/AIGNE-io/aigne-framework/issues/694)) ([c2d4076](https://github.com/AIGNE-io/aigne-framework/commit/c2d4076ec590150d2751591a4f723721f78381e9))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Dependencies
|
|
24
|
+
|
|
25
|
+
* The following workspace dependencies were updated
|
|
26
|
+
* dependencies
|
|
27
|
+
* @aigne/openai bumped to 0.16.5-beta.1
|
|
28
|
+
* devDependencies
|
|
29
|
+
* @aigne/core bumped to 1.65.1-beta.1
|
|
30
|
+
* @aigne/test-utils bumped to 0.5.58-beta.1
|
|
31
|
+
|
|
3
32
|
## [1.1.5-beta](https://github.com/AIGNE-io/aigne-framework/compare/doubao-v1.1.4...doubao-v1.1.5-beta) (2025-11-03)
|
|
4
33
|
|
|
5
34
|
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DoubaoImageModel = void 0;
|
|
4
4
|
const core_1 = require("@aigne/core");
|
|
5
5
|
const camelize_js_1 = require("@aigne/core/utils/camelize.js");
|
|
6
|
+
const fetch_js_1 = require("@aigne/core/utils/fetch.js");
|
|
6
7
|
const type_utils_js_1 = require("@aigne/core/utils/type-utils.js");
|
|
7
8
|
const ufo_1 = require("ufo");
|
|
8
9
|
const zod_1 = require("zod");
|
|
@@ -112,15 +113,11 @@ class DoubaoImageModel extends core_1.ImageModel {
|
|
|
112
113
|
watermark: mergeInput.watermark ?? false,
|
|
113
114
|
image: image.length ? image : undefined,
|
|
114
115
|
};
|
|
115
|
-
const response = await fetch((0, ufo_1.joinURL)(url, `/images/generations`), {
|
|
116
|
+
const response = await (0, fetch_js_1.fetch)((0, ufo_1.joinURL)(url, `/images/generations`), {
|
|
116
117
|
method: "POST",
|
|
117
118
|
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
|
|
118
119
|
body: JSON.stringify(body),
|
|
119
120
|
});
|
|
120
|
-
if (!response.ok) {
|
|
121
|
-
const error = await response.text();
|
|
122
|
-
throw new Error(`Doubao API error: ${response.status} ${response.statusText} ${error}`);
|
|
123
|
-
}
|
|
124
121
|
if (body.stream) {
|
|
125
122
|
if (!response.body)
|
|
126
123
|
throw new Error("Streaming not supported in this environment");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ImageModel, imageModelInputSchema, } from "@aigne/core";
|
|
2
2
|
import { snakelize } from "@aigne/core/utils/camelize.js";
|
|
3
|
+
import { fetch } from "@aigne/core/utils/fetch.js";
|
|
3
4
|
import { checkArguments, flat, pick } from "@aigne/core/utils/type-utils.js";
|
|
4
5
|
import { joinURL } from "ufo";
|
|
5
6
|
import { z } from "zod";
|
|
@@ -114,10 +115,6 @@ export class DoubaoImageModel extends ImageModel {
|
|
|
114
115
|
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
|
|
115
116
|
body: JSON.stringify(body),
|
|
116
117
|
});
|
|
117
|
-
if (!response.ok) {
|
|
118
|
-
const error = await response.text();
|
|
119
|
-
throw new Error(`Doubao API error: ${response.status} ${response.statusText} ${error}`);
|
|
120
|
-
}
|
|
121
118
|
if (body.stream) {
|
|
122
119
|
if (!response.body)
|
|
123
120
|
throw new Error("Streaming not supported in this environment");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/doubao",
|
|
3
|
-
"version": "1.1.5-beta",
|
|
3
|
+
"version": "1.1.5-beta.2",
|
|
4
4
|
"description": "AIGNE doubao SDK for integrating with doubao AI models",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"ufo": "^1.6.1",
|
|
39
39
|
"zod": "^3.25.67",
|
|
40
|
-
"@aigne/openai": "^0.16.5-beta"
|
|
40
|
+
"@aigne/openai": "^0.16.5-beta.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/bun": "^1.2.22",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"npm-run-all": "^4.1.5",
|
|
48
48
|
"rimraf": "^6.0.1",
|
|
49
49
|
"typescript": "^5.9.2",
|
|
50
|
-
"@aigne/core": "^1.65.1-beta",
|
|
51
|
-
"@aigne/test-utils": "^0.5.58-beta"
|
|
50
|
+
"@aigne/core": "^1.65.1-beta.2",
|
|
51
|
+
"@aigne/test-utils": "^0.5.58-beta.2"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"lint": "tsc --noEmit",
|