Skip to content

Commit 4d899d9

Browse files
chore(docs): use client instead of package name in Node examples (#469)
1 parent 879d9da commit 4d899d9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The full API of this library can be found in [api.md](api.md).
2020
```js
2121
import Anthropic from '@anthropic-ai/sdk';
2222

23-
const anthropic = new Anthropic({
23+
const client = new Anthropic({
2424
apiKey: process.env['ANTHROPIC_API_KEY'], // This is the default and can be omitted
2525
});
2626

@@ -44,7 +44,7 @@ We provide support for streaming responses using Server Sent Events (SSE).
4444
```ts
4545
import Anthropic from '@anthropic-ai/sdk';
4646

47-
const anthropic = new Anthropic();
47+
const client = new Anthropic();
4848

4949
const stream = await anthropic.messages.create({
5050
max_tokens: 1024,
@@ -68,7 +68,7 @@ This library includes TypeScript definitions for all request params and response
6868
```ts
6969
import Anthropic from '@anthropic-ai/sdk';
7070

71-
const anthropic = new Anthropic({
71+
const client = new Anthropic({
7272
apiKey: process.env['ANTHROPIC_API_KEY'], // This is the default and can be omitted
7373
});
7474

@@ -193,7 +193,7 @@ You can use the `maxRetries` option to configure or disable this:
193193
<!-- prettier-ignore -->
194194
```js
195195
// Configure the default for all requests:
196-
const anthropic = new Anthropic({
196+
const client = new Anthropic({
197197
maxRetries: 0, // default is 2
198198
});
199199

@@ -210,7 +210,7 @@ Requests time out after 10 minutes by default. You can configure this with a `ti
210210
<!-- prettier-ignore -->
211211
```ts
212212
// Configure the default for all requests:
213-
const anthropic = new Anthropic({
213+
const client = new Anthropic({
214214
timeout: 20 * 1000, // 20 seconds (default is 10 minutes)
215215
});
216216

@@ -235,7 +235,7 @@ Be aware that doing so may result in incorrect types and other unexpected or und
235235
```ts
236236
import Anthropic from '@anthropic-ai/sdk';
237237

238-
const anthropic = new Anthropic();
238+
const client = new Anthropic();
239239

240240
const message = await anthropic.messages.create(
241241
{
@@ -257,7 +257,7 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi
257257

258258
<!-- prettier-ignore -->
259259
```ts
260-
const anthropic = new Anthropic();
260+
const client = new Anthropic();
261261

262262
const response = await anthropic.messages
263263
.create({
@@ -376,7 +376,7 @@ import http from 'http';
376376
import { HttpsProxyAgent } from 'https-proxy-agent';
377377

378378
// Configure the default for all requests:
379-
const anthropic = new Anthropic({
379+
const client = new Anthropic({
380380
httpAgent: new HttpsProxyAgent(process.env.PROXY_URL),
381381
});
382382

0 commit comments

Comments
 (0)