From 4f70d1ee80c3c523d61029f7b2200c4b9badfd6d Mon Sep 17 00:00:00 2001 From: Amith Koujalgi Date: Sun, 12 Nov 2023 23:06:06 +0530 Subject: [PATCH] Updated readme --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index fa47e84..3a27473 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ Response: ```java public class Main { - public static void main(String[] args) throws Exception { + public static void main(String[] args) { String host = "http://localhost:11434/"; OllamaAPI ollamaAPI = new OllamaAPI(host); ollamaAPI.createModel("mycustommodel", "/path/to/modelfile/on/ollama-server"); @@ -166,7 +166,7 @@ public class Main { ```java public class Main { - public static void main(String[] args) throws Exception { + public static void main(String[] args) { String host = "http://localhost:11434/"; OllamaAPI ollamaAPI = new OllamaAPI(host); ollamaAPI.setVerbose(false); @@ -179,12 +179,11 @@ public class Main { ```java public class Main { - public static void main(String[] args) throws Exception { + public static void main(String[] args) { String host = "http://localhost:11434/"; OllamaAPI ollamaAPI = new OllamaAPI(host); - ollamaAPI.setVerbose(true); - List doubleList = ollamaAPI.generateEmbeddings(OllamaModelType.LLAMA2, "Here is an article about llamas..."); - doubleList.forEach(System.out::println); + List embeddings = ollamaAPI.generateEmbeddings(OllamaModelType.LLAMA2, "Here is an article about llamas..."); + embeddings.forEach(System.out::println); } } ``` @@ -236,7 +235,7 @@ You'd then get a response from the model: ```java public class Main { - public static void main(String[] args) throws Exception { + public static void main(String[] args) { String host = "http://localhost:11434/"; OllamaAPI ollamaAPI = new OllamaAPI(host); @@ -269,7 +268,7 @@ You'd then get a response from the model: ```java public class Main { - public static void main(String[] args) throws Exception { + public static void main(String[] args) { String host = "http://localhost:11434/"; OllamaAPI ollamaAPI = new OllamaAPI(host); @@ -297,7 +296,7 @@ GROUP BY customers.name; ```java public class Main { - public static void main(String[] args) throws Exception { + public static void main(String[] args) { String host = "http://localhost:11434/"; OllamaAPI ollamaAPI = new OllamaAPI(host);