diff --git a/README.md b/README.md index 99dc756..b20490d 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Install: From [Maven Central](https://s01.oss.sonatype.org/#nexus-search;quick~ollama4j): ```xml + io.github.amithkoujalgi ollama4j @@ -21,9 +22,10 @@ From [Maven Central](https://s01.oss.sonatype.org/#nexus-search;quick~ollama4j): You might want to include the Maven repository to pull the ollama4j library from. Include this in your `pom.xml`: ```xml + - ollama-from-ossrh + ollama4j-from-ossrh https://s01.oss.sonatype.org/content/repositories/snapshots @@ -36,6 +38,7 @@ mvn clean install ``` Start Ollama Container: + ``` docker run -v ~/ollama:/root/.ollama -p 11434:11434 ollama/ollama ``` @@ -51,6 +54,7 @@ public class Main { } } ``` + Post a question to Ollama using Ollama4j: Using sync API: @@ -86,6 +90,7 @@ public class Main { ``` 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. ``` diff --git a/src/main/java/io/github/amithkoujalgi/ollama4j/Main.java b/src/main/java/io/github/amithkoujalgi/ollama4j/Main.java index d62dc76..3503e78 100644 --- a/src/main/java/io/github/amithkoujalgi/ollama4j/Main.java +++ b/src/main/java/io/github/amithkoujalgi/ollama4j/Main.java @@ -10,7 +10,7 @@ public class Main { OllamaAPI ollamaAPI = new OllamaAPI(host); String prompt1 = SamplePrompts.getSampleDatabasePromptWithQuestion("List all customer names who have bought one or more products"); - String response1 = ollamaAPI.ask(OllamaModelType.LLAMA2, prompt1); + String response1 = ollamaAPI.ask(OllamaModelType.SQLCODER, prompt1); System.out.println(response1); String prompt2 = "Give me a list of world cup cricket teams.";