14 Commits

Author SHA1 Message Date
Amith Koujalgi
5ef1ea906d Remove modelKeepAliveTime property and related code
Eliminated the modelKeepAliveTime field from OllamaAPI and OllamaChatRequest, along with its usage in integration tests and configuration. This streamlines configuration and request handling by removing an unused or deprecated parameter.
2025-09-20 17:48:21 +05:30
amithkoujalgi
cac94e0faf
Refactor tool handling and add model unload support
Replaces the 'clientHandlesTools' flag with 'useTools' for tool execution control, defaulting to true. Adds support for model unloading via keep_alive parameter. Updates chat request and builder to use the new flag. Improves integration tests and documentation to reflect these changes. Fixes constructor order in OllamaGenerateStreamObserver and adds ignoreUnknown to ModelsProcessResponse.
2025-09-20 14:46:46 +05:30
amithkoujalgi
cb0f71ba63
Refactor token handler interfaces and improve streaming
Renamed and refactored token handler interfaces for chat and generate modules to improve clarity and separation. Updated related classes and method signatures to use new handler types. Enhanced error handling and logging in chat and generate request builders. Updated tests and integration code to use new handler classes and configuration properties. Suppressed verbose logs from Docker and Testcontainers in test logging configuration.
2025-09-19 18:05:38 +05:30
amithkoujalgi
d118958ac1
Change logging level from info to debug
Updated OllamaAPI to use LOG.debug instead of LOG.info for model pull status messages. Also changed the root logging level in logback.xml from info to debug to allow debug messages to be displayed during tests.
2025-09-18 02:20:07 +05:30
amithkoujalgi
ba3d8925f2
Refactor integration tests and update Makefile targets
Refactored OllamaAPIIntegrationTest to simplify stream handlers and remove unused StringBuffer variables. Updated Makefile to ensure formatting is applied before running test targets. Adjusted logback.xml pattern to use full logger name for improved logging clarity.
2025-09-17 20:49:53 +05:30
amithkoujalgi
863c978d12
Refactor OllamaAPIIntegrationTest and AnnotatedTool for improved clarity and consistency
- 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.
2025-08-30 15:02:51 +05:30
Travis Lyons
bae903f8ca
fix: handle ollama error responses
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
2025-08-20 11:51:49 -04:00
amithkoujalgi
0248f21654
Used smaller-sized images for the test cases 2025-03-25 21:34:13 +05:30
Markus Klenke
25694a8bc9 extends ollamaChatResult to have full access to OllamaChatResult 2024-12-07 01:17:01 +01:00
Amith Koujalgi
9832caf503 Update intg test class 2024-02-10 10:41:53 +05:30
Amith Koujalgi
bb1c920e22 - updated askWithImageFiles and askWithImageURLs APIs to use Options
- updated jacoco version
2024-01-03 16:18:49 +05:30
Amith Koujalgi
e2a88b06c5 Updated tests 2023-12-14 20:10:18 +05:30
Amith Koujalgi
7da4a7ffd4 - updated Java version to 11.
- replaced Apache HTTP client code with `Java.net.http.HttpClient`
2023-11-13 11:32:53 +05:30
Amith Koujalgi
5c5463b764 Fix for logback as a transitive dependency.
- updated pom.xml to have logback-classic in test scope.
- moved logback.xml from src/main/resources to src/test/resources
2023-11-12 19:48:40 +05:30