diff --git a/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionAsyncTest.java b/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionAsyncTest.java index 20caf75..3d4a516 100644 --- a/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionAsyncTest.java +++ b/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionAsyncTest.java @@ -96,7 +96,7 @@ void testCustomizableApi(ChatCompletionModel model) throws Exception { void testTools(ChatCompletionModel model) throws Exception { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model) @@ -158,7 +158,7 @@ void testTools(ChatCompletionModel model) throws Exception { void testFunctions(ChatCompletionModel model) throws Exception { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model) @@ -214,7 +214,7 @@ void testFunctions(ChatCompletionModel model) throws Exception { void testToolChoice(ChatCompletionModel model) throws Exception { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model) @@ -276,7 +276,7 @@ void testToolChoice(ChatCompletionModel model) throws Exception { void testFunctionChoice(ChatCompletionModel model) throws Exception { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model) diff --git a/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionStreamingTest.java b/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionStreamingTest.java index 1aac441..7c29bca 100644 --- a/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionStreamingTest.java +++ b/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionStreamingTest.java @@ -150,7 +150,7 @@ void testCustomizableApi(ChatCompletionModel model) throws Exception { void testTools(ChatCompletionModel model) throws Exception { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model) @@ -167,7 +167,7 @@ void testTools(ChatCompletionModel model) throws Exception { client.chatCompletion(request) .onPartialResponse(partialResponse -> { Delta delta = partialResponse.choices().get(0).delta(); - assertThat(delta.content()).isNull(); + assertThat(delta.content()).isNullOrEmpty(); assertThat(delta.functionCall()).isNull(); if (delta.toolCalls() != null) { @@ -265,7 +265,7 @@ void testTools(ChatCompletionModel model) throws Exception { void testFunctions(ChatCompletionModel model) throws Exception { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model) @@ -281,7 +281,7 @@ void testFunctions(ChatCompletionModel model) throws Exception { client.chatCompletion(request) .onPartialResponse(partialResponse -> { Delta delta = partialResponse.choices().get(0).delta(); - assertThat(delta.content()).isNull(); + assertThat(delta.content()).isNullOrEmpty(); assertThat(delta.toolCalls()).isNull(); if (delta.functionCall() != null) { @@ -359,7 +359,7 @@ void testFunctions(ChatCompletionModel model) throws Exception { void testToolChoice(ChatCompletionModel model) throws Exception { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model) @@ -474,7 +474,7 @@ void testToolChoice(ChatCompletionModel model) throws Exception { void testFunctionChoice(ChatCompletionModel model) throws Exception { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model) diff --git a/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionTest.java b/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionTest.java index 93ee120..0f2ea28 100644 --- a/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionTest.java +++ b/src/test/java/dev/ai4j/openai4j/chat/ChatCompletionTest.java @@ -128,7 +128,7 @@ void testCustomizableApi(ChatCompletionModel model) { void testTools(ChatCompletionModel model) { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model) @@ -308,7 +308,7 @@ void testToolWithoutParameters() { void testFunctions(ChatCompletionModel model) { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model) @@ -357,7 +357,7 @@ void testFunctions(ChatCompletionModel model) { void testToolChoice(ChatCompletionModel model) { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model) @@ -412,7 +412,7 @@ void testToolChoice(ChatCompletionModel model) { void testFunctionChoice(ChatCompletionModel model) { // given - UserMessage userMessage = UserMessage.from("What is the weather in Boston?"); + UserMessage userMessage = UserMessage.from("What is the weather in Boston in Celsius?"); ChatCompletionRequest request = ChatCompletionRequest.builder() .model(model)