Ollama4j
A Java library (wrapper/binding) for Ollama server.
|
Public Member Functions | |
OllamaEndpointCaller (String host, BasicAuth basicAuth, long requestTimeoutSeconds, boolean verbose) | |
OllamaResult | callSync (OllamaRequestBody body) throws OllamaBaseException, IOException, InterruptedException |
Protected Member Functions | |
abstract String | getEndpointSuffix () |
abstract boolean | parseResponseAndAddToBuffer (String line, StringBuilder responseBuffer) |
Abstract helperclass to call the ollama api server.
Definition at line 27 of file OllamaEndpointCaller.java.
io.github.ollama4j.models.request.OllamaEndpointCaller.OllamaEndpointCaller | ( | String | host, |
BasicAuth | basicAuth, | ||
long | requestTimeoutSeconds, | ||
boolean | verbose ) |
Definition at line 36 of file OllamaEndpointCaller.java.
OllamaResult io.github.ollama4j.models.request.OllamaEndpointCaller.callSync | ( | OllamaRequestBody | body | ) | throws OllamaBaseException, IOException, InterruptedException |
Calls the api server on the given host and endpoint suffix asynchronously, aka waiting for the response.
body | POST body payload |
OllamaBaseException | any response code than 200 has been returned |
IOException | in case the responseStream can not be read |
InterruptedException | in case the server is not reachable or network issues happen |
Definition at line 57 of file OllamaEndpointCaller.java.
|
abstractprotected |
|
abstractprotected |