forked from Mirror/ollama4j
init
This commit is contained in:
parent
4a536139e8
commit
a12c4c7c49
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user