Add support for registering object instances instead of only through the @OllamaToolService annotation

This commit is contained in:
2025-01-24 13:38:47 +01:00
parent f27bea11d5
commit b2b3febdaa
3 changed files with 93 additions and 75 deletions

View File

@@ -338,7 +338,7 @@ class TestRealAPIs {
ollamaAPI.setVerbose(true);
OllamaChatRequestBuilder builder = OllamaChatRequestBuilder.getInstance(config.getModel());
ollamaAPI.registerAnnotatedTools();
ollamaAPI.registerAnnotatedTools(new AnnotatedTool());
OllamaChatRequest requestModel = builder
.withMessage(OllamaChatMessageRole.USER,