diff --git a/README.md b/README.md index 97b615de..e4fc0e7e 100644 --- a/README.md +++ b/README.md @@ -326,18 +326,24 @@ If you would like to disable or customize this behavior, for example to use the ```ts import http from 'http'; -import HttpsProxyAgent from 'https-proxy-agent'; +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({ max_tokens: 1024, messages: [{ role: 'user', content: 'Hello, Claude' }], model: 'claude-3-opus-20240229' }, { - baseURL: 'http://localhost:8080/test-api', - httpAgent: new http.Agent({ keepAlive: false }), -}) +await anthropic.messages.create({ + max_tokens: 1024, + messages: [{ role: 'user', content: 'Hello, Claude' }], + model: 'claude-3-opus-20240229' + }, + { + httpAgent: new http.Agent({ keepAlive: false }), + } +) ``` ## Semantic Versioning