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
Introduces WeatherTool for fetching weather data via OpenWeatherMap API and its tool specification. Adds an integration test (WithAuth) using Testcontainers to verify OllamaAPI connectivity through an NGINX proxy with bearer token authentication. Also updates pom.xml to include the testcontainers-nginx dependency and minor improvements to OllamaAPI for request headers and Javadoc formatting. TypewriterTextarea now supports text alignment, with homepage header using center alignment.