870 Commits

Author SHA1 Message Date
amithkoujalgi
fddd753a48
Add unit tests for authentication, options, tool registry, and prompt builder
- Created TestAuth.java to validate BasicAuth and BearerAuth header generation.
- Added TestOptionsAndUtils.java to test OptionsBuilder and utility functions.
- Implemented TestToolRegistry.java to ensure tool registration and retrieval functionality.
- Developed TestToolsPromptBuilder.java to verify prompt builder includes tools and prompts correctly.
2025-09-10 17:06:47 +05:30
amithkoujalgi
b42cee36ae
Merge remote-tracking branch 'origin/main' 2025-09-10 16:58:09 +05:30
Amith Koujalgi
4694d31e2c
Update README.md 2025-09-10 09:37:19 +05:30
Amith Koujalgi
4abecd1d76
Update README.md 2025-09-10 09:35:24 +05:30
Amith Koujalgi
5ae999078c
Merge pull request #156 from ollama4j/amithkoujalgi-patch-2
Amithkoujalgi patch 2
2025-09-10 09:29:04 +05:30
amithkoujalgi
538db8f484
Update README.md 2025-09-10 09:28:37 +05:30
Amith Koujalgi
ca79831c1e
Update README.md 2025-09-10 08:43:06 +05:30
Amith Koujalgi
255173c6ac
Create CITATION.cff 2025-09-10 08:41:07 +05:30
Amith Koujalgi
8d197f963d
Merge pull request #155 from ollama4j/dependabot/npm_and_yarn/docs/npm_and_yarn-6ea9762674
All checks were successful
Mark stale issues / stale (push) Successful in 32s
Bump brace-expansion from 1.1.11 to 1.1.12 in /docs in the npm_and_yarn group across 1 directory
2025-09-05 20:42:27 +05:30
Amith Koujalgi
3c5107f113
Merge pull request #154 from ollama4j/amithkoujalgi-patch-1
Create dependabot.yml
2025-09-05 20:41:52 +05:30
dependabot[bot]
80ee58ba1e
Bump brace-expansion
Bumps the npm_and_yarn group with 1 update in the /docs directory: [brace-expansion](https://github.com/juliangruber/brace-expansion).


Updates `brace-expansion` from 1.1.11 to 1.1.12
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-05 10:40:50 +00:00
Amith Koujalgi
d219168451
Create dependabot.yml 2025-09-05 16:09:59 +05:30
Amith Koujalgi
977b85f8ea
Merge pull request #153 from sebastianbeattie/patch-1
All checks were successful
Mark stale issues / stale (push) Successful in 30s
Update maven version in README.md
2025-09-04 23:12:04 +05:30
Seb Beattie
9b31fa5390
Update maven version in README.md 2025-09-04 10:55:11 +01:00
Amith Koujalgi
0e0c83a065
Merge pull request #151 from ollama4j/docs-updates
All checks were successful
Mark stale issues / stale (push) Successful in 32s
2025-08-31 23:47:30 +05:30
amithkoujalgi
3ddfd4fb4e
Update README.md 2025-08-31 22:23:09 +05:30
amithkoujalgi
a093be5581
Update OllamaAPI.java 2025-08-31 22:02:43 +05:30
Amith Koujalgi
cfd784b919
Merge pull request #150 from ollama4j/docs-updates
All checks were successful
Mark stale issues / stale (push) Successful in 40s
Update docs and dependencies
2025-08-31 20:00:08 +05:30
amithkoujalgi
a3ebe6c992
Update docs and dependencies
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.
2025-08-31 19:59:29 +05:30
Amith Koujalgi
4eefb81a0b
Merge pull request #148 from ollama4j/doc-updates
Add docs for thinking APIs and update examples
2025-08-31 19:37:15 +05:30
amithkoujalgi
f914707536
Add docs for thinking APIs and update examples
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.
2025-08-31 19:36:43 +05:30
Amith Koujalgi
931d5dd520
Merge pull request #145 from ollama4j/thinking-support
Thinking support
1.1.0
2025-08-31 17:44:58 +05:30
amithkoujalgi
b216d1b647
Refactor imports and add fields to OllamaStructuredResult
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.
2025-08-31 16:46:32 +05:30
amithkoujalgi
4de3d98b79
Update generate.md 2025-08-31 16:00:07 +05:30
amithkoujalgi
6fa5c323b8
Refactor stream handler and update test model usage
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.
2025-08-31 15:56:40 +05:30
amithkoujalgi
c754bd11da
Refactor OllamaAPI for improved async handling and response streaming
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.
2025-08-31 14:02:42 +05:30
amithkoujalgi
5f5fa8ecae
Deprecate findModelTagFromLibrary and simplify WeatherTool
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.
2025-08-31 01:33:57 +05:30
amithkoujalgi
6ae6f4f25b
Update run-tests.yml 2025-08-30 21:31:54 +05:30
amithkoujalgi
6b69284497
Update workflow job names and refine integration tests
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.
2025-08-30 21:30:16 +05:30
amithkoujalgi
52d7dbd7ce
Update build-on-pull-request.yml 2025-08-30 21:10:54 +05:30
amithkoujalgi
2070753c5e
Update run-tests.yml 2025-08-30 21:05:30 +05:30
Amith Koujalgi
c1f7fb78d9
Merge branch 'main' into thinking-support 2025-08-30 21:01:50 +05:30
amithkoujalgi
b71cf87ec2
Update build-on-pull-request.yml 2025-08-30 21:00:37 +05:30
amithkoujalgi
0965c3046e
Update build-on-pull-request.yml 2025-08-30 20:57:17 +05:30
amithkoujalgi
8e50bc8d75
Update OllamaAPIIntegrationTest.java 2025-08-30 20:54:18 +05:30
amithkoujalgi
be5b77c4ac
Refactor tool tests and improve tool argument 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.
2025-08-30 20:53:14 +05:30
amithkoujalgi
6078db6157
Update GitHub Actions workflows for PRs and tests
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.
2025-08-30 20:04:42 +05:30
amithkoujalgi
97f457575d
Remove sample prompt utilities and update integration tests
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.
2025-08-30 20:01:35 +05:30
amithkoujalgi
4df59d8862
Refactor test steps to use run-tests workflow
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.
2025-08-30 18:13:58 +05:30
amithkoujalgi
621004e6d8
Fix logging for model pull retry 2025-08-30 18:10:33 +05:30
Amith Koujalgi
74b2ab13e7
Merge pull request #146 from ollama4j/amithkoujalgi-patch-1
All checks were successful
Mark stale issues / stale (push) Successful in 34s
Update run-tests.yml
2025-08-30 18:09:47 +05:30
Amith Koujalgi
8fef5148d9
Update run-tests.yml 2025-08-30 18:09:35 +05:30
amithkoujalgi
b91f6e6b25
Enhance GitHub Actions workflow for dynamic branch testing
- 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.
2025-08-30 18:06:06 +05:30
amithkoujalgi
0ec20d14b0
Enhance CI workflow and refactor integration tests
- 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.
2025-08-30 18:00:04 +05:30
amithkoujalgi
c705432510
Increase model pull retry delay and attempts
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.
2025-08-30 17:04:02 +05:30
amithkoujalgi
de379d73b2
Refactor OllamaAPI for readability and add EqualsAndHashCode to BearerAuth
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.
2025-08-30 16:59:05 +05:30
amithkoujalgi
ad1bf658a9
Enhance OllamaAPI with improved timeout and retry mechanisms
- 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.
2025-08-30 16:49:43 +05:30
amithkoujalgi
ab9b95dbed
Update THINKING_TOOL_MODEL constant in OllamaAPIIntegrationTest to gpt-oss:20b 2025-08-30 15:50:08 +05:30
amithkoujalgi
7f37233c72
Update THINKING_TOOL_MODEL constant in OllamaAPIIntegrationTest to version 1.7b 2025-08-30 15:45:08 +05:30
amithkoujalgi
77aa3b85d1
Refactor WithAuth integration test for improved structure and functionality
- 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.
2025-08-30 15:07:32 +05:30