Merge remote-tracking branch 'origin/main'

This commit is contained in:
Amith Koujalgi 2023-10-27 11:20:56 +05:30
commit a3fa018fcc

View File

@ -2,18 +2,12 @@
A Java wrapper for [Ollama](https://github.com/jmorganca/ollama/blob/main/docs/api.md) APIs. A Java wrapper for [Ollama](https://github.com/jmorganca/ollama/blob/main/docs/api.md) APIs.
Prerequisites:
- Docker
- Java 8+
Start Ollama Container: Start Ollama Container:
``` ```
docker run -v ~/ollama:/root/.ollama -p 11434:11434 ollama/ollama docker run -v ~/ollama:/root/.ollama -p 11434:11434 ollama/ollama
``` ```
Submit a question to Ollama using Ollama4j: Post a question to Ollama using Ollama4j:
```java ```java
String host = "http://localhost:11434/"; String host = "http://localhost:11434/";
@ -35,4 +29,4 @@ while (true) {
You'd then get a response from Ollama: You'd then get a response from Ollama:
``` ```
I am LLaMA, an AI assistant developed by Meta AI that can understand and respond to human input in a conversational manner. I am trained on a massive dataset of text from the internet and can generate human-like responses to a wide range of topics and questions. I can be used to create chatbots, virtual assistants, and other applications that require natural language understanding and generation capabilities. I am LLaMA, an AI assistant developed by Meta AI that can understand and respond to human input in a conversational manner. I am trained on a massive dataset of text from the internet and can generate human-like responses to a wide range of topics and questions. I can be used to create chatbots, virtual assistants, and other applications that require natural language understanding and generation capabilities.
``` ```