|
| OllamaGenerateEndpointCaller (String host, BasicAuth basicAuth, long requestTimeoutSeconds, boolean verbose) |
|
OllamaResult | call (OllamaRequestBody body, OllamaStreamHandler streamHandler) throws OllamaBaseException, IOException, InterruptedException |
|
OllamaResult | callSync (OllamaRequestBody body) throws OllamaBaseException, IOException, InterruptedException |
|
| OllamaEndpointCaller (String host, BasicAuth basicAuth, long requestTimeoutSeconds, boolean verbose) |
|
◆ OllamaGenerateEndpointCaller()
io.github.ollama4j.models.request.OllamaGenerateEndpointCaller.OllamaGenerateEndpointCaller |
( |
String | host, |
|
|
BasicAuth | basicAuth, |
|
|
long | requestTimeoutSeconds, |
|
|
boolean | verbose ) |
◆ call()
◆ callSync()
Calls the api server on the given host and endpoint suffix asynchronously, aka waiting for the response.
- Parameters
-
- Returns
- result answer given by the assistant
- Exceptions
-
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 70 of file OllamaGenerateEndpointCaller.java.
◆ getEndpointSuffix()
String io.github.ollama4j.models.request.OllamaGenerateEndpointCaller.getEndpointSuffix |
( |
| ) |
|
|
protected |
◆ parseResponseAndAddToBuffer()
boolean io.github.ollama4j.models.request.OllamaGenerateEndpointCaller.parseResponseAndAddToBuffer |
( |
String | line, |
|
|
StringBuilder | responseBuffer ) |
|
protected |
The documentation for this class was generated from the following file: