Skip to content

Commit

Permalink
chore(docs): use client instead of package name in Node examples (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jul 26, 2024
1 parent 7b53f7c commit 7279938
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The full API of this library can be found in [api.md](api.md).
```js
import Groq from 'groq-sdk';

const groq = new Groq({
const client = new Groq({
apiKey: process.env['GROQ_API_KEY'], // This is the default and can be omitted
});

Expand All @@ -46,7 +46,7 @@ This library includes TypeScript definitions for all request params and response
```ts
import Groq from 'groq-sdk';

const groq = new Groq({
const client = new Groq({
apiKey: process.env['GROQ_API_KEY'], // This is the default and can be omitted
});

Expand Down Expand Up @@ -121,7 +121,7 @@ You can use the `maxRetries` option to configure or disable this:
<!-- prettier-ignore -->
```js
// Configure the default for all requests:
const groq = new Groq({
const client = new Groq({
maxRetries: 0, // default is 2
});

Expand All @@ -138,7 +138,7 @@ Requests time out after 1 minute by default. You can configure this with a `time
<!-- prettier-ignore -->
```ts
// Configure the default for all requests:
const groq = new Groq({
const client = new Groq({
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
});

Expand All @@ -162,7 +162,7 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi

<!-- prettier-ignore -->
```ts
const groq = new Groq();
const client = new Groq();

const response = await groq.chat.completions
.create({
Expand Down Expand Up @@ -285,7 +285,7 @@ import http from 'http';
import { HttpsProxyAgent } from 'https-proxy-agent';

// Configure the default for all requests:
const groq = new Groq({
const client = new Groq({
httpAgent: new HttpsProxyAgent(process.env.PROXY_URL),
});

Expand Down

0 comments on commit 7279938

Please sign in to comment.