@anthropic-ai/sdk 0.16.0 → 0.16.1

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,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.1 (2024-03-04)
4
+
5
+ Full Changelog: [sdk-v0.16.0...sdk-v0.16.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.16.0...sdk-v0.16.1)
6
+
7
+ ### Chores
8
+
9
+ * fix error handler in readme ([#307](https://github.com/anthropics/anthropic-sdk-typescript/issues/307)) ([5007a1e](https://github.com/anthropics/anthropic-sdk-typescript/commit/5007a1e71907648ea44e1663f5b7f71bb20d001d))
10
+
11
+
12
+ ### Documentation
13
+
14
+ * **readme:** reference bedrock sdk ([#309](https://github.com/anthropics/anthropic-sdk-typescript/issues/309)) ([0fd0416](https://github.com/anthropics/anthropic-sdk-typescript/commit/0fd041617eca18dd506efffe5a4e2505dd1aa004))
15
+
3
16
  ## 0.16.0 (2024-03-04)
4
17
 
5
18
  Full Changelog: [sdk-v0.15.0...sdk-v0.16.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.15.0...sdk-v0.16.0)
package/README.md CHANGED
@@ -135,6 +135,10 @@ Streaming with `client.messages.stream(...)` exposes [various helpers for your c
135
135
 
136
136
  Alternatively, you can use `client.messages.create({ ..., stream: true })` which only returns an async iterable of the events in the stream and thus uses less memory (it does not build up a final message object for you).
137
137
 
138
+ ## AWS Bedrock
139
+
140
+ We provide support for the [Anthropic Bedrock API](https://aws.amazon.com/bedrock/claude/) through a [separate package](https://github.com/anthropics/anthropic-sdk-typescript/tree/main/packages/bedrock-sdk).
141
+
138
142
  ## Handling errors
139
143
 
140
144
  When the library is unable to connect to the API,
@@ -150,7 +154,7 @@ async function main() {
150
154
  messages: [{ role: 'user', content: 'Hello, Claude' }],
151
155
  model: 'claude-3-opus-20240229',
152
156
  })
153
- .catch((err) => {
157
+ .catch(async (err) => {
154
158
  if (err instanceof Anthropic.APIError) {
155
159
  console.log(err.status); // 400
156
160
  console.log(err.name); // BadRequestError
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/sdk",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "The official TypeScript library for the Anthropic API",
5
5
  "author": "Anthropic <support@anthropic.com>",
6
6
  "types": "./index.d.ts",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.16.0'; // x-release-please-version
1
+ export const VERSION = '0.16.1'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.16.0";
1
+ export declare const VERSION = "0.16.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.16.0'; // x-release-please-version
4
+ exports.VERSION = '0.16.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.16.0'; // x-release-please-version
1
+ export const VERSION = '0.16.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map