@@ -22,7 +22,7 @@ The full API of this library can be found in [api.md](api.md).
2222``` js
2323import PromptFoundry from ' @prompt-foundry/typescript-sdk' ;
2424
25- const promptFoundry = new PromptFoundry ({
25+ const client = new PromptFoundry ({
2626 apiKey: process .env [' PROMPT_FOUNDRY_API_KEY' ], // This is the default and can be omitted
2727});
2828
@@ -45,7 +45,7 @@ This library includes TypeScript definitions for all request params and response
4545``` ts
4646import PromptFoundry from ' @prompt-foundry/typescript-sdk' ;
4747
48- const promptFoundry = new PromptFoundry ({
48+ const client = new PromptFoundry ({
4949 apiKey: process .env [' PROMPT_FOUNDRY_API_KEY' ], // This is the default and can be omitted
5050});
5151
@@ -105,7 +105,7 @@ You can use the `maxRetries` option to configure or disable this:
105105<!-- prettier-ignore -->
106106``` js
107107// Configure the default for all requests:
108- const promptFoundry = new PromptFoundry ({
108+ const client = new PromptFoundry ({
109109 maxRetries: 0 , // default is 2
110110});
111111
@@ -122,7 +122,7 @@ Requests time out after 1 minute by default. You can configure this with a `time
122122<!-- prettier-ignore -->
123123``` ts
124124// Configure the default for all requests:
125- const promptFoundry = new PromptFoundry ({
125+ const client = new PromptFoundry ({
126126 timeout: 20 * 1000 , // 20 seconds (default is 1 minute)
127127});
128128
@@ -146,7 +146,7 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi
146146
147147<!-- prettier-ignore -->
148148``` ts
149- const promptFoundry = new PromptFoundry ();
149+ const client = new PromptFoundry ();
150150
151151const response = await promptFoundry .prompts .getParameters (' 1212121' ).asResponse ();
152152console .log (response .headers .get (' X-My-Header' ));
@@ -255,7 +255,7 @@ import http from 'http';
255255import { HttpsProxyAgent } from ' https-proxy-agent' ;
256256
257257// Configure the default for all requests:
258- const promptFoundry = new PromptFoundry ({
258+ const client = new PromptFoundry ({
259259 httpAgent: new HttpsProxyAgent (process .env .PROXY_URL ),
260260});
261261
0 commit comments