786 Commits

Author SHA1 Message Date
Amith Koujalgi
ba0444194f
Merge pull request #98 from csware/bearertoken
Support bearer token
2025-03-18 20:30:08 +05:30
Amith Koujalgi
ac3f505aa6
Switch image model to "moondream" in integration test 2025-03-11 13:12:55 +05:30
Amith Koujalgi
7e5ca53fda
Merge remote-tracking branch 'origin/integration-tests-refactor' into integration-tests-refactor
# Conflicts:
#	Makefile
#	README.md
2025-03-11 12:28:39 +05:30
Amith Koujalgi
2b0238b9e8
Ensure Docker availability in dev setup and integration tests
Updated `README.md` to include Docker as a prerequisite for running integration tests using Testcontainers. Modified the `Makefile` to check for Docker installation during the dev environment setup.
2025-03-11 12:26:35 +05:30
amithkoujalgi
469a0fe491
Refactor
- Remove TestRealAPIs and enhance OllamaAPIIntegrationTest
- Add dev setup instruction
2025-03-11 12:26:08 +05:30
Amith Koujalgi
983a3617f0
Add dev setup instructions and update pre-commit config 2025-03-11 12:15:19 +05:30
Amith Koujalgi
b638b981c9
Remove unnecessary blank lines from pom.xml
Cleaned up redundant blank lines at the end of the pom.xml file to ensure consistent formatting. This helps improve code readability and adheres to standard practices.
2025-03-11 12:05:11 +05:30
amithkoujalgi
fe5078891f
Remove TestRealAPIs and enhance OllamaAPIIntegrationTest 2025-03-11 11:41:51 +05:30
Amith Koujalgi
44b4de9ed9
Merge pull request #102 from ollama4j/update-pre-commit-hook
All checks were successful
Mark stale issues / stale (push) Successful in 31s
update-pre-commit-hook
2025-03-11 10:38:05 +05:30
amithkoujalgi
854c0b4acf
test GH action 2025-03-11 10:35:06 +05:30
Amith Koujalgi
18c5d06a6c
Merge pull request #101 from ollama4j/update-pre-commit-hook
update-pre-commit-hook
2025-03-11 10:34:10 +05:30
amithkoujalgi
22b403d0b0
Remove unnecessary write permission for packages in workflow 2025-03-11 10:33:14 +05:30
amithkoujalgi
ee0493eb57
Rename and adjust workflows for PR builds and testing.
Renamed the PR-related workflow for clarity and replaced `build-on-pr-create.yml` with `build-and-test-on-pr-open.yml` for better naming consistency. Also commented out the push trigger in `run-tests.yml` to refine its activation criteria.
2025-03-11 10:19:34 +05:30
Amith Koujalgi
f966b4b74e
Merge pull request #100 from ollama4j/update-pre-commit-hook
update-pre-commit-hook
2025-03-11 10:18:06 +05:30
amithkoujalgi
1dadbacd2c
Enable no-commit-to-branch pre-commit hook. 2025-03-11 10:12:03 +05:30
amithkoujalgi
714c16c216
Merge remote-tracking branch 'origin/main' 2025-03-11 10:10:46 +05:30
amithkoujalgi
cf2c510b23
Add integration test step to CI workflow
Previously, only unit tests were run during the PR workflow. This update introduces a separate step to run integration tests, ensuring broader test coverage. It enhances build verification by validating both unit and integration aspects.
2025-03-11 10:10:14 +05:30
amithkoujalgi
a0bcc47b2e
Add pre-commit configuration file
test
2025-03-11 10:08:57 +05:30
amithkoujalgi
57ecbc2572
Add pre-commit configuration file
test
2025-03-11 10:00:11 +05:30
amithkoujalgi
99beb3e6d0
Add pre-commit configuration file
test
2025-03-11 09:31:12 +05:30
amithkoujalgi
7756eed9a0
Add pre-commit configuration file
Introduce a pre-commit-config.yaml to automate code quality checks and enforce best practices. Includes hooks for file validation, formatting, and commit message standardization, as well as Java-specific quality tools. This ensures consistent coding standards and reduces manual errors.
2025-03-11 09:29:57 +05:30
amithkoujalgi
b795117f0a
Add integration test step to CI workflow
Some checks failed
Run Unit and Integration Tests / run-tests (push) Failing after 2m2s
Mark stale issues / stale (push) Successful in 15s
Previously, only unit tests were run during the PR workflow. This update introduces a separate step to run integration tests, ensuring broader test coverage. It enhances build verification by validating both unit and integration aspects.
2025-03-11 00:20:01 +05:30
amithkoujalgi
0d091d1826
Update integration test 1.0.98 2025-03-11 00:06:30 +05:30
amithkoujalgi
9fd77a6743
Add branch trigger for tests and update README with badge
Added a trigger to run tests on pushes to the main branch in the GitHub Actions workflow. Also updated the README to include a badge linking to the test workflow for better visibility.
2025-03-11 00:02:13 +05:30
amithkoujalgi
57a962148b
Update workflow name and job for clarity in testing
Renamed the workflow to specify both unit and integration tests. Adjusted the job name to better reflect its purpose and ensured clear descriptions for inputs. These changes enhance readability and intent in the CI configuration.
2025-03-10 23:58:03 +05:30
amithkoujalgi
3c64f2099f
Add GPG plugin with test-skipping configuration
Integrated the Maven GPG plugin to sign artifacts during the "verify" phase, with the ability to skip it during tests using a new `skipGpgPluginDuringTests` property. Enhanced the build profiles to manage GPG signing selectively, ensuring smoother test and build workflows.
2025-03-10 23:53:02 +05:30
amithkoujalgi
a9c7f4e5e0
Rename TestAPIsTest to OllamaAPIIntegrationTest 2025-03-10 23:44:18 +05:30
amithkoujalgi
e7f58d4e0d
Add integration tests and enhance test configurations
Introduced integration tests for various API functionalities, ensuring comprehensive coverage. Updated test dependencies in `pom.xml` and added handling for unknown JSON properties in the `Model` class. Also included configuration to support running unit and integration tests in the CI workflow.
2025-03-10 23:40:44 +05:30
Sven Strickroth
138497b30f Introduce BearerAuth class
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2025-03-10 14:55:38 +01:00
Sven Strickroth
3a792090e2 Support bearer token
May be use as follows:
```
ollamaAPI.setBasicAuth(new BasicAuth() {
	@Override
	public String getBasicAuthHeaderValue() { return "Bearer [sometext]"; }
});
```

Signed-off-by: Sven Strickroth <email@cs-ware.de>
2025-03-10 14:39:54 +01:00
amithkoujalgi
7ef859bba5
clean up
All checks were successful
Mark stale issues / stale (push) Successful in 31s
2025-03-09 20:29:34 +05:30
amithkoujalgi
3c30593e1e
clean up
All checks were successful
Mark stale issues / stale (push) Successful in 31s
2025-03-08 17:44:00 +05:30
amithkoujalgi
98b794ca2b
Add a test GitHub Actions workflow to publish to a GitHub repository, Maven repository, and GitHub Pages 2025-03-08 17:24:29 +05:30
amithkoujalgi
bc90a15a68
Add "Examples" link to navbar and footer
Added a link to the "Examples" repository in both the navbar and the "Usage" section of the footer. This improves accessibility to code examples, providing users with an easier way to explore practical use cases.
1.0.97
2025-03-08 16:45:43 +05:30
amithkoujalgi
bb4689e94b
Add examples section and GitHub links to docs and README
Introduced an examples section in the README to highlight the `ollama4j-examples` repository. Added an iframe and link in the chat API documentation for better reference. Adjusted formatting for improved readability and consistency.
2025-03-08 16:34:00 +05:30
amithkoujalgi
6739c93edc
Refactor workflows and update dependencies.
Renamed workflow for clearer purpose and updated project dependencies across multiple packages to newer versions. Improved the `pom.xml` Maven config by adding a build phase and output directory for Javadoc generation. Upgraded several NPM packages, removing deprecated versions and adding license metadata for better dependency management.
2025-03-08 16:05:17 +05:30
amithkoujalgi
c8c30d703b
Refactor code to enhance robustness and clarity
Refactored `OllamaChatMessageRole` to simplify custom role creation, guarding against nulls in `OllamaToolsResult`, and made `OllamaChatResult` properties immutable. Improved error handling in `OllamaAPI`, added verbose logs, and ensured safer JSON parsing for tool responses. Introduced `@JsonIgnoreProperties` for better deserialization support.
2025-03-08 15:46:43 +05:30
Amith Koujalgi
419b0369c9
Merge pull request #93 from hboutemy/reproducible-builds
All checks were successful
Mark stale issues / stale (push) Successful in 34s
enable Reproducible Builds
1.0.96
2025-02-28 21:57:31 +05:30
Hervé Boutemy
d9a94b95e1 enable Reproducible Builds 2025-02-23 18:02:15 +01:00
Amith Koujalgi
db1db948c8
Merge pull request #94 from hboutemy/release
All checks were successful
Mark stale issues / stale (push) Successful in 28s
use release flag instead of old source/target
2025-02-23 19:48:26 +05:30
Hervé Boutemy
41ad780224
use release flag instead of old source/target 2025-02-21 17:14:54 +01:00
Amith Koujalgi
cb58c6a9b0 Updated README.md
All checks were successful
Mark stale issues / stale (push) Successful in 10s
2025-02-17 23:47:48 +05:30
Amith Koujalgi
d1115e0b35 Updated README.md 2025-02-17 23:47:11 +05:30
Amith Koujalgi
740bd3750b
Merge pull request #92 from ollama4j/90
Addresses issue where creation of model was failing
1.0.95 1.0.94
2025-02-17 22:37:20 +05:30
Amith Koujalgi
c9aa6c9e08 Merge branch 'main' into 90 2025-02-17 22:35:38 +05:30
Amith Koujalgi
71bba6ee0d Added GH action to run tests 2025-02-17 22:33:02 +05:30
Amith Koujalgi
27b2201ff9 Added GH action to run tests 2025-02-17 22:31:56 +05:30
Amith Koujalgi
23d23c4ad7 Added new createModel API to make it conform to Ollama's new API - https://github.com/ollama/ollama/blob/main/docs/api.md#create-a-model 2025-02-17 22:25:25 +05:30
amithkoujalgi
e409ff1cf9
Update OllamaAPI.java
All checks were successful
Mark stale issues / stale (push) Successful in 14s
2025-02-03 08:56:49 +05:30
amithkoujalgi
9a12cebb68
Update README.md 2025-02-01 23:13:35 +05:30