Klasse OllamaAsyncResultCallback
java.lang.Object
java.lang.Thread
io.github.amithkoujalgi.ollama4j.core.models.OllamaAsyncResultCallback
- Alle implementierten Schnittstellen:
Runnable
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen java.lang.Thread
Thread.BuilderPREVIEW, Thread.State, Thread.UncaughtExceptionHandler -
Feldübersicht
Von Klasse geerbte Felder java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungOllamaAsyncResultCallback(HttpClient client, URI uri, OllamaRequestModel ollamaRequestModel, long requestTimeoutSeconds) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungintReturns the HTTP response status code for the request that was made to Ollama server.Returns the final response when the execution completes.longReturns the response time in milliseconds.booleanReturns the status of the thread.booleanReturns the status of the request.voidrun()voidsetRequestTimeoutSeconds(long requestTimeoutSeconds) Von Klasse geerbte Methoden java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Konstruktordetails
-
OllamaAsyncResultCallback
public OllamaAsyncResultCallback(HttpClient client, URI uri, OllamaRequestModel ollamaRequestModel, long requestTimeoutSeconds)
-
-
Methodendetails
-
run
public void run() -
isComplete
public boolean isComplete()Returns the status of the thread. This does not indicate that the request was successful or a failure, rather it is just a status flag to indicate if the thread is active or ended.- Gibt zurück:
- boolean - status
-
getHttpStatusCode
public int getHttpStatusCode()Returns the HTTP response status code for the request that was made to Ollama server.- Gibt zurück:
- int - the status code for the request
-
isSucceeded
public boolean isSucceeded()Returns the status of the request. Indicates if the request was successful or a failure. If the request was a failure, the `getResponse()` method will return the error message.- Gibt zurück:
- boolean - status
-
getResponse
Returns the final response when the execution completes. Does not return intermediate results.- Gibt zurück:
- String - response text
-
getStream
-
getResponseTime
public long getResponseTime()Returns the response time in milliseconds.- Gibt zurück:
- long - response time in milliseconds.
-
setRequestTimeoutSeconds
public void setRequestTimeoutSeconds(long requestTimeoutSeconds)
-