Updated docs

This commit is contained in:
amithkoujalgi 2025-04-19 22:11:36 +05:30
parent 43361ff271
commit 4d03673d8c
No known key found for this signature in database
GPG Key ID: E29A37746AF94B70
14 changed files with 511 additions and 29 deletions

View File

@ -76,13 +76,12 @@ The command runs the Ollama server locally at **http://localhost:11434/**.
### Setup your project
Add the dependency to your project's `pom.xml`.
<AddToYourProject/>
<div style={{ marginTop: '2rem', marginBottom: '2rem', fontSize: '1em', textAlign: 'left', display: 'flex', justifyContent: 'left'}}>
<LatestRelease style={{textAlign: 'left', fontWeight: 'normal'}}/>
<LatestRelease showReleaseDate={true} style={{textAlign: 'left', fontWeight: 'normal'}}/>
</div>
Find the latest version of the library from [Maven Central Repository](https://central.sonatype.com/artifact/io.github.ollama4j/ollama4j).

View File

@ -3,37 +3,104 @@ import Heading from '@theme/Heading';
import styles from './styles.module.css';
const FeatureList = [
{
title: 'Easy LLM Integration',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
description: (
<>
Easy integration with Ollama, enabling the execution of large language models locally.
</>
),
},
{
title: 'Developer-Friendly',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
description: (
<>
Clean and simple <code>APIs</code>, focused on seamless interaction with Ollama.
Provides clean and simple <code>APIs</code> for interacting with Ollama, including model management, chat functionalities, and authentication capability when Ollama is deployed behind proxy server.
</>
),
},
{
title: 'Powered by Java',
title: 'Chat with Images',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
description: (
<>
Supports interactions with vision/image models, allowing you to build applications that can understand and respond to visual content. Upload images directly into your chat sessions and receive intelligent, context-aware replies.
</>
),
},
{
title: 'Tools Support',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: (
<>
Empowers Java developers to harness the full capabilities of Ollama.
Supports tool/function calling with tool calling models such as mistral, llama3.x, qwen, etc. Empower your models to interact with external services and data sources, enabling more complex and dynamic AI workflows.
</>
),
},
];
const UsageList = [
{
title: 'Datafaker',
Svg: require('@site/static/img/datafaker.svg').default,
link: 'https://www.datafaker.net/',
description: (
<>
A powerful fake data generation library designed for JVM programs, offering over 200 data providers to easily create realistic and diverse datasets within minutes.
</>
),
imageSize: '20%',
},
{
title: 'Katie',
Svg: require('@site/static/img/katie_logo_v3.svg').default,
link: 'https://katie.qa/home',
description: (
<>
An Open Source AI-based question-answering platform that helps companies and organizations make their private domain knowledge accessible and useful to their employees and customers.
</>
),
imageSize: '30%',
},
{
title: 'AI Player',
Svg: require('@site/static/img/ai-player.svg').default,
link: 'https://modrinth.com/mod/ai-player',
description: (
<>
A minecraft mod which aims to add a "second player" into the game which will actually be intelligent.
</>
),
imageSize: '15%',
},
{
title: 'Ollama Translator Plugin',
Svg: require('@site/static/img/minecraft-spigot.svg').default,
link: 'https://github.com/liebki/ollama-translator',
description: (
<>
A minecraft 1.21 spigot plugin allows to easily break language barriers by using ollama on the server to translate all messages into a specfic target language.
</>
),
imageSize: '20%',
},
{
title: 'JnsCLI',
Svg: require('@site/static/img/jnscli.svg').default,
link: 'https://github.com/mirum8/jnscli',
description: (
<>
JnsCLI is a command-line tool for Jenkins, allowing you to manage jobs, builds, and configurations directly from the terminal. It also features AI-powered error analysis for quick troubleshooting.
</>
),
imageSize: '20%',
},
{
title: 'Featured in a Research Article on AI-Assisted Code Optimization',
Svg: require('@site/static/img/pmc-logo.svg').default,
link: 'https://pmc.ncbi.nlm.nih.gov/articles/PMC11750896/',
description: (
<>
Ollama4j was used in a research article Large Language Model Based Mutations in Genetic Improvement (PubMed Central).
</>
),
imageSize: '50%',
},
];
function Feature({Svg, title, description}) {
function Feature({ Svg, title, description }) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
@ -47,8 +114,31 @@ function Feature({Svg, title, description}) {
);
}
function Usage({ Svg, title, description, link, imageSize }) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" style={{ width: imageSize }} />
</div>
<div className="text--center padding-horiz--md">
<Heading as="h3" style={{ color: 'red' }}>
{link ? (
<a href={link} target="_blank" rel="noopener noreferrer" style={{ color: '#11bc11' }}>
{title}
</a>
) : (
<span style={{ color: 'red' }}>{title}</span>
)}
</Heading>
<p>{description}</p>
</div>
</div>
);
}
export default function HomepageFeatures() {
return (
<>
<section className={styles.features}>
<div className="container">
<div className="row">
@ -58,5 +148,19 @@ export default function HomepageFeatures() {
</div>
</div>
</section>
<hr />
<section className={styles.features}>
<div className="container">
<div style={{ fontSize: '20px', fontWeight: 'bold', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
Check out who's using Ollama4j
</div>
<div className="row">
{UsageList.map((props, idx) => (
<Usage key={idx} {...props} />
))}
</div>
</div>
</section>
</>
);
}

View File

@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
const LatestRelease = () => {
const LatestRelease = ({ showReleaseDate }) => {
const [releaseInfo, setReleaseInfo] = useState(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
@ -37,7 +37,8 @@ const LatestRelease = () => {
<div>
{/* <h4 style={{ display: 'flex', justifyContent: 'center'}}>Latest Release</h4> */}
<div>
<span style={{ fontWeight: 'bold'}}>Latest Version</span>: <a href={releaseInfo.html_url} target='_blank' rel="noopener noreferrer"><span style={{color: 'white', fontWeight: 'bold', backgroundColor:'#11bc11', borderRadius: '15px', padding: '5px'}}>{releaseInfo.name}</span></a> released on {new Date(releaseInfo.published_at).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' })}.
<span style={{ fontWeight: 'bold'}}>Latest Version</span>: <a href={releaseInfo.html_url} target='_blank' rel="noopener noreferrer"><span style={{color: 'white', fontWeight: 'bold', backgroundColor:'#11bc11', borderRadius: '15px', padding: '5px'}}>{releaseInfo.name}</span></a>
{showReleaseDate && ` released on ${new Date(releaseInfo.published_at).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' })}`}
</div>
{/* <pre style={{ whiteSpace: 'pre-wrap' }}>
{JSON.stringify(releaseInfo, null, 2)}

View File

@ -10,7 +10,6 @@ import BrowserOnly from '@docusaurus/BrowserOnly';
import LatestRelease from '@site/src/components/LatestRelease';
function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
return (
@ -32,7 +31,7 @@ function HomepageHeader() {
</Link>
</div>
<div style={{ marginTop: '3rem' }}>
<LatestRelease />
<LatestRelease showReleaseDate={false} />
</div>
</div>
</header>

7
docs/static/img/ai-player.svg vendored Normal file
View File

@ -0,0 +1,7 @@
<svg width="96" height="96" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg">
<rect width="96" height="96" rx="16" fill="#3F0F8D"/>
<path d="M26 24H70V32H26V24Z" fill="white"/>
<path d="M36 44H44V52H36V44Z" fill="white"/>
<path d="M52 44H60V52H52V44Z" fill="white"/>
<path d="M36 60H60V68H36V60Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 335 B

1
docs/static/img/datafaker.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="gray" d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"></path></svg>

After

Width:  |  Height:  |  Size: 263 B

345
docs/static/img/jnscli.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 501 KiB

13
docs/static/img/katie_logo_v3.svg vendored Normal file
View File

@ -0,0 +1,13 @@
<svg width="539" height="122" viewBox="0 0 539 122" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M233.794 106.267L194.606 73.1369L230.215 42.896C233.395 40.1969 233.755 35.4621 231.017 32.3237C228.282 29.1851 223.482 28.8263 220.301 31.533L177.914 67.5271V10.039C177.914 5.89749 174.511 2.54163 170.316 2.54163C166.119 2.54163 162.717 5.89749 162.717 10.039V111.961C162.717 116.103 166.119 119.458 170.316 119.458C174.511 119.458 177.914 116.103 177.914 111.961V78.7709L223.905 117.655C225.339 118.865 227.096 119.458 228.847 119.458C230.988 119.458 233.116 118.571 234.62 116.84C237.35 113.694 236.981 108.961 233.794 106.267Z" fill="#414041"/>
<path d="M323.056 30.4831C318.932 30.4831 315.592 33.8533 315.592 38.0129V42.0425C307.753 33.3984 296.966 27.9584 285.263 27.9584C262.554 27.9584 244.075 49.0502 244.075 74.9781C244.075 100.907 262.554 122 285.263 122C298.217 122 308.397 116.775 315.592 108.901V112.96C315.592 117.12 318.932 120.49 323.056 120.49C327.178 120.49 330.519 117.12 330.519 112.96V38.0129C330.519 33.8533 327.178 30.4831 323.056 30.4831ZM285.263 106.941C271.027 106.941 259.002 92.3023 259.002 74.9781C259.002 57.6537 271.027 43.018 285.263 43.018C298.803 43.018 313.299 55.8594 313.299 74.9781C313.299 95.962 299.197 106.941 285.263 106.941Z" fill="#414041"/>
<path d="M411.244 105.137C409.576 101.309 405.12 99.5521 401.277 101.222C400.739 101.454 400.076 101.763 399.304 102.121C395.776 103.764 385.034 108.765 380.927 106.146C378.976 104.904 377.859 100.863 377.859 95.0546V43.0501H394.522C398.705 43.0501 402.096 39.6633 402.096 35.4831C402.096 31.3029 398.705 27.9159 394.522 27.9159H377.859V7.56714C377.859 3.38695 374.47 0 370.285 0C366.102 0 362.711 3.38695 362.711 7.56714V27.9159H350.805C346.621 27.9159 343.231 31.3029 343.231 35.4831C343.231 39.6633 346.621 43.0501 350.805 43.0501H362.711V95.0546C362.711 106.629 366.102 114.654 372.785 118.909C376.316 121.155 380.207 122 384.1 122C392.482 122 400.877 118.088 405.707 115.839C406.339 115.544 406.885 115.288 407.327 115.095C411.161 113.428 412.917 108.969 411.244 105.137Z" fill="#414041"/>
<path d="M502.288 122C487.874 122 460.527 111.883 460.187 73.5909C460.052 58.2558 464.703 45.0328 473.288 36.3573C480.37 29.1992 489.739 25.4166 500.381 25.4166C526.708 25.4166 537.58 47.0116 538.976 67.2225C539.168 69.9859 538.2 72.7323 536.321 74.7481C534.467 76.7394 531.854 77.8793 529.147 77.8793H475.52C477.843 105.988 499.689 106.84 502.288 106.84C516.078 106.84 523.655 98.4106 523.729 98.327C526.452 95.1443 531.226 94.7713 534.398 97.4901C537.577 100.209 537.951 104.994 535.234 108.177C534.754 108.742 523.197 122 502.288 122ZM476.301 62.7194H523.227C519.981 43.6041 507.776 40.5766 500.381 40.5766C493.774 40.5766 488.273 42.7479 484.036 47.0289C480.257 50.851 477.621 56.2473 476.301 62.7194Z" fill="#414041"/>
<path d="M434.759 33.0416C430.546 33.0416 427.132 36.4385 427.132 40.6307V111.869C427.132 116.061 430.546 119.458 434.759 119.458C438.973 119.458 442.387 116.061 442.387 111.869V40.6307C442.387 36.4385 438.973 33.0416 434.759 33.0416Z" fill="#414041"/>
<path d="M434.759 22.875C440.376 22.875 444.929 18.3232 444.929 12.7083C444.929 7.09347 440.376 2.54163 434.759 2.54163C429.142 2.54163 424.59 7.09347 424.59 12.7083C424.59 18.3232 429.142 22.875 434.759 22.875Z" fill="#414041"/>
<path d="M111.868 0H10.1698C4.55318 0 0 4.55177 0 10.1667V111.833C0 117.448 4.55318 122 10.1698 122H111.868C117.485 122 122.038 117.448 122.038 111.833V10.1667C122.038 4.55177 117.485 0 111.868 0Z" fill="#FF89BB"/>
<path d="M119.138 3H3.10229V119H119.138V3Z" fill="#FF89BB"/>
<path d="M37.0639 65.2438C41.7531 65.2438 45.5543 60.8104 45.5543 55.3414C45.5543 49.8724 41.7531 45.439 37.0639 45.439C32.3748 45.439 28.5735 49.8724 28.5735 55.3414C28.5735 60.8104 32.3748 65.2438 37.0639 65.2438Z" fill="#414041"/>
<path d="M82.3464 56.756C87.0355 56.756 90.8368 52.3226 90.8368 46.8536C90.8368 41.3846 87.0355 36.9512 82.3464 36.9512C77.6573 36.9512 73.856 41.3846 73.856 46.8536C73.856 52.3226 77.6573 56.756 82.3464 56.756Z" fill="#414041"/>
<path d="M59.8714 99.1951C42.5471 99.1951 30.8795 89.4538 30.3195 88.985C28.2142 87.1935 27.9803 84.0583 29.7949 81.9799C31.6096 79.9085 34.771 79.6705 36.8763 81.448C37.0748 81.616 49.2599 91.5603 65.9462 88.747C83.0366 85.8638 93.003 73.0154 93.1022 72.8894C94.768 70.699 97.9153 70.2511 100.134 71.8887C102.353 73.5262 102.821 76.6194 101.169 78.8168C100.673 79.4746 88.8208 94.9683 67.6333 98.5373C64.9468 98.9992 62.3453 99.1951 59.8714 99.1951Z" fill="#414041"/>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

1
docs/static/img/minecraft-spigot.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 512 448.012"><path fill="#424C57" fill-rule="nonzero" d="M386.912 404.082c-31.653 27.804-68.134 42.5-104.037 43.83-37.327 1.383-73.956-11.673-103.851-39.445l-15.148-14.072-54.139-44.075h-48.07c-25.406 0-43.633-20.936-46.214-46.212L.195 154.71c-2.581-25.279 20.879-48.258 46.214-46.215l189.276 15.258c25.335 2.042 46.214 20.793 46.214 46.215v134.14c0 25.418-20.805 46.212-46.214 46.212h-59.323l4.221 47.53 4.398 2.497c33.226 18.862 65.806 26.928 96.721 22.849 28.258-3.73 55.317-17.66 80.412-42.828l-15.449-13.603 64.278-14.309-7.532 67.307-16.499-15.681z"/><path fill="#337EC6" d="M276.315 73.91l113.118-9.119-30.176-17.127c-33.228-18.859-65.809-26.927-96.721-22.848-28.26 3.73-55.319 17.66-80.414 42.827l15.449 13.604-64.277 14.309 7.533-67.307 16.498 15.682C188.979 16.128 225.46 1.43 261.363.099c37.327-1.382 73.956 11.673 103.851 39.446l26.942 25.027 73.434-5.92c25.335-2.042 48.796 20.936 46.215 46.216l-15.258 149.397c-2.581 25.277-20.808 46.212-46.215 46.212h-50.099l-71.815 58.466 5.19-58.466h-57.293c-25.411 0-46.216-20.793-46.216-46.212V120.126c0-25.422 20.881-44.173 46.216-46.216z"/><path fill="#fff" d="M84.246 173.714h43.841v-12.353h19.585v12.353h44.001v20.281h-9.033c-1.629 12.811-5.21 23.368-11.297 34.746-5.149 9.611-11.796 18.87-19.516 27.744 12.32 14.735 27.616 27.554 45.826 39.24l-10.073 15.701c-19.119-12.267-35.356-25.774-48.699-41.332-11.936 11.547-25.496 22.303-39.7 32.127l-10.588-15.325c14.055-9.725 27.407-20.347 38.896-31.672-10.588-15.493-18.697-32.88-24.308-52.875l17.968-5.038c4.601 16.401 11.052 30.837 19.344 43.759 5.657-6.848 10.548-13.876 14.412-21.092 4.74-8.866 7.286-16.196 8.89-25.983H84.246v-20.281zM398.456 215.314h-55.931l-7.357 25.09h-27.814c11.988-31.729 25.831-69.829 37.825-101.573 4.318-11.466 9.234-30.467 24.943-30.467 16.284 0 21.691 17.409 26.222 29.436l38.4 103.122h-28.708l-7.58-25.608zm-6-24.398l-21.893-57.703-21.971 57.703h43.864z"/></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
docs/static/img/ollama4j-ui/1.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 KiB

BIN
docs/static/img/ollama4j-ui/2.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 KiB

BIN
docs/static/img/ollama4j-ui/3.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 KiB

BIN
docs/static/img/ollama4j-ui/4.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 KiB

12
docs/static/img/pmc-logo.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.8 KiB