@aigne/openai 0.14.1 → 0.14.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 +16 -0
- package/lib/cjs/openai-chat-model.js +1 -8
- package/lib/esm/openai-chat-model.js +1 -8
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.14.2](https://github.com/AIGNE-io/aigne-framework/compare/openai-v0.14.1...openai-v0.14.2) (2025-09-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **model:** transform local file to base64 before request llm ([#462](https://github.com/AIGNE-io/aigne-framework/issues/462)) ([58ef5d7](https://github.com/AIGNE-io/aigne-framework/commit/58ef5d77046c49f3c4eed15b7f0cc283cbbcd74a))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @aigne/core bumped to 1.58.2
|
|
16
|
+
* devDependencies
|
|
17
|
+
* @aigne/test-utils bumped to 0.5.46
|
|
18
|
+
|
|
3
19
|
## [0.14.1](https://github.com/AIGNE-io/aigne-framework/compare/openai-v0.14.0...openai-v0.14.1) (2025-09-05)
|
|
4
20
|
|
|
5
21
|
|
|
@@ -10,7 +10,6 @@ const model_utils_js_1 = require("@aigne/core/utils/model-utils.js");
|
|
|
10
10
|
const prompts_js_1 = require("@aigne/core/utils/prompts.js");
|
|
11
11
|
const stream_utils_js_1 = require("@aigne/core/utils/stream-utils.js");
|
|
12
12
|
const type_utils_js_1 = require("@aigne/core/utils/type-utils.js");
|
|
13
|
-
const index_js_1 = require("@aigne/platform-helpers/nodejs/index.js");
|
|
14
13
|
const ajv_1 = require("ajv");
|
|
15
14
|
const uuid_1 = require("uuid");
|
|
16
15
|
const zod_1 = require("zod");
|
|
@@ -338,13 +337,7 @@ async function contentsFromInputMessages(messages) {
|
|
|
338
337
|
file: { file_data: c.data, filename: c.filename },
|
|
339
338
|
};
|
|
340
339
|
case "local": {
|
|
341
|
-
|
|
342
|
-
type: "file",
|
|
343
|
-
file: {
|
|
344
|
-
file_data: await index_js_1.nodejs.fs.readFile(c.path, "base64"),
|
|
345
|
-
filename: c.filename,
|
|
346
|
-
},
|
|
347
|
-
};
|
|
340
|
+
throw new Error(`Unsupported local file: ${c.path}, it should be converted to base64 at ChatModel`);
|
|
348
341
|
}
|
|
349
342
|
}
|
|
350
343
|
}))).filter(type_utils_js_1.isNonNullable),
|
|
@@ -4,7 +4,6 @@ import { mergeUsage } from "@aigne/core/utils/model-utils.js";
|
|
|
4
4
|
import { getJsonOutputPrompt } from "@aigne/core/utils/prompts.js";
|
|
5
5
|
import { agentResponseStreamToObject } from "@aigne/core/utils/stream-utils.js";
|
|
6
6
|
import { checkArguments, isNonNullable, } from "@aigne/core/utils/type-utils.js";
|
|
7
|
-
import { nodejs } from "@aigne/platform-helpers/nodejs/index.js";
|
|
8
7
|
import { Ajv } from "ajv";
|
|
9
8
|
import { v7 } from "uuid";
|
|
10
9
|
import { z } from "zod";
|
|
@@ -331,13 +330,7 @@ export async function contentsFromInputMessages(messages) {
|
|
|
331
330
|
file: { file_data: c.data, filename: c.filename },
|
|
332
331
|
};
|
|
333
332
|
case "local": {
|
|
334
|
-
|
|
335
|
-
type: "file",
|
|
336
|
-
file: {
|
|
337
|
-
file_data: await nodejs.fs.readFile(c.path, "base64"),
|
|
338
|
-
filename: c.filename,
|
|
339
|
-
},
|
|
340
|
-
};
|
|
333
|
+
throw new Error(`Unsupported local file: ${c.path}, it should be converted to base64 at ChatModel`);
|
|
341
334
|
}
|
|
342
335
|
}
|
|
343
336
|
}))).filter(isNonNullable),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/openai",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "AIGNE OpenAI SDK for integrating with OpenAI's GPT models and API services",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"openai": "^5.8.3",
|
|
40
40
|
"uuid": "^11.1.0",
|
|
41
41
|
"zod": "^3.25.67",
|
|
42
|
-
"@aigne/core": "^1.58.
|
|
42
|
+
"@aigne/core": "^1.58.2",
|
|
43
43
|
"@aigne/platform-helpers": "^0.6.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"npm-run-all": "^4.1.5",
|
|
49
49
|
"rimraf": "^6.0.1",
|
|
50
50
|
"typescript": "^5.8.3",
|
|
51
|
-
"@aigne/test-utils": "^0.5.
|
|
51
|
+
"@aigne/test-utils": "^0.5.46"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"lint": "tsc --noEmit",
|