@@ -150,7 +150,7 @@ void testCustomizableApi(ChatCompletionModel model) throws Exception {
150
150
void testTools (ChatCompletionModel model ) throws Exception {
151
151
152
152
// given
153
- UserMessage userMessage = UserMessage .from ("What is the weather in Boston?" );
153
+ UserMessage userMessage = UserMessage .from ("What is the weather in Boston in Celsius ?" );
154
154
155
155
ChatCompletionRequest request = ChatCompletionRequest .builder ()
156
156
.model (model )
@@ -167,7 +167,7 @@ void testTools(ChatCompletionModel model) throws Exception {
167
167
client .chatCompletion (request )
168
168
.onPartialResponse (partialResponse -> {
169
169
Delta delta = partialResponse .choices ().get (0 ).delta ();
170
- assertThat (delta .content ()).isNull ();
170
+ assertThat (delta .content ()).isNullOrEmpty ();
171
171
assertThat (delta .functionCall ()).isNull ();
172
172
173
173
if (delta .toolCalls () != null ) {
@@ -265,7 +265,7 @@ void testTools(ChatCompletionModel model) throws Exception {
265
265
void testFunctions (ChatCompletionModel model ) throws Exception {
266
266
267
267
// given
268
- UserMessage userMessage = UserMessage .from ("What is the weather in Boston?" );
268
+ UserMessage userMessage = UserMessage .from ("What is the weather in Boston in Celsius ?" );
269
269
270
270
ChatCompletionRequest request = ChatCompletionRequest .builder ()
271
271
.model (model )
@@ -281,7 +281,7 @@ void testFunctions(ChatCompletionModel model) throws Exception {
281
281
client .chatCompletion (request )
282
282
.onPartialResponse (partialResponse -> {
283
283
Delta delta = partialResponse .choices ().get (0 ).delta ();
284
- assertThat (delta .content ()).isNull ();
284
+ assertThat (delta .content ()).isNullOrEmpty ();
285
285
assertThat (delta .toolCalls ()).isNull ();
286
286
287
287
if (delta .functionCall () != null ) {
@@ -359,7 +359,7 @@ void testFunctions(ChatCompletionModel model) throws Exception {
359
359
void testToolChoice (ChatCompletionModel model ) throws Exception {
360
360
361
361
// given
362
- UserMessage userMessage = UserMessage .from ("What is the weather in Boston?" );
362
+ UserMessage userMessage = UserMessage .from ("What is the weather in Boston in Celsius ?" );
363
363
364
364
ChatCompletionRequest request = ChatCompletionRequest .builder ()
365
365
.model (model )
@@ -474,7 +474,7 @@ void testToolChoice(ChatCompletionModel model) throws Exception {
474
474
void testFunctionChoice (ChatCompletionModel model ) throws Exception {
475
475
476
476
// given
477
- UserMessage userMessage = UserMessage .from ("What is the weather in Boston?" );
477
+ UserMessage userMessage = UserMessage .from ("What is the weather in Boston in Celsius ?" );
478
478
479
479
ChatCompletionRequest request = ChatCompletionRequest .builder ()
480
480
.model (model )
0 commit comments