Improved descriptions in README and blog posts, removed outdated info from pull-model API docs, and updated several npm dependencies in package.json and package-lock.json for better compatibility and security.
Added new documentation for 'chat-with-thinking' and 'generate-thinking' APIs, including usage examples and streamed output. Updated existing API docs to improve example clarity, response formatting, and added more interactive output using TypewriterTextarea. Removed deprecated 'list-library-models' doc and made minor README updates.
Reorders and deduplicates import statements across multiple files for consistency and clarity. Adds additional fields to OllamaStructuredResult and ensures OllamaResult is populated with these fields. Updates tests and minor code style improvements throughout the codebase.
Simplified ConsoleOutputStreamHandler to print messages directly without substring logic. Updated WithAuth integration test to use the THINKING_MODEL ('gpt-oss:20b') instead of GENERAL_PURPOSE_MODEL ('gemma3:270m') for model pulling and generation.
Updated OllamaAPI to support separate thinking and response stream handlers, enhancing the asynchronous generation of responses. Adjusted related models and observers to accommodate new streaming logic. Improved the handling of response data in OllamaResult and OllamaGenerateResponseModel, adding new properties for better tracking of response metrics. Refined integration tests to reflect changes in method signatures and ensure proper logging of streamed responses.
Marked findModelTagFromLibrary as deprecated in OllamaAPI due to reliance on unstable HTML structure. Simplified WeatherTool by removing external API calls and returning a static weather response for demonstration purposes.
Added descriptive names to jobs in the GitHub Actions workflow for better clarity. In integration tests, replaced GENERAL_PURPOSE_MODEL with TOOLS_MODEL in relevant tests and adjusted logging within lambda expressions for improved output handling.
Refactored integration tests to use a reusable employeeFinderTool method and improved assertions for tool call results. Updated tool argument formatting in OllamaAPI for clearer output. Modified AnnotatedTool to use 'numberOfHearts' instead of 'amountOfHearts' and simplified the sayHello method signature and output. Removed redundant and duplicate test code for tool streaming.
Enables all pull request event types in build-on-pull-request.yml and cleans up formatting. Removes redundant step for copying workflow file in run-tests.yml to streamline the workflow.
Deleted SamplePrompts.java and sample-db-prompt-template.txt as they are no longer needed. Updated OllamaAPIIntegrationTest to use a new TOOLS_MODEL constant, refactored tool registration and prompt descriptions for employee details, and improved test assertions for tool-based chat interactions.
Replaces separate Maven unit and integration test steps with a call to the reusable run-tests.yml workflow, passing the current branch as input. This simplifies the workflow and centralizes test execution logic.
- Added a step to check out the target branch specified in the workflow input.
- Implemented a conditional step to use the workflow file from the checked-out branch, improving flexibility and error handling in CI processes.
- Added setup step for Ollama installation in the GitHub Actions workflow.
- Updated environment variables for integration tests to utilize an external Ollama host.
- Refactored test method names in OllamaAPIIntegrationTest for clarity and consistency, changing 'testAskModel' to 'testGenerate'.
- Introduced new tests for image processing from URLs and files, while removing outdated tests for improved test suite relevance.
Raised the base delay for model pull retries from 1s to 3s and updated log output to show seconds instead of milliseconds. Also increased the number of retries for model pull in integration tests from 3 to 5 to improve robustness.
Reformatted method signatures, chained calls, and comments in OllamaAPI for improved readability and maintainability. Added @EqualsAndHashCode(callSuper = false) to BearerAuth to ensure proper equality checks, and reformatted its code for consistency.
- Updated request timeout default to 10 seconds for API calls.
- Added verbose logging option with default set to true.
- Introduced maxChatToolCallRetries to control retry attempts during chat interactions.
- Implemented numberOfRetriesForModelPull with exponential backoff for model retrieval failures.
- Refactored pullModel method to include retry logic and improved error handling.
- Restored the WithAuth class and updated it to include a new general-purpose model.
- Enhanced the setup method to initialize the OllamaAPI with bearer authentication.
- Added tests to validate the API's behavior with correct and incorrect authentication tokens.
- Updated the structured output test to reflect changes in the model and prompt.
- Improved logging for better traceability during test execution.
- Updated model constants in OllamaAPIIntegrationTest to enhance readability and maintainability.
- Changed method visibility from public to package-private where appropriate.
- Refactored assertions in testListModelsAPI for better validation.
- Cleaned up formatting in AnnotatedTool methods for consistency.
- Added a new image resource (roses.jpg) for testing purposes.
- Introduced a new Constants class to centralize HTTP header values.
- Updated OllamaAPI methods to utilize Constants for "Content-Type" and "Accept" headers.
- Enhanced logging statements to use parameterized messages for better performance and readability.
- Added a test for the ping method in OllamaAPIIntegrationTest to ensure connectivity.
Introduces a method to deregister all tools in OllamaAPI and ToolRegistry. Updates integration tests to use new models, refactors prompts and assertions, and removes the TimeOfDay class. The WithAuth test is now fully commented out.
- Introduced a 'thinking' field in OllamaChatMessage to capture intermediate reasoning.
- Updated OllamaChatRequest to include a 'think' parameter for chat requests.
- Modified OllamaChatRequestBuilder to facilitate setting the 'think' parameter.
- Enhanced response handling in OllamaChatStreamObserver and OllamaGenerateStreamObserver to manage 'thinking' content.
- Updated integration tests to validate the new 'thinking' functionality in chat and generation methods.
- Added 'think' parameter to the generate methods in OllamaAPI to enable step-by-step reasoning for model responses.
- Updated OllamaGenerateRequest and OllamaGenerateResponseModel to include 'thinking' field.
- Modified response handling in OllamaGenerateStreamObserver to incorporate 'thinking' responses.
- Updated integration tests to validate the new functionality, including tests for generating responses with thinking enabled.
- Refactored related methods and classes for consistency and clarity.
fixes: #138
- Added error field to ModelPullResponse
- Enhanced error handling in doPullModel to check for errors in response body and throw OllamaBaseException with the specific error message