Class OllamaAsyncResultCallback

java.lang.Object
java.lang.Thread
io.github.amithkoujalgi.ollama4j.core.models.OllamaAsyncResultCallback
All Implemented Interfaces:
Runnable

public class OllamaAsyncResultCallback extends Thread
  • Constructor Details

  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class 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.
      Returns:
      boolean - status
    • getResponse

      public String getResponse()
      Returns the final completion/response when the execution completes. Does not return intermediate results.
      Returns:
      String completion/response text
    • getStream

      public Queue<String> getStream()
    • setRequestTimeoutSeconds

      public void setRequestTimeoutSeconds(long requestTimeoutSeconds)