Skip to content

Commit

Permalink
docs(readme): fix https proxy example (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Mar 6, 2024
1 parent 165f1d8 commit 2161c86
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,19 +331,19 @@ import { HttpsProxyAgent } from 'https-proxy-agent';
// Configure the default for all requests:
const anthropic = new Anthropic({
httpAgent: new HttpsProxyAgent(process.env.PROXY_URL),
baseURL: 'http://localhost:8080/test-api',
});

// Override per-request:
await anthropic.messages.create({
await anthropic.messages.create(
{
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, Claude' }],
model: 'claude-3-opus-20240229'
model: 'claude-3-opus-20240229',
},
{
httpAgent: new http.Agent({ keepAlive: false }),
}
)
},
);
```

## Semantic Versioning
Expand Down

0 comments on commit 2161c86

Please sign in to comment.