Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
io.github.ollama4j.models.request.OllamaEndpointCaller Class Referenceabstract
Inheritance diagram for io.github.ollama4j.models.request.OllamaEndpointCaller:
io.github.ollama4j.models.request.OllamaChatEndpointCaller io.github.ollama4j.models.request.OllamaGenerateEndpointCaller

Public Member Functions

 OllamaEndpointCaller (String host, BasicAuth basicAuth, long requestTimeoutSeconds, boolean verbose)
 

Protected Member Functions

abstract String getEndpointSuffix ()
 
abstract boolean parseResponseAndAddToBuffer (String line, StringBuilder responseBuffer)
 
HttpRequest.Builder getRequestBuilderDefault (URI uri)
 
String getBasicAuthHeaderValue ()
 
boolean isBasicAuthCredentialsSet ()
 

Detailed Description

Abstract helperclass to call the ollama api server.

Definition at line 29 of file OllamaEndpointCaller.java.

Constructor & Destructor Documentation

◆ OllamaEndpointCaller()

io.github.ollama4j.models.request.OllamaEndpointCaller.OllamaEndpointCaller ( String host,
BasicAuth basicAuth,
long requestTimeoutSeconds,
boolean verbose )

Definition at line 38 of file OllamaEndpointCaller.java.

Member Function Documentation

◆ getBasicAuthHeaderValue()

String io.github.ollama4j.models.request.OllamaEndpointCaller.getBasicAuthHeaderValue ( )
protected

Get basic authentication header value.

Returns
basic authentication header value (encoded credentials)

Definition at line 72 of file OllamaEndpointCaller.java.

◆ getEndpointSuffix()

abstract String io.github.ollama4j.models.request.OllamaEndpointCaller.getEndpointSuffix ( )
abstractprotected

◆ getRequestBuilderDefault()

HttpRequest.Builder io.github.ollama4j.models.request.OllamaEndpointCaller.getRequestBuilderDefault ( URI uri)
protected

Get default request builder.

Parameters
uriURI to get a HttpRequest.Builder
Returns
HttpRequest.Builder

Definition at line 56 of file OllamaEndpointCaller.java.

◆ isBasicAuthCredentialsSet()

boolean io.github.ollama4j.models.request.OllamaEndpointCaller.isBasicAuthCredentialsSet ( )
protected

Check if Basic Auth credentials set.

Returns
true when Basic Auth credentials set

Definition at line 82 of file OllamaEndpointCaller.java.

◆ parseResponseAndAddToBuffer()

abstract boolean io.github.ollama4j.models.request.OllamaEndpointCaller.parseResponseAndAddToBuffer ( String line,
StringBuilder responseBuffer )
abstractprotected

The documentation for this class was generated from the following file: