diff --git a/src/core.ts b/src/core.ts index e1a93f272..68f1e676a 100644 --- a/src/core.ts +++ b/src/core.ts @@ -198,7 +198,7 @@ export abstract class APIClient { maxRetries = 2, timeout = 600000, // 10 minutes httpAgent, - fetch: overridenFetch, + fetch: overriddenFetch, }: { baseURL: string; maxRetries?: number | undefined; @@ -211,7 +211,7 @@ export abstract class APIClient { this.timeout = validatePositiveInteger('timeout', timeout); this.httpAgent = httpAgent; - this.fetch = overridenFetch ?? fetch; + this.fetch = overriddenFetch ?? fetch; } protected authHeaders(opts: FinalRequestOptions): Headers { diff --git a/tests/index.test.ts b/tests/index.test.ts index f39571121..bf113e7bb 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -177,7 +177,7 @@ describe('instantiate client', () => { expect(client.apiKey).toBe('My API Key'); }); - test('with overriden environment variable arguments', () => { + test('with overridden environment variable arguments', () => { // set options via env var process.env['OPENAI_API_KEY'] = 'another My API Key'; const client = new OpenAI({ apiKey: 'My API Key' });