From 727993848991d1fde8412a57d7781bdf4bd71641 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 17:52:03 +0000 Subject: [PATCH] chore(docs): use client instead of package name in Node examples (#106) --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fe2244d..008bcaa 100644 --- a/README.md +++ b/README.md @@ -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 }); @@ -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 }); @@ -121,7 +121,7 @@ You can use the `maxRetries` option to configure or disable this: ```js // Configure the default for all requests: -const groq = new Groq({ +const client = new Groq({ maxRetries: 0, // default is 2 }); @@ -138,7 +138,7 @@ Requests time out after 1 minute by default. You can configure this with a `time ```ts // Configure the default for all requests: -const groq = new Groq({ +const client = new Groq({ timeout: 20 * 1000, // 20 seconds (default is 1 minute) }); @@ -162,7 +162,7 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi ```ts -const groq = new Groq(); +const client = new Groq(); const response = await groq.chat.completions .create({ @@ -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), });