@aigne/openai 0.10.12 → 0.10.13
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 +3 -3
- package/lib/esm/openai-chat-model.js +3 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.10.13](https://github.com/AIGNE-io/aigne-framework/compare/openai-v0.10.12...openai-v0.10.13) (2025-08-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **models:** aigne-hub adapter not working in node.js v21 ([#320](https://github.com/AIGNE-io/aigne-framework/issues/320)) ([2884d00](https://github.com/AIGNE-io/aigne-framework/commit/2884d00b83e153ae7465ef1369fcd22d7c6d43e0))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @aigne/core bumped to 1.45.0
|
|
16
|
+
* devDependencies
|
|
17
|
+
* @aigne/test-utils bumped to 0.5.21
|
|
18
|
+
|
|
3
19
|
## [0.10.12](https://github.com/AIGNE-io/aigne-framework/compare/openai-v0.10.11...openai-v0.10.12) (2025-08-05)
|
|
4
20
|
|
|
5
21
|
|
|
@@ -14,8 +14,8 @@ const prompts_js_1 = require("@aigne/core/utils/prompts.js");
|
|
|
14
14
|
const stream_utils_js_1 = require("@aigne/core/utils/stream-utils.js");
|
|
15
15
|
const type_utils_js_1 = require("@aigne/core/utils/type-utils.js");
|
|
16
16
|
const ajv_1 = require("ajv");
|
|
17
|
-
const nanoid_1 = require("nanoid");
|
|
18
17
|
const openai_1 = __importDefault(require("openai"));
|
|
18
|
+
const uuid_1 = require("uuid");
|
|
19
19
|
const zod_1 = require("zod");
|
|
20
20
|
const CHAT_MODEL_OPENAI_DEFAULT_MODEL = "gpt-4o-mini";
|
|
21
21
|
const OPENAI_CHAT_MODEL_CAPABILITIES = {
|
|
@@ -394,7 +394,7 @@ function jsonSchemaToOpenAIJsonSchema(schema) {
|
|
|
394
394
|
}
|
|
395
395
|
function handleToolCallDelta(toolCalls, call) {
|
|
396
396
|
toolCalls[call.index] ??= {
|
|
397
|
-
id: call.id || (0,
|
|
397
|
+
id: call.id || (0, uuid_1.v7)(),
|
|
398
398
|
type: "function",
|
|
399
399
|
function: { name: "", arguments: {} },
|
|
400
400
|
args: "",
|
|
@@ -409,7 +409,7 @@ function handleToolCallDelta(toolCalls, call) {
|
|
|
409
409
|
}
|
|
410
410
|
function handleCompleteToolCall(toolCalls, call) {
|
|
411
411
|
toolCalls.push({
|
|
412
|
-
id: call.id || (0,
|
|
412
|
+
id: call.id || (0, uuid_1.v7)(),
|
|
413
413
|
type: "function",
|
|
414
414
|
function: {
|
|
415
415
|
name: call.function?.name || "",
|
|
@@ -5,8 +5,8 @@ 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
7
|
import { Ajv } from "ajv";
|
|
8
|
-
import { nanoid } from "nanoid";
|
|
9
8
|
import OpenAI from "openai";
|
|
9
|
+
import { v7 } from "uuid";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
const CHAT_MODEL_OPENAI_DEFAULT_MODEL = "gpt-4o-mini";
|
|
12
12
|
const OPENAI_CHAT_MODEL_CAPABILITIES = {
|
|
@@ -384,7 +384,7 @@ export function jsonSchemaToOpenAIJsonSchema(schema) {
|
|
|
384
384
|
}
|
|
385
385
|
function handleToolCallDelta(toolCalls, call) {
|
|
386
386
|
toolCalls[call.index] ??= {
|
|
387
|
-
id: call.id ||
|
|
387
|
+
id: call.id || v7(),
|
|
388
388
|
type: "function",
|
|
389
389
|
function: { name: "", arguments: {} },
|
|
390
390
|
args: "",
|
|
@@ -399,7 +399,7 @@ function handleToolCallDelta(toolCalls, call) {
|
|
|
399
399
|
}
|
|
400
400
|
function handleCompleteToolCall(toolCalls, call) {
|
|
401
401
|
toolCalls.push({
|
|
402
|
-
id: call.id ||
|
|
402
|
+
id: call.id || v7(),
|
|
403
403
|
type: "function",
|
|
404
404
|
function: {
|
|
405
405
|
name: call.function?.name || "",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/openai",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.13",
|
|
4
4
|
"description": "AIGNE OpenAI SDK for integrating with OpenAI's GPT models and API services",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"ajv": "^8.17.1",
|
|
39
|
-
"nanoid": "^5.1.5",
|
|
40
39
|
"openai": "^5.8.3",
|
|
40
|
+
"uuid": "^11.1.0",
|
|
41
41
|
"zod": "^3.25.67",
|
|
42
|
-
"@aigne/core": "^1.
|
|
42
|
+
"@aigne/core": "^1.45.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/bun": "^1.2.18",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"npm-run-all": "^4.1.5",
|
|
48
48
|
"rimraf": "^6.0.1",
|
|
49
49
|
"typescript": "^5.8.3",
|
|
50
|
-
"@aigne/test-utils": "^0.5.
|
|
50
|
+
"@aigne/test-utils": "^0.5.21"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"lint": "tsc --noEmit",
|