diff --git a/src/test/java/io/github/ollama4j/integrationtests/OllamaAPIIntegrationTest.java b/src/test/java/io/github/ollama4j/integrationtests/OllamaAPIIntegrationTest.java index 9aa1579..086f151 100644 --- a/src/test/java/io/github/ollama4j/integrationtests/OllamaAPIIntegrationTest.java +++ b/src/test/java/io/github/ollama4j/integrationtests/OllamaAPIIntegrationTest.java @@ -208,7 +208,7 @@ public class OllamaAPIIntegrationTest { OllamaChatRequestBuilder builder = OllamaChatRequestBuilder.getInstance(chatModel); // Create the initial user question - OllamaChatRequest requestModel = builder.withMessage(OllamaChatMessageRole.USER, "What is the capital of France?") + OllamaChatRequest requestModel = builder.withMessage(OllamaChatMessageRole.USER, "What is 1+1?") .build(); // Start conversation with model @@ -216,13 +216,13 @@ public class OllamaAPIIntegrationTest { assertTrue( chatResult.getChatHistory().stream() - .anyMatch(chat -> chat.getContent().contains("Paris")), - "Expected chat history to contain 'Paris'" + .anyMatch(chat -> chat.getContent().contains("2")), + "Expected chat history to contain '2'" ); // Create the next user question: second largest city requestModel = builder.withMessages(chatResult.getChatHistory()) - .withMessage(OllamaChatMessageRole.USER, "And what is its official language?") + .withMessage(OllamaChatMessageRole.USER, "And what is its squared value?") .build(); // Continue conversation with model @@ -230,13 +230,13 @@ public class OllamaAPIIntegrationTest { assertTrue( chatResult.getChatHistory().stream() - .anyMatch(chat -> chat.getContent().contains("French")), - "Expected chat history to contain 'French'" + .anyMatch(chat -> chat.getContent().contains("4")), + "Expected chat history to contain '4'" ); // Create the next user question: the third question requestModel = builder.withMessages(chatResult.getChatHistory()) - .withMessage(OllamaChatMessageRole.USER, "What is the largest river in France?") + .withMessage(OllamaChatMessageRole.USER, "What is the largest value between 2, 4 and 6?") .build(); // Continue conversation with the model for the third question @@ -245,7 +245,7 @@ public class OllamaAPIIntegrationTest { // verify the result assertNotNull(chatResult, "Chat result should not be null"); assertTrue(chatResult.getChatHistory().size() > 2, "Chat history should contain more than two messages"); - assertTrue(chatResult.getChatHistory().get(chatResult.getChatHistory().size() - 1).getContent().contains("river"), "Response should be related to river"); + assertTrue(chatResult.getChatHistory().get(chatResult.getChatHistory().size() - 1).getContent().contains("6"), "Response should contain '6'"); } @Test