1
1
import { GenerativeConfigRuntimeType , ModuleConfig } from '../types' ;
2
- import { generativeConfigRuntime } from './config' ;
2
+ import { generativeParameters } from './config' ;
3
3
4
4
// only tests fields that must be mapped from some public name to a gRPC name, e.g. baseURL -> baseUrl and stop: string[] -> stop: TextArray
5
- describe ( 'Unit testing of the generativeConfigRuntime factory methods' , ( ) => {
5
+ describe ( 'Unit testing of the generativeParameters factory methods' , ( ) => {
6
6
describe ( 'anthropic' , ( ) => {
7
7
it ( 'with defaults' , ( ) => {
8
- const config = generativeConfigRuntime . anthropic ( ) ;
8
+ const config = generativeParameters . anthropic ( ) ;
9
9
expect ( config ) . toEqual <
10
10
ModuleConfig < 'generative-anthropic' , GenerativeConfigRuntimeType < 'generative-anthropic' > | undefined >
11
11
> ( {
@@ -14,7 +14,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
14
14
} ) ;
15
15
} ) ;
16
16
it ( 'with values' , ( ) => {
17
- const config = generativeConfigRuntime . anthropic ( {
17
+ const config = generativeParameters . anthropic ( {
18
18
baseURL : 'http://localhost:8080' ,
19
19
stopSequences : [ 'a' , 'b' , 'c' ] ,
20
20
} ) ;
@@ -32,7 +32,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
32
32
33
33
describe ( 'anyscale' , ( ) => {
34
34
it ( 'with defaults' , ( ) => {
35
- const config = generativeConfigRuntime . anyscale ( ) ;
35
+ const config = generativeParameters . anyscale ( ) ;
36
36
expect ( config ) . toEqual <
37
37
ModuleConfig < 'generative-anyscale' , GenerativeConfigRuntimeType < 'generative-anyscale' > | undefined >
38
38
> ( {
@@ -41,7 +41,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
41
41
} ) ;
42
42
} ) ;
43
43
it ( 'with values' , ( ) => {
44
- const config = generativeConfigRuntime . anyscale ( {
44
+ const config = generativeParameters . anyscale ( {
45
45
baseURL : 'http://localhost:8080' ,
46
46
} ) ;
47
47
expect ( config ) . toEqual <
@@ -57,7 +57,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
57
57
58
58
describe ( 'aws' , ( ) => {
59
59
it ( 'with defaults' , ( ) => {
60
- const config = generativeConfigRuntime . aws ( ) ;
60
+ const config = generativeParameters . aws ( ) ;
61
61
expect ( config ) . toEqual <
62
62
ModuleConfig < 'generative-aws' , GenerativeConfigRuntimeType < 'generative-aws' > | undefined >
63
63
> ( {
@@ -69,7 +69,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
69
69
70
70
describe ( 'azure-openai' , ( ) => {
71
71
it ( 'with defaults' , ( ) => {
72
- const config = generativeConfigRuntime . azureOpenAI ( ) ;
72
+ const config = generativeParameters . azureOpenAI ( ) ;
73
73
expect ( config ) . toEqual <
74
74
ModuleConfig < 'generative-azure-openai' , GenerativeConfigRuntimeType < 'generative-azure-openai' > >
75
75
> ( {
@@ -78,7 +78,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
78
78
} ) ;
79
79
} ) ;
80
80
it ( 'with values' , ( ) => {
81
- const config = generativeConfigRuntime . azureOpenAI ( {
81
+ const config = generativeParameters . azureOpenAI ( {
82
82
baseURL : 'http://localhost:8080' ,
83
83
model : 'model' ,
84
84
stop : [ 'a' , 'b' , 'c' ] ,
@@ -99,7 +99,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
99
99
100
100
describe ( 'cohere' , ( ) => {
101
101
it ( 'with defaults' , ( ) => {
102
- const config = generativeConfigRuntime . cohere ( ) ;
102
+ const config = generativeParameters . cohere ( ) ;
103
103
expect ( config ) . toEqual <
104
104
ModuleConfig < 'generative-cohere' , GenerativeConfigRuntimeType < 'generative-cohere' > | undefined >
105
105
> ( {
@@ -108,7 +108,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
108
108
} ) ;
109
109
} ) ;
110
110
it ( 'with values' , ( ) => {
111
- const config = generativeConfigRuntime . cohere ( {
111
+ const config = generativeParameters . cohere ( {
112
112
baseURL : 'http://localhost:8080' ,
113
113
stopSequences : [ 'a' , 'b' , 'c' ] ,
114
114
} ) ;
@@ -126,7 +126,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
126
126
127
127
describe ( 'databricks' , ( ) => {
128
128
it ( 'with defaults' , ( ) => {
129
- const config = generativeConfigRuntime . databricks ( ) ;
129
+ const config = generativeParameters . databricks ( ) ;
130
130
expect ( config ) . toEqual <
131
131
ModuleConfig <
132
132
'generative-databricks' ,
@@ -138,7 +138,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
138
138
} ) ;
139
139
} ) ;
140
140
it ( 'with values' , ( ) => {
141
- const config = generativeConfigRuntime . databricks ( {
141
+ const config = generativeParameters . databricks ( {
142
142
stop : [ 'a' , 'b' , 'c' ] ,
143
143
} ) ;
144
144
expect ( config ) . toEqual <
@@ -157,7 +157,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
157
157
158
158
describe ( 'friendliai' , ( ) => {
159
159
it ( 'with defaults' , ( ) => {
160
- const config = generativeConfigRuntime . friendliai ( ) ;
160
+ const config = generativeParameters . friendliai ( ) ;
161
161
expect ( config ) . toEqual <
162
162
ModuleConfig <
163
163
'generative-friendliai' ,
@@ -169,7 +169,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
169
169
} ) ;
170
170
} ) ;
171
171
it ( 'with values' , ( ) => {
172
- const config = generativeConfigRuntime . friendliai ( {
172
+ const config = generativeParameters . friendliai ( {
173
173
baseURL : 'http://localhost:8080' ,
174
174
} ) ;
175
175
expect ( config ) . toEqual <
@@ -188,7 +188,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
188
188
189
189
describe ( 'mistral' , ( ) => {
190
190
it ( 'with defaults' , ( ) => {
191
- const config = generativeConfigRuntime . mistral ( ) ;
191
+ const config = generativeParameters . mistral ( ) ;
192
192
expect ( config ) . toEqual <
193
193
ModuleConfig < 'generative-mistral' , GenerativeConfigRuntimeType < 'generative-mistral' > | undefined >
194
194
> ( {
@@ -197,7 +197,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
197
197
} ) ;
198
198
} ) ;
199
199
it ( 'with values' , ( ) => {
200
- const config = generativeConfigRuntime . mistral ( {
200
+ const config = generativeParameters . mistral ( {
201
201
baseURL : 'http://localhost:8080' ,
202
202
} ) ;
203
203
expect ( config ) . toEqual <
@@ -213,7 +213,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
213
213
214
214
describe ( 'nvidia' , ( ) => {
215
215
it ( 'with defaults' , ( ) => {
216
- const config = generativeConfigRuntime . nvidia ( ) ;
216
+ const config = generativeParameters . nvidia ( ) ;
217
217
expect ( config ) . toEqual <
218
218
ModuleConfig < 'generative-nvidia' , GenerativeConfigRuntimeType < 'generative-nvidia' > | undefined >
219
219
> ( {
@@ -222,7 +222,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
222
222
} ) ;
223
223
} ) ;
224
224
it ( 'with values' , ( ) => {
225
- const config = generativeConfigRuntime . nvidia ( {
225
+ const config = generativeParameters . nvidia ( {
226
226
baseURL : 'http://localhost:8080' ,
227
227
} ) ;
228
228
expect ( config ) . toEqual <
@@ -238,7 +238,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
238
238
239
239
describe ( 'ollama' , ( ) => {
240
240
it ( 'with defaults' , ( ) => {
241
- const config = generativeConfigRuntime . ollama ( ) ;
241
+ const config = generativeParameters . ollama ( ) ;
242
242
expect ( config ) . toEqual <
243
243
ModuleConfig < 'generative-ollama' , GenerativeConfigRuntimeType < 'generative-ollama' > | undefined >
244
244
> ( {
@@ -250,7 +250,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
250
250
251
251
describe ( 'openai' , ( ) => {
252
252
it ( 'with defaults' , ( ) => {
253
- const config = generativeConfigRuntime . openAI ( ) ;
253
+ const config = generativeParameters . openAI ( ) ;
254
254
expect ( config ) . toEqual <
255
255
ModuleConfig < 'generative-openai' , GenerativeConfigRuntimeType < 'generative-openai' > >
256
256
> ( {
@@ -259,7 +259,7 @@ describe('Unit testing of the generativeConfigRuntime factory methods', () => {
259
259
} ) ;
260
260
} ) ;
261
261
it ( 'with values' , ( ) => {
262
- const config = generativeConfigRuntime . openAI ( {
262
+ const config = generativeParameters . openAI ( {
263
263
baseURL : 'http://localhost:8080' ,
264
264
model : 'model' ,
265
265
stop : [ 'a' , 'b' , 'c' ] ,
0 commit comments