File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ export class AI21 extends Core.APIClient {
10
10
private _options : AI21Options ;
11
11
12
12
constructor (
13
- apiKey : string = process . env . AI21_API_KEY || '' ,
14
- baseURL : string = process . env . AI21_BASE_URL || 'https://api.ai21.com/studio/v1' ,
15
- via : string | null ,
13
+ apiKey : string = process . env . AI21_API_KEY ?? '' ,
14
+ baseURL : string = process . env . AI21_BASE_URL ?? 'https://api.ai21.com/studio/v1' ,
15
+ via : string | null = null ,
16
16
) {
17
17
const options : AI21Options = {
18
18
apiKey,
@@ -26,7 +26,7 @@ export class AI21 extends Core.APIClient {
26
26
apiKey,
27
27
options : { }
28
28
} ) ;
29
-
29
+ this . apiKey = apiKey
30
30
this . _options = options ;
31
31
}
32
32
@@ -45,7 +45,7 @@ export class AI21 extends Core.APIClient {
45
45
46
46
protected override getUserAgent ( ) : string {
47
47
let userAgent = super . getUserAgent ( ) ;
48
-
48
+
49
49
if ( this . _options . via ) {
50
50
userAgent += ` via ${ this . _options . via } ` ;
51
51
}
You can’t perform that action at this time.
0 commit comments