forked from Mirror/ollama4j
updated docs
This commit is contained in:
parent
2e0e801533
commit
39210cf0c6
@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
slug: first-blog-post
|
|
||||||
title: First Blog Post
|
|
||||||
authors:
|
|
||||||
name: Gao Wei
|
|
||||||
title: Docusaurus Core Team
|
|
||||||
url: https://github.com/wgao19
|
|
||||||
image_url: https://github.com/wgao19.png
|
|
||||||
tags: [hola, docusaurus]
|
|
||||||
---
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
@ -1,44 +0,0 @@
|
|||||||
---
|
|
||||||
slug: long-blog-post
|
|
||||||
title: Long Blog Post
|
|
||||||
authors: endi
|
|
||||||
tags: [hello, docusaurus]
|
|
||||||
---
|
|
||||||
|
|
||||||
This is the summary of a very long blog post,
|
|
||||||
|
|
||||||
Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.
|
|
||||||
|
|
||||||
<!--truncate-->
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
slug: mdx-blog-post
|
|
||||||
title: MDX Blog Post
|
|
||||||
authors: [slorber]
|
|
||||||
tags: [docusaurus]
|
|
||||||
---
|
|
||||||
|
|
||||||
Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
|
|
||||||
Use the power of React to create interactive blog posts.
|
|
||||||
|
|
||||||
```js
|
|
||||||
<button onClick={() => alert('button clicked!')}>Click me!</button>
|
|
||||||
```
|
|
||||||
|
|
||||||
<button onClick={() => alert('button clicked!')}>Click me!</button>
|
|
||||||
|
|
||||||
:::
|
|
Binary file not shown.
Before Width: | Height: | Size: 94 KiB |
@ -1,25 +0,0 @@
|
|||||||
---
|
|
||||||
slug: welcome
|
|
||||||
title: Welcome
|
|
||||||
authors: [slorber, yangshun]
|
|
||||||
tags: [facebook, hello, docusaurus]
|
|
||||||
---
|
|
||||||
|
|
||||||
[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
|
|
||||||
|
|
||||||
Simply add Markdown files (or folders) to the `blog` directory.
|
|
||||||
|
|
||||||
Regular blog authors can be added to `authors.yml`.
|
|
||||||
|
|
||||||
The blog post date can be extracted from filenames, such as:
|
|
||||||
|
|
||||||
- `2019-05-30-welcome.md`
|
|
||||||
- `2019-05-30-welcome/index.md`
|
|
||||||
|
|
||||||
A blog post folder can be convenient to co-locate blog post images:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The blog supports tags as well!
|
|
||||||
|
|
||||||
**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
|
|
9
docs/blog/2023-12-01-welcome/index.md
Normal file
9
docs/blog/2023-12-01-welcome/index.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
slug: welcome
|
||||||
|
title: Welcome
|
||||||
|
authors: [ amith ]
|
||||||
|
tags: [ Java, AI, LLM, GenAI, GenerativeAI, Ollama, Ollama4J, OpenSource, Developers
|
||||||
|
]
|
||||||
|
---
|
||||||
|
|
||||||
|
Welcome Java Developers!
|
71
docs/blog/2023-12-22-release-post.md
Normal file
71
docs/blog/2023-12-22-release-post.md
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
---
|
||||||
|
slug: release-post
|
||||||
|
title: Release
|
||||||
|
authors: [ amith ]
|
||||||
|
tags: [ Java, AI, LLM, GenAI, GenerativeAI, Ollama, Ollama4j, OpenSource, Developers
|
||||||
|
]
|
||||||
|
---
|
||||||
|
|
||||||
|
Hey there, my fellow Java Developers! 🚀
|
||||||
|
|
||||||
|
I am glad to announce the release of Ollama4j, a library that unites Ollama (an LLM manager and runner) and your Java
|
||||||
|
applications! 🌐🚀
|
||||||
|
|
||||||
|
👉 GitHub Repository: Ollama4j on GitHub (https://lnkd.in/gShPqwkR)
|
||||||
|
|
||||||
|
🌟 Key Features:
|
||||||
|
|
||||||
|
- Easy integration with Ollama, enabling the execution of large language models locally.
|
||||||
|
|
||||||
|
- Clean and simple APIs, focused on seamless interaction with Ollama.
|
||||||
|
|
||||||
|
- Empowers Java developers to harness the full capabilities of Ollama.
|
||||||
|
|
||||||
|
- Provides APIs to perform operations such as listing, pulling, deleting models, and creating custom models.
|
||||||
|
|
||||||
|
- Provides APIs to ask questions (generate completions) to the LLMs in synchronous and asynchronous modes.
|
||||||
|
|
||||||
|
- Ability to ask questions along with image files or image URLs! 🤩
|
||||||
|
|
||||||
|
- Open-source and primed for collaborative contributions from the community!
|
||||||
|
|
||||||
|
🦙 What is Ollama?
|
||||||
|
|
||||||
|
Ollama is an advanced AI tool that allows users to easily set up and run large language models locally (in CPU and GPU
|
||||||
|
modes). With Ollama, users can leverage powerful language models such as Llama 2 and even customize and create their own
|
||||||
|
models.
|
||||||
|
|
||||||
|
For more details about Ollama, check these out:
|
||||||
|
|
||||||
|
- https://ollama.ai/
|
||||||
|
|
||||||
|
- https://lnkd.in/g8MQqnMT
|
||||||
|
|
||||||
|
👨💻 Why Ollama4j?
|
||||||
|
|
||||||
|
As a Java developer passionate about harnessing the latest advancements in AI, I realized the need for a simple and
|
||||||
|
efficient way to integrate Ollama into Java applications. That's why I authored Ollama4j!
|
||||||
|
|
||||||
|
🔧 How to Get Started:
|
||||||
|
|
||||||
|
Visit the GitHub repository: Ollama4j on GitHub.
|
||||||
|
|
||||||
|
Follow the easy setup instructions in the README to integrate Ollama into your Java projects.
|
||||||
|
|
||||||
|
Start unlocking the potential of large language models in your applications!
|
||||||
|
|
||||||
|
🙏 Contributions Welcome:
|
||||||
|
|
||||||
|
I invite the Java developer community to explore, use, and contribute to Ollama4j. Your feedback, suggestions, and
|
||||||
|
contributions will help this library get better.
|
||||||
|
|
||||||
|
I am excited about the possibilities that Ollama4j opens up for Java developers. Whether you're working on natural
|
||||||
|
language processing, chatbots, or any application that can benefit from advanced language models, Ollama4j is here to
|
||||||
|
elevate your projects.
|
||||||
|
|
||||||
|
I look forward to seeing the incredible applications/projects you'll build with Ollama4j! 🌟
|
||||||
|
|
||||||
|
You can find the Javadoc here: https://lnkd.in/gzmWTX7h
|
||||||
|
|
||||||
|
Ollama4j Docs is powered by [Docusaurus](https://docusaurus.io).
|
||||||
|
|
@ -1,17 +1,5 @@
|
|||||||
endi:
|
amith:
|
||||||
name: Endilie Yacop Sucipto
|
name: Amith Koujalgi
|
||||||
title: Maintainer of Docusaurus
|
title: Maintainer of Ollama4j
|
||||||
url: https://github.com/endiliey
|
url: https://github.com/amithkoujalgi
|
||||||
image_url: https://github.com/endiliey.png
|
image_url: https://github.com/amithkoujalgi.png
|
||||||
|
|
||||||
yangshun:
|
|
||||||
name: Yangshun Tay
|
|
||||||
title: Front End Engineer @ Facebook
|
|
||||||
url: https://github.com/yangshun
|
|
||||||
image_url: https://github.com/yangshun.png
|
|
||||||
|
|
||||||
slorber:
|
|
||||||
name: Sébastien Lorber
|
|
||||||
title: Docusaurus maintainer
|
|
||||||
url: https://sebastienlorber.com
|
|
||||||
image_url: https://github.com/slorber.png
|
|
||||||
|
@ -15,10 +15,14 @@ Parameters:
|
|||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
String host = "http://localhost:11434/";
|
String host = "http://localhost:11434/";
|
||||||
|
|
||||||
OllamaAPI ollamaAPI = new OllamaAPI(host);
|
OllamaAPI ollamaAPI = new OllamaAPI(host);
|
||||||
|
|
||||||
List<Double> embeddings = ollamaAPI.generateEmbeddings(OllamaModelType.LLAMA2,
|
List<Double> embeddings = ollamaAPI.generateEmbeddings(OllamaModelType.LLAMA2,
|
||||||
"Here is an article about llamas...");
|
"Here is an article about llamas...");
|
||||||
|
|
||||||
embeddings.forEach(System.out::println);
|
embeddings.forEach(System.out::println);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,13 @@ This API lets you create a delete a model from the Ollama server.
|
|||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
String host = "http://localhost:11434/";
|
String host = "http://localhost:11434/";
|
||||||
|
|
||||||
OllamaAPI ollamaAPI = new OllamaAPI(host);
|
OllamaAPI ollamaAPI = new OllamaAPI(host);
|
||||||
|
|
||||||
ollamaAPI.setVerbose(false);
|
ollamaAPI.setVerbose(false);
|
||||||
|
|
||||||
ollamaAPI.deleteModel("mycustommodel", true);
|
ollamaAPI.deleteModel("mycustommodel", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,13 @@ This API lets you get the details of a model on the Ollama server.
|
|||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
String host = "http://localhost:11434/";
|
String host = "http://localhost:11434/";
|
||||||
|
|
||||||
OllamaAPI ollamaAPI = new OllamaAPI(host);
|
OllamaAPI ollamaAPI = new OllamaAPI(host);
|
||||||
|
|
||||||
ModelDetail modelDetails = ollamaAPI.getModelDetails(OllamaModelType.LLAMA2);
|
ModelDetail modelDetails = ollamaAPI.getModelDetails(OllamaModelType.LLAMA2);
|
||||||
|
|
||||||
System.out.println(modelDetails);
|
System.out.println(modelDetails);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ sidebar_position: 1
|
|||||||
|
|
||||||
# Intro
|
# Intro
|
||||||
|
|
||||||
Let's get started with **Ollama4J**.
|
Let's get started with **Ollama4j**.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import {themes as prismThemes} from 'prism-react-renderer';
|
|||||||
|
|
||||||
/** @type {import('@docusaurus/types').Config} */
|
/** @type {import('@docusaurus/types').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
title: 'Ollama4J',
|
title: 'Ollama4j',
|
||||||
tagline: 'Java library for interacting with Ollama.',
|
tagline: 'Java library for interacting with Ollama.',
|
||||||
favicon: 'img/favicon.ico',
|
favicon: 'img/favicon.ico',
|
||||||
|
|
||||||
@ -66,9 +66,9 @@ const config = {
|
|||||||
// Replace with your project's social card
|
// Replace with your project's social card
|
||||||
image: 'img/docusaurus-social-card.jpg',
|
image: 'img/docusaurus-social-card.jpg',
|
||||||
navbar: {
|
navbar: {
|
||||||
title: 'Ollama4J',
|
title: 'Ollama4j',
|
||||||
logo: {
|
logo: {
|
||||||
alt: 'Ollama4J Logo',
|
alt: 'Ollama4j Logo',
|
||||||
src: 'img/logo.svg',
|
src: 'img/logo.svg',
|
||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
@ -126,7 +126,7 @@ const config = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
copyright: `Ollama4J Documentation ${new Date().getFullYear()}. Built with Docusaurus.`,
|
copyright: `Ollama4j Documentation ${new Date().getFullYear()}. Built with Docusaurus.`,
|
||||||
},
|
},
|
||||||
prism: {
|
prism: {
|
||||||
theme: prismThemes.github,
|
theme: prismThemes.github,
|
||||||
|
@ -14,7 +14,7 @@ function HomepageHeader() {
|
|||||||
<Heading as="h1" className="hero__title">
|
<Heading as="h1" className="hero__title">
|
||||||
{siteConfig.title}
|
{siteConfig.title}
|
||||||
</Heading>
|
</Heading>
|
||||||
<img src="img/logo.svg" alt="Ollama4J Logo" className={styles.logo} style={{maxWidth: '20vh'}}/>
|
<img src="img/logo.svg" alt="Ollama4j Logo" className={styles.logo} style={{maxWidth: '20vh'}}/>
|
||||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||||
<div className={styles.buttons}>
|
<div className={styles.buttons}>
|
||||||
<Link
|
<Link
|
||||||
|
Loading…
x
Reference in New Issue
Block a user