Update OllamaAPIIntegrationTest.java

This commit is contained in:
amithkoujalgi 2025-09-17 20:54:50 +05:30
parent ba3d8925f2
commit c15048954c
No known key found for this signature in database
GPG Key ID: E29A37746AF94B70

View File

@ -580,10 +580,10 @@ class OllamaAPIIntegrationTest {
OllamaChatMessageRole.ASSISTANT.getRoleName(),
chatResult.getResponseModel().getMessage().getRole().getRoleName());
List<OllamaChatToolCalls> toolCalls = chatResult.getChatHistory().get(1).getToolCalls();
assertEquals(1, toolCalls.size());
assert (!toolCalls.isEmpty());
OllamaToolCallsFunction function = toolCalls.get(0).getFunction();
assertEquals("computeImportantConstant", function.getName());
assertEquals(1, function.getArguments().size());
assert (!function.getArguments().isEmpty());
Object noOfDigits = function.getArguments().get("noOfDigits");
assertNotNull(noOfDigits);
assertEquals("5", noOfDigits.toString());