123 Commits

Author SHA1 Message Date
amithkoujalgi
61fe8b2b56
Refactor model response classes and update API methods
- Renamed `ModelProcessesResponse` to `ModelProcessesResult` and updated all related references in the codebase.
- Introduced `OllamaEmbedResult` class to replace `OllamaEmbedResponse`, ensuring consistency across the API.
- Updated method signatures in `OllamaAPI` to reflect the new class names and adjusted integration tests accordingly.
2025-09-28 22:52:24 +05:30
amithkoujalgi
dd1022a990
Add Javadoc generation to Makefile and refactor model classes
- Introduced a new `javadoc` target in the Makefile to generate Javadocs.
- Refactored model classes: renamed `ModelsProcessResponse` to `ModelProcessesResponse` and updated related references.
- Updated `OllamaEmbedRequestModel` and `OllamaEmbedResponseModel` to `OllamaEmbedRequest` and `OllamaEmbedResponse`, respectively, across the codebase.
- Added new classes for `OllamaEmbedRequest` and `OllamaEmbedResponse` to improve clarity and maintainability.
2025-09-28 22:46:37 +05:30
amithkoujalgi
e9a4599714
Refactor exception handling by replacing OllamaBaseException with OllamaException across the codebase. Update relevant method signatures and import statements accordingly. 2025-09-28 22:01:17 +05:30
amithkoujalgi
e06507a06b
Merge branch 'main' into refactor 2025-09-28 18:09:55 +05:30
Amith Koujalgi
b05242873d
Merge pull request #186 from ollama4j/dependabot/npm_and_yarn/docs/iconify/react-6.0.2
Some checks failed
CodeQL / Analyze (java) (push) Failing after 13s
CodeQL / Analyze (javascript) (push) Failing after 12s
Bump @iconify/react from 6.0.1 to 6.0.2 in /docs
2025-09-28 18:09:06 +05:30
dependabot[bot]
b8b2bb5f7a
Bump @docsearch/js from 3.9.0 to 4.0.1 in /docs
Bumps [@docsearch/js](https://github.com/algolia/docsearch/tree/HEAD/packages/docsearch-js) from 3.9.0 to 4.0.1.
- [Release notes](https://github.com/algolia/docsearch/releases)
- [Changelog](https://github.com/algolia/docsearch/blob/main/CHANGELOG.md)
- [Commits](https://github.com/algolia/docsearch/commits/v4.0.1/packages/docsearch-js)

---
updated-dependencies:
- dependency-name: "@docsearch/js"
  dependency-version: 4.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-28 12:36:56 +00:00
dependabot[bot]
1f0ea0ac4d
Bump @iconify/react from 6.0.1 to 6.0.2 in /docs
Bumps [@iconify/react](https://github.com/iconify/iconify/tree/HEAD/components/react) from 6.0.1 to 6.0.2.
- [Commits](https://github.com/iconify/iconify/commits/HEAD/components/react)

---
updated-dependencies:
- dependency-name: "@iconify/react"
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-28 12:36:50 +00:00
snyk-bot
143f7f47a2
fix: docs/package.json & docs/package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-WEBPACKDEVSERVER-10300775
- https://snyk.io/vuln/SNYK-JS-INFLIGHT-6095116
- https://snyk.io/vuln/SNYK-JS-WEBPACKDEVSERVER-10300777
2025-09-28 08:48:44 +00:00
amithkoujalgi
827bedb696
Add Prometheus metrics integration and refactor API error handling
Introduces Prometheus metrics support with a new MetricsRecorder and documentation (METRICS.md). Refactors OllamaAPI methods to improve error handling, reduce checked exceptions, and record metrics for API calls. Updates dependencies in pom.xml to include Prometheus and Guava. Adds MetricsRecorder class and updates tests for metrics integration.
2025-09-23 16:51:26 +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
0aeabcc963
Refactor error handling and update tests
Refactored error handling in OllamaChatEndpointCaller by extracting status code checks into a helper method. Improved logging for image loading errors in OllamaChatRequestBuilder. Updated integration and unit tests to relax assertions and clarify comments. Minor documentation formatting fixes and Makefile improvement for reproducible npm installs.
2025-09-18 01:50:23 +05:30
Amith Koujalgi
329381b1ee Refactor and reorganize API docs structure
Moved and renamed several API documentation files for better organization, updated sidebar positions, and merged image generation docs. Added logging documentation and updated Makefile commands for docs build and serve. Improved clarity and consistency in API doc titles and structure.
2025-09-17 10:34:50 +05:30
Amith Koujalgi
51501cf5e1
Merge pull request #177 from ollama4j/dependabot/npm_and_yarn/docs/react-19.1.1
Some checks failed
CodeQL / Analyze (java) (push) Failing after 27s
CodeQL / Analyze (javascript) (push) Failing after 26s
Mark stale issues / stale (push) Failing after 17s
Mark stale issues and PRs / stale (push) Failing after 1m32s
Bump react from 18.2.0 to 19.1.1 in /docs
2025-09-15 20:11:50 +05:30
twosom
9fd908bb71 docs: add documentation for client-managed tool calls 2025-09-15 22:57:50 +09:00
dependabot[bot]
cad2654fa2
Bump react from 18.2.0 to 19.1.1 in /docs
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 18.2.0 to 19.1.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.1.1/packages/react)

---
updated-dependencies:
- dependency-name: react
  dependency-version: 19.1.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-15 00:40:10 +00:00
Amith Koujalgi
d48fd02a99
Merge pull request #168 from ollama4j/dependabot/npm_and_yarn/docs/react-dom-19.1.1
Bump react-dom from 18.2.0 to 19.1.1 in /docs
2025-09-11 10:01:36 +05:30
dependabot[bot]
fb8a88d8f9
Bump clsx from 2.0.0 to 2.1.1 in /docs
Bumps [clsx](https://github.com/lukeed/clsx) from 2.0.0 to 2.1.1.
- [Release notes](https://github.com/lukeed/clsx/releases)
- [Commits](https://github.com/lukeed/clsx/compare/v2.0.0...v2.1.1)

---
updated-dependencies:
- dependency-name: clsx
  dependency-version: 2.1.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-11 04:27:00 +00:00
dependabot[bot]
52d68ad80a
Bump @mdx-js/react from 3.0.0 to 3.1.1 in /docs
Bumps [@mdx-js/react](https://github.com/mdx-js/mdx/tree/HEAD/packages/react) from 3.0.0 to 3.1.1.
- [Release notes](https://github.com/mdx-js/mdx/releases)
- [Changelog](https://github.com/mdx-js/mdx/blob/main/changelog.md)
- [Commits](https://github.com/mdx-js/mdx/commits/3.1.1/packages/react)

---
updated-dependencies:
- dependency-name: "@mdx-js/react"
  dependency-version: 3.1.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 15:45:21 +00:00
dependabot[bot]
7da308b563
Bump react-dom from 18.2.0 to 19.1.1 in /docs
Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 18.2.0 to 19.1.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.1.1/packages/react-dom)

---
updated-dependencies:
- dependency-name: react-dom
  dependency-version: 19.1.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 15:45:18 +00:00
Amith Koujalgi
94aa7669d9
Merge pull request #171 from ollama4j/dependabot/npm_and_yarn/docs/prism-react-renderer-2.4.1
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 6m2s
CodeQL / Analyze (java) (push) Failing after 6m6s
Mark stale issues / stale (push) Successful in 36s
Mark stale issues and PRs / stale (push) Successful in 1m35s
Bump prism-react-renderer from 2.3.1 to 2.4.1 in /docs
2025-09-10 21:14:14 +05:30
dependabot[bot]
37e429cfca
Bump @iconify/react from 5.2.1 to 6.0.1 in /docs
Bumps [@iconify/react](https://github.com/iconify/iconify/tree/HEAD/components/react) from 5.2.1 to 6.0.1.
- [Commits](https://github.com/iconify/iconify/commits/HEAD/components/react)

---
updated-dependencies:
- dependency-name: "@iconify/react"
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 15:35:22 +00:00
dependabot[bot]
599874eba2
Bump prism-react-renderer from 2.3.1 to 2.4.1 in /docs
Bumps [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer) from 2.3.1 to 2.4.1.
- [Release notes](https://github.com/FormidableLabs/prism-react-renderer/releases)
- [Commits](https://github.com/FormidableLabs/prism-react-renderer/compare/prism-react-renderer@2.3.1...prism-react-renderer@2.4.1)

---
updated-dependencies:
- dependency-name: prism-react-renderer
  dependency-version: 2.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 15:35:13 +00:00
amithkoujalgi
773cb4af78
Refactor verbosity handling in OllamaAPI
- Removed the verbose logging feature from the OllamaAPI class and related classes.
- Updated logging statements to use debug level instead of info for model requests and responses.
- Cleaned up related test cases to reflect the removal of verbosity settings.
2025-09-10 18:02:28 +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
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
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
amithkoujalgi
4de3d98b79
Update generate.md 2025-08-31 16:00:07 +05:30
Amith Koujalgi
3efd7712be
Merge pull request #143 from ollama4j/small-fixes
All checks were successful
Mark stale issues / stale (push) Successful in 33s
Small fixes
2025-08-27 21:18:15 +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
54d8cf4cd9
Add WeatherTool and integration test with auth proxy
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.
2025-08-15 23:16:24 +05:30
amithkoujalgi
ccf738127d
Update index.js 2025-04-20 00:33:00 +05:30
amithkoujalgi
2b0506a393
Updated docs 2025-04-20 00:10:37 +05:30
amithkoujalgi
cef4a00d17
Updated docs 2025-04-19 23:36:03 +05:30
amithkoujalgi
79923451d0
Updated docs 2025-04-19 23:24:44 +05:30
amithkoujalgi
a3debc0983
Updated docs 2025-04-19 23:15:27 +05:30
amithkoujalgi
4d03673d8c
Updated docs 2025-04-19 22:11:36 +05:30
amithkoujalgi
43361ff271
Updated docs 2025-04-19 00:23:27 +05:30
amithkoujalgi
9811d9f7fd
Updated docs 2025-04-19 00:16:23 +05:30
amithkoujalgi
63b3bcb71e
Updated docs 2025-04-18 23:02:32 +05:30
amithkoujalgi
9d9bc53e0b
Updated docs 2025-04-18 22:52:08 +05:30
amithkoujalgi
8fd203931d
Updated docs 2025-04-18 22:45:30 +05:30
amithkoujalgi
9c181486a5
Added CodeEmbed component to embed code snippets in markdowns 2025-04-18 12:15:49 +05:30
amithkoujalgi
2b036c8a62
Added CodeEmbed component to embed code snippets in markdowns 2025-04-17 20:31:01 +05:30
Amith Koujalgi
ec0ebc9654 Update list-library-models.md 2025-04-17 18:39:07 +05:30
amithkoujalgi
d6a57560fe
added search for docs 2025-04-16 21:41:33 +05:30
amithkoujalgi
a2d95a052a
- Updated Makefile to add a new remote integration test command.
- Updated docs – Enhanced DBQueryFunction to validate input arguments and throw a RuntimeException if required arguments are missing.
- Updated docs – Refactored tool specifications for fuel price, weather, and employee details to use a unified prompt function structure.  (Addresses #116).
- Improved javadoc for `chatStreaming()` API. (Addresses #115).
- Introduced `ToolInvocationException` to handle errors during tool invocation in OllamaAPI. (Addresses #117).
- Updated integration tests to include `ToolInvocationException` in method signatures for better error handling.
2025-04-06 23:05:26 +05:30
amithkoujalgi
b9b18271a1
Support for structured output
Added support for structured output
2025-03-24 23:45:01 +05:30
Amith Koujalgi
11bf20c405
Updated docs 2025-03-19 08:49:58 +05:30
Amith Koujalgi
f6a29842b5
Updated docs 2025-03-19 08:31:10 +05:30
Amith Koujalgi
e74ef7115c
Add blog post about tooling with couchbase 2025-03-19 08:08:39 +05:30