@aigne/core 1.57.4 → 1.57.5
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 +7 -0
- package/lib/cjs/agents/chat-model.js +34 -5
- package/lib/esm/agents/chat-model.js +1 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.57.5](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.57.4...core-v1.57.5) (2025-09-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **core:** replace static import with dynamic import for CommonJS compatibility ([#448](https://github.com/AIGNE-io/aigne-framework/issues/448)) ([6db1e57](https://github.com/AIGNE-io/aigne-framework/commit/6db1e570858fff32f7352143585b98e900f1f71d))
|
|
9
|
+
|
|
3
10
|
## [1.57.4](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.57.3...core-v1.57.4) (2025-08-30)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,17 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
5
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
36
|
exports.chatModelOutputUsageSchema = exports.ChatModel = exports.StructuredOutputError = void 0;
|
|
7
37
|
const ajv_1 = require("ajv");
|
|
8
|
-
const is_network_error_1 = __importDefault(require("is-network-error"));
|
|
9
38
|
const zod_1 = require("zod");
|
|
10
39
|
const type_utils_js_1 = require("../utils/type-utils.js");
|
|
11
40
|
const agent_js_1 = require("./agent.js");
|
|
12
41
|
const CHAT_MODEL_DEFAULT_RETRY_OPTIONS = {
|
|
13
42
|
retries: 3,
|
|
14
|
-
shouldRetry: (error) => error instanceof StructuredOutputError || (
|
|
43
|
+
shouldRetry: async (error) => error instanceof StructuredOutputError || (await Promise.resolve().then(() => __importStar(require("is-network-error")))).default(error),
|
|
15
44
|
};
|
|
16
45
|
class StructuredOutputError extends Error {
|
|
17
46
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Ajv } from "ajv";
|
|
2
|
-
import isNetworkError from "is-network-error";
|
|
3
2
|
import { z } from "zod";
|
|
4
3
|
import { checkArguments } from "../utils/type-utils.js";
|
|
5
4
|
import { Agent, agentOptionsSchema, } from "./agent.js";
|
|
6
5
|
const CHAT_MODEL_DEFAULT_RETRY_OPTIONS = {
|
|
7
6
|
retries: 3,
|
|
8
|
-
shouldRetry: (error) => error instanceof StructuredOutputError ||
|
|
7
|
+
shouldRetry: async (error) => error instanceof StructuredOutputError || (await import("is-network-error")).default(error),
|
|
9
8
|
};
|
|
10
9
|
export class StructuredOutputError extends Error {
|
|
11
10
|
}
|