@@ -62,17 +62,17 @@ void shouldSetPropertiesWhenBuilderIsCalledWithThoseProperties() {
6262 void shouldSetBaseUrlWhenBuilderIsCalledWithBaseUrlOnly () {
6363 var someUrl = "https://exmaple.org/api" ;
6464 var openAI = SimpleOpenAI .builder ()
65- .baseUrl (someUrl )
66- .build ();
65+ .baseUrl (someUrl )
66+ .build ();
6767 assertEquals (someUrl , openAI .getBaseUrl ());
6868 }
6969
7070 @ Test
7171 void shouldSetBaseUrlWhenBuilderIsCalledWithUrlBaseOnly () {
7272 var someUrl = "https://exmaple.org/api" ;
7373 var openAI = SimpleOpenAI .builder ()
74- .urlBase (someUrl )
75- .build ();
74+ .urlBase (someUrl )
75+ .build ();
7676 assertEquals (someUrl , openAI .getBaseUrl ());
7777 }
7878
@@ -81,16 +81,16 @@ void shouldSetBaseUrlWhenBuilderIsCalledWithBothBaseUrlAndUrlBase() {
8181 var someUrl = "https://exmaple.org/api" ;
8282 var otherUrl = "https://exmaple.org/other-api" ;
8383 var openAI = SimpleOpenAI .builder ()
84- .baseUrl (someUrl )
85- .urlBase (otherUrl )
86- .build ();
84+ .baseUrl (someUrl )
85+ .urlBase (otherUrl )
86+ .build ();
8787 assertEquals (someUrl , openAI .getBaseUrl ());
8888 }
8989
9090 @ Test
9191 void shouldSetDefaultBaseUrlWhenBuilderIsCalledWithoutBaseUrlOrUrlBase () {
9292 var openAI = SimpleOpenAI .builder ()
93- .build ();
93+ .build ();
9494 assertEquals (OPENAI_BASE_URL , openAI .getBaseUrl ());
9595 }
9696
@@ -163,89 +163,89 @@ void init() {
163163 @ Test
164164 void shouldInstanceAudioServiceOnlyOnceWhenItIsCalledSeveralTimes () {
165165 when (cleverClient .create (any ()))
166- .thenReturn (ReflectUtil .createProxy (
167- OpenAI .Audios .class ,
168- new HttpProcessor (null , null , null )));
166+ .thenReturn (ReflectUtil .createProxy (
167+ OpenAI .Audios .class ,
168+ new HttpProcessor (null , null , null )));
169169 repeat (NUMBER_CALLINGS , () -> openAI .audios ());
170170 verify (cleverClient , times (NUMBER_INVOCATIONS )).create (any ());
171171 }
172172
173173 @ Test
174174 void shouldInstanceChatCompletionServiceOnlyOnceWhenItIsCalledSeveralTimes () {
175175 when (cleverClient .create (any ()))
176- .thenReturn (ReflectUtil .createProxy (
177- OpenAI .ChatCompletions .class ,
178- new HttpProcessor (null , null , null )));
176+ .thenReturn (ReflectUtil .createProxy (
177+ OpenAI .ChatCompletions .class ,
178+ new HttpProcessor (null , null , null )));
179179 repeat (NUMBER_CALLINGS , () -> openAI .chatCompletions ());
180180 verify (cleverClient , times (NUMBER_INVOCATIONS )).create (any ());
181181 }
182182
183183 @ Test
184184 void shouldInstanceCompletionServiceOnlyOnceWhenItIsCalledSeveralTimes () {
185185 when (cleverClient .create (any ()))
186- .thenReturn (ReflectUtil .createProxy (
187- OpenAI .Completions .class ,
188- new HttpProcessor (null , null , null )));
186+ .thenReturn (ReflectUtil .createProxy (
187+ OpenAI .Completions .class ,
188+ new HttpProcessor (null , null , null )));
189189 repeat (NUMBER_CALLINGS , () -> openAI .completions ());
190190 verify (cleverClient , times (NUMBER_INVOCATIONS )).create (any ());
191191 }
192192
193193 @ Test
194194 void shouldInstanceEmbeddingServiceOnlyOnceWhenItIsCalledSeveralTimes () {
195195 when (cleverClient .create (any ()))
196- .thenReturn (ReflectUtil .createProxy (
197- OpenAI .Embeddings .class ,
198- new HttpProcessor (null , null , null )));
196+ .thenReturn (ReflectUtil .createProxy (
197+ OpenAI .Embeddings .class ,
198+ new HttpProcessor (null , null , null )));
199199 repeat (NUMBER_CALLINGS , () -> openAI .embeddings ());
200200 verify (cleverClient , times (NUMBER_INVOCATIONS )).create (any ());
201201 }
202202
203203 @ Test
204204 void shouldInstanceFilesServiceOnlyOnceWhenItIsCalledSeveralTimes () {
205205 when (cleverClient .create (any ()))
206- .thenReturn (ReflectUtil .createProxy (
207- OpenAI .Files .class ,
208- new HttpProcessor (null , null , null )));
206+ .thenReturn (ReflectUtil .createProxy (
207+ OpenAI .Files .class ,
208+ new HttpProcessor (null , null , null )));
209209 repeat (NUMBER_CALLINGS , () -> openAI .files ());
210210 verify (cleverClient , times (NUMBER_INVOCATIONS )).create (any ());
211211 }
212212
213213 @ Test
214214 void shouldInstanceFineTunningServiceOnlyOnceWhenItIsCalledSeveralTimes () {
215215 when (cleverClient .create (any ()))
216- .thenReturn (ReflectUtil .createProxy (
217- OpenAI .FineTunings .class ,
218- new HttpProcessor (null , null , null )));
216+ .thenReturn (ReflectUtil .createProxy (
217+ OpenAI .FineTunings .class ,
218+ new HttpProcessor (null , null , null )));
219219 repeat (NUMBER_CALLINGS , () -> openAI .fineTunings ());
220220 verify (cleverClient , times (NUMBER_INVOCATIONS )).create (any ());
221221 }
222222
223223 @ Test
224224 void shouldInstanceImageServiceOnlyOnceWhenItIsCalledSeveralTimes () {
225225 when (cleverClient .create (any ()))
226- .thenReturn (ReflectUtil .createProxy (
227- OpenAI .Images .class ,
228- new HttpProcessor (null , null , null )));
226+ .thenReturn (ReflectUtil .createProxy (
227+ OpenAI .Images .class ,
228+ new HttpProcessor (null , null , null )));
229229 repeat (NUMBER_CALLINGS , () -> openAI .images ());
230230 verify (cleverClient , times (NUMBER_INVOCATIONS )).create (any ());
231231 }
232232
233233 @ Test
234234 void shouldInstanceModelsServiceOnlyOnceWhenItIsCalledSeveralTimes () {
235235 when (cleverClient .create (any ()))
236- .thenReturn (ReflectUtil .createProxy (
237- OpenAI .Models .class ,
238- new HttpProcessor (null , null , null )));
236+ .thenReturn (ReflectUtil .createProxy (
237+ OpenAI .Models .class ,
238+ new HttpProcessor (null , null , null )));
239239 repeat (NUMBER_CALLINGS , () -> openAI .models ());
240240 verify (cleverClient , times (NUMBER_INVOCATIONS )).create (any ());
241241 }
242242
243243 @ Test
244244 void shouldInstanceModerationServiceOnlyOnceWhenItIsCalledSeveralTimes () {
245245 when (cleverClient .create (any ()))
246- .thenReturn (ReflectUtil .createProxy (
247- OpenAI .Moderations .class ,
248- new HttpProcessor (null , null , null )));
246+ .thenReturn (ReflectUtil .createProxy (
247+ OpenAI .Moderations .class ,
248+ new HttpProcessor (null , null , null )));
249249 repeat (NUMBER_CALLINGS , () -> openAI .moderations ());
250250 verify (cleverClient , times (NUMBER_INVOCATIONS )).create (any ());
251251 }
0 commit comments