@aigne/anthropic 0.12.0 → 0.12.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,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.12.2](https://github.com/AIGNE-io/aigne-framework/compare/anthropic-v0.12.1...anthropic-v0.12.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
|
+
|
|
19
|
+
## [0.12.1](https://github.com/AIGNE-io/aigne-framework/compare/anthropic-v0.12.0...anthropic-v0.12.1) (2025-09-05)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Dependencies
|
|
23
|
+
|
|
24
|
+
* The following workspace dependencies were updated
|
|
25
|
+
* dependencies
|
|
26
|
+
* @aigne/core bumped to 1.58.1
|
|
27
|
+
* devDependencies
|
|
28
|
+
* @aigne/test-utils bumped to 0.5.45
|
|
29
|
+
|
|
3
30
|
## [0.12.0](https://github.com/AIGNE-io/aigne-framework/compare/anthropic-v0.11.17...anthropic-v0.12.0) (2025-09-05)
|
|
4
31
|
|
|
5
32
|
|
|
@@ -10,7 +10,6 @@ const logger_js_1 = require("@aigne/core/utils/logger.js");
|
|
|
10
10
|
const model_utils_js_1 = require("@aigne/core/utils/model-utils.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 sdk_1 = __importDefault(require("@anthropic-ai/sdk"));
|
|
15
14
|
const ajv_1 = require("ajv");
|
|
16
15
|
const zod_1 = require("zod");
|
|
@@ -342,14 +341,7 @@ async function convertContent(content) {
|
|
|
342
341
|
source: { type: "base64", data: item.data, media_type },
|
|
343
342
|
};
|
|
344
343
|
case "local":
|
|
345
|
-
|
|
346
|
-
type: "image",
|
|
347
|
-
source: {
|
|
348
|
-
type: "base64",
|
|
349
|
-
data: await index_js_1.nodejs.fs.readFile(item.path, "base64"),
|
|
350
|
-
media_type,
|
|
351
|
-
},
|
|
352
|
-
};
|
|
344
|
+
throw new Error(`Unsupported local file: ${item.path}, it should be converted to base64 at ChatModel`);
|
|
353
345
|
}
|
|
354
346
|
}));
|
|
355
347
|
}
|
|
@@ -4,7 +4,6 @@ import { logger } from "@aigne/core/utils/logger.js";
|
|
|
4
4
|
import { mergeUsage } from "@aigne/core/utils/model-utils.js";
|
|
5
5
|
import { agentResponseStreamToObject } from "@aigne/core/utils/stream-utils.js";
|
|
6
6
|
import { checkArguments, isEmpty, isNonNullable, } from "@aigne/core/utils/type-utils.js";
|
|
7
|
-
import { nodejs } from "@aigne/platform-helpers/nodejs/index.js";
|
|
8
7
|
import Anthropic from "@anthropic-ai/sdk";
|
|
9
8
|
import { Ajv } from "ajv";
|
|
10
9
|
import { z } from "zod";
|
|
@@ -335,14 +334,7 @@ async function convertContent(content) {
|
|
|
335
334
|
source: { type: "base64", data: item.data, media_type },
|
|
336
335
|
};
|
|
337
336
|
case "local":
|
|
338
|
-
|
|
339
|
-
type: "image",
|
|
340
|
-
source: {
|
|
341
|
-
type: "base64",
|
|
342
|
-
data: await nodejs.fs.readFile(item.path, "base64"),
|
|
343
|
-
media_type,
|
|
344
|
-
},
|
|
345
|
-
};
|
|
337
|
+
throw new Error(`Unsupported local file: ${item.path}, it should be converted to base64 at ChatModel`);
|
|
346
338
|
}
|
|
347
339
|
}));
|
|
348
340
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/anthropic",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "AIGNE Anthropic SDK for integrating with Claude AI models",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@anthropic-ai/sdk": "^0.56.0",
|
|
39
39
|
"ajv": "^8.17.1",
|
|
40
40
|
"zod": "^3.25.67",
|
|
41
|
-
"@aigne/core": "^1.58.
|
|
41
|
+
"@aigne/core": "^1.58.2",
|
|
42
42
|
"@aigne/platform-helpers": "^0.6.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
@@ -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.46"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"lint": "tsc --noEmit",
|