@artemiskit/adapter-anthropic 0.1.2 → 0.1.4
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 +22 -0
- package/README.md +96 -0
- package/package.json +4 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @artemiskit/adapter-anthropic
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 367eb3b: fix: resolve npm install error caused by workspace:\* protocol
|
|
8
|
+
|
|
9
|
+
Fixed an issue where `npm i -g @artemiskit/cli` would fail with
|
|
10
|
+
"Unsupported URL Type workspace:_" error. The publish workflow now
|
|
11
|
+
automatically replaces workspace:_ dependencies with actual version
|
|
12
|
+
numbers before publishing to npm.
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [367eb3b]
|
|
15
|
+
- @artemiskit/core@0.1.4
|
|
16
|
+
|
|
17
|
+
## 0.1.3
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 11ac4a7: Updated Package Documentations
|
|
22
|
+
- Updated dependencies [11ac4a7]
|
|
23
|
+
- @artemiskit/core@0.1.3
|
|
24
|
+
|
|
3
25
|
## 0.1.2
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# @artemiskit/adapter-anthropic
|
|
2
|
+
|
|
3
|
+
Anthropic Claude adapter for ArtemisKit LLM evaluation toolkit.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @artemiskit/adapter-anthropic
|
|
9
|
+
# or
|
|
10
|
+
bun add @artemiskit/adapter-anthropic
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
This adapter provides connectivity to Anthropic's Claude models via the Anthropic API.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
### With CLI
|
|
20
|
+
|
|
21
|
+
Configure in `artemis.config.yaml`:
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
provider: anthropic
|
|
25
|
+
model: claude-sonnet-4-5-20241022
|
|
26
|
+
|
|
27
|
+
providers:
|
|
28
|
+
anthropic:
|
|
29
|
+
apiKey: ${ANTHROPIC_API_KEY}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Then run:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
artemiskit run my-scenario.yaml --provider anthropic
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Programmatic
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { AnthropicAdapter } from '@artemiskit/adapter-anthropic';
|
|
42
|
+
|
|
43
|
+
const adapter = new AnthropicAdapter({
|
|
44
|
+
provider: 'anthropic',
|
|
45
|
+
apiKey: process.env.ANTHROPIC_API_KEY,
|
|
46
|
+
defaultModel: 'claude-sonnet-4-5-20241022',
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const result = await adapter.generate({
|
|
50
|
+
prompt: 'Hello, how are you?',
|
|
51
|
+
model: 'claude-sonnet-4-5-20241022',
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
console.log(result.text);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Configuration Options
|
|
58
|
+
|
|
59
|
+
| Option | Type | Required | Description |
|
|
60
|
+
|--------|------|----------|-------------|
|
|
61
|
+
| `provider` | `'anthropic'` | Yes | Provider identifier |
|
|
62
|
+
| `apiKey` | `string` | No | Anthropic API key (or use ANTHROPIC_API_KEY env var) |
|
|
63
|
+
| `defaultModel` | `string` | No | Default model to use |
|
|
64
|
+
| `baseUrl` | `string` | No | Custom API base URL |
|
|
65
|
+
| `timeout` | `number` | No | Request timeout in ms (default: 60000) |
|
|
66
|
+
| `maxRetries` | `number` | No | Max retry attempts (default: 2) |
|
|
67
|
+
|
|
68
|
+
## Environment Variables
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
ANTHROPIC_API_KEY=sk-ant-...
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Supported Models
|
|
75
|
+
|
|
76
|
+
| Model | Description |
|
|
77
|
+
|-------|-------------|
|
|
78
|
+
| `claude-opus-4-5-20241101` | Most intelligent, flagship model |
|
|
79
|
+
| `claude-sonnet-4-5-20241022` | Balanced performance, recommended for most use cases |
|
|
80
|
+
| `claude-haiku-4-5-20241022` | Fast and efficient |
|
|
81
|
+
| `claude-opus-4-1-20250414` | Opus 4.1 - strong coding and agent capabilities |
|
|
82
|
+
| `claude-sonnet-4-1-20250414` | Sonnet 4.1 |
|
|
83
|
+
| `claude-haiku-4-1-20250414` | Haiku 4.1 |
|
|
84
|
+
|
|
85
|
+
Note: Claude 3 Opus and Claude 3 Sonnet have been deprecated. Migrate to Claude 4.x models.
|
|
86
|
+
|
|
87
|
+
## Related Packages
|
|
88
|
+
|
|
89
|
+
- [`@artemiskit/cli`](https://www.npmjs.com/package/@artemiskit/cli) - Command-line interface
|
|
90
|
+
- [`@artemiskit/core`](https://www.npmjs.com/package/@artemiskit/core) - Core runtime
|
|
91
|
+
- [`@artemiskit/adapter-openai`](https://www.npmjs.com/package/@artemiskit/adapter-openai) - OpenAI adapter
|
|
92
|
+
- [`@artemiskit/adapter-vercel-ai`](https://www.npmjs.com/package/@artemiskit/adapter-vercel-ai) - Vercel AI SDK adapter
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
Apache-2.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artemiskit/adapter-anthropic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Anthropic Claude adapter for ArtemisKit LLM evaluation toolkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -13,13 +13,8 @@
|
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/code-sensei/artemiskit/issues"
|
|
15
15
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"anthropic",
|
|
19
|
-
"claude",
|
|
20
|
-
"adapter",
|
|
21
|
-
"artemiskit"
|
|
22
|
-
],
|
|
16
|
+
"homepage": "https://artemiskit.vercel.app",
|
|
17
|
+
"keywords": ["llm", "anthropic", "claude", "adapter", "artemiskit"],
|
|
23
18
|
"main": "./dist/index.js",
|
|
24
19
|
"types": "./dist/index.d.ts",
|
|
25
20
|
"exports": {
|
|
@@ -35,7 +30,7 @@
|
|
|
35
30
|
"test": "bun test"
|
|
36
31
|
},
|
|
37
32
|
"dependencies": {
|
|
38
|
-
"@artemiskit/core": "
|
|
33
|
+
"@artemiskit/core": "0.1.4",
|
|
39
34
|
"@anthropic-ai/sdk": "^0.30.0",
|
|
40
35
|
"nanoid": "^5.0.0"
|
|
41
36
|
},
|