This commit is contained in:
Amith Koujalgi 2023-10-27 01:16:40 +05:30
parent 4a536139e8
commit a12c4c7c49

View File

@ -16,8 +16,6 @@ docker run -v ~/ollama:/root/.ollama -p 11434:11434 ollama/ollama
Submit a question to Ollama using Ollama4j: Submit a question to Ollama using Ollama4j:
```java ```java
public class Test {
public static void main(String[] args) throws Exception {
String host = "http://localhost:11434/"; String host = "http://localhost:11434/";
OllamaAPI ollamaAPI = new OllamaAPI(host); OllamaAPI ollamaAPI = new OllamaAPI(host);
@ -32,8 +30,6 @@ public class Test {
} }
Thread.sleep(1000); Thread.sleep(1000);
} }
}
}
``` ```
You'd then get a response from Ollama: You'd then get a response from Ollama: