Skip to content

Commit 73e5840

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#21)
1 parent 44e6687 commit 73e5840

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class PromptFoundry extends Core.APIClient {
7979
* API Client for interfacing with the Prompt Foundry API.
8080
*
8181
* @param {string | undefined} [opts.apiKey=process.env['PROMPT_FOUNDRY_API_KEY'] ?? undefined]
82-
* @param {string} [opts.baseURL=process.env['PROMPT_FOUNDRY_BASE_URL'] ?? https://api.promptfoundry.ai/sdk/v1] - Override the default base URL for the API.
82+
* @param {string} [opts.baseURL=process.env['PROMPT_FOUNDRY_BASE_URL'] ?? https://api.promptfoundry.ai] - Override the default base URL for the API.
8383
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
8484
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
8585
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
@@ -101,7 +101,7 @@ export class PromptFoundry extends Core.APIClient {
101101
const options: ClientOptions = {
102102
apiKey,
103103
...opts,
104-
baseURL: baseURL || `https://api.promptfoundry.ai/sdk/v1`,
104+
baseURL: baseURL || `https://api.promptfoundry.ai`,
105105
};
106106

107107
if (Core.isRunningInBrowser()) {

tests/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@ describe('instantiate client', () => {
157157
test('empty env variable', () => {
158158
process.env['PROMPT_FOUNDRY_BASE_URL'] = ''; // empty
159159
const client = new PromptFoundry({ apiKey: 'My API Key' });
160-
expect(client.baseURL).toEqual('https://api.promptfoundry.ai/sdk/v1');
160+
expect(client.baseURL).toEqual('https://api.promptfoundry.ai');
161161
});
162162

163163
test('blank env variable', () => {
164164
process.env['PROMPT_FOUNDRY_BASE_URL'] = ' '; // blank
165165
const client = new PromptFoundry({ apiKey: 'My API Key' });
166-
expect(client.baseURL).toEqual('https://api.promptfoundry.ai/sdk/v1');
166+
expect(client.baseURL).toEqual('https://api.promptfoundry.ai');
167167
});
168168
});
169169

0 commit comments

Comments
 (0)