File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,27 +4,27 @@ import type { OpenAI } from '../index';
44class 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
1818class 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}
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments