Klasse OllamaAsyncResultCallback

java.lang.Object
java.lang.Thread
io.github.amithkoujalgi.ollama4j.core.models.OllamaAsyncResultCallback
Alle implementierten Schnittstellen:
Runnable

public class OllamaAsyncResultCallback extends Thread
  • Konstruktordetails

    • OllamaAsyncResultCallback

      public OllamaAsyncResultCallback(HttpClient client, URI uri, OllamaRequestModel ollamaRequestModel, long requestTimeoutSeconds)
  • Methodendetails

    • run

      public void run()
      Angegeben von:
      run in Schnittstelle Runnable
      Setzt außer Kraft:
      run in Klasse Thread
    • 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

      public String getResponse()
      Returns the final response when the execution completes. Does not return intermediate results.
      Gibt zurück:
      String - response text
    • getStream

      public Queue<String> 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)