Skip to content

Commit 5f120e7

Browse files
committed
edit
1 parent 13cdd27 commit 5f120e7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/azure/audio.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ import type { OpenAI } from '../index';
44
class AzureTranslation extends Translations {
55
constructor(
66
client: OpenAI,
7-
private deployments: string[],
7+
private _deployments: string[],
88
) {
99
super(client);
1010
}
1111
// @ts-ignore we don't want to redeclare all the method signatures
1212
override create(...args: Parameters<Translations['create']>): ReturnType<Translations['create']> {
13-
this.deployments.push(args[0].model);
13+
this._deployments.push(args[0].model);
1414
return super.create(args[0], args[1]);
1515
}
1616
}
1717

1818
class AzureTranscription extends Transcriptions {
1919
constructor(
2020
client: OpenAI,
21-
private deployments: string[],
21+
private _deployments: string[],
2222
) {
2323
super(client);
2424
}
2525
// @ts-ignore we don't want to redeclare all the method signatures
2626
override create(...args: Parameters<Transcriptions['create']>): ReturnType<Transcriptions['create']> {
27-
this.deployments.push(args[0].model);
27+
this._deployments.push(args[0].model);
2828
return super.create(args[0], args[1]);
2929
}
3030
}

tests/lib/azure.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ describe('azure request building', () => {
501501
file: { url: 'https://example.com', blob: () => 0 as any },
502502
})) as any;
503503
expect(url).toStrictEqual(
504-
`https://example.com/openai/deployments/deployment/audio/translations?api-version=${apiVersion}`,
504+
`https://example.com/openai/deployments/${deployment}/audio/translations?api-version=${apiVersion}`,
505505
);
506506
});
507507

@@ -511,7 +511,7 @@ describe('azure request building', () => {
511511
file: { url: 'https://example.com', blob: () => 0 as any },
512512
})) as any;
513513
expect(url).toStrictEqual(
514-
`https://example.com/openai/deployments/deployment/audio/transcriptions?api-version=${apiVersion}`,
514+
`https://example.com/openai/deployments/${deployment}/audio/transcriptions?api-version=${apiVersion}`,
515515
);
516516
});
517517

0 commit comments

Comments
 (0)