Class Run.RunResult

java.lang.Object
com.jackdaw.chatwithnpc.openaiapi.Run.RunResult
All Implemented Interfaces:
AsyncTask.TaskResult
Enclosing class:
Run

public static class Run.RunResult extends Object implements AsyncTask.TaskResult
Represents the result of a Run request.
  • Field Details

    • conversation

      @Nullable private final @Nullable ConversationHandler conversation
    • run

      @Nullable private final @Nullable Run run
  • Constructor Details

  • Method Details

    • execute

      public void execute()
      Executes the RunResult by calling the functions and replying to the conversation.
      Specified by:
      execute in interface AsyncTask.TaskResult
    • isCallable

      public boolean isCallable()
      Returns whether the RunResult is callable. A RunResult is callable if it has a Run and a ConversationHandler and the Run should require an action.
      Specified by:
      isCallable in interface AsyncTask.TaskResult
      Returns:
      True if the RunResult is callable, false otherwise.
    • nothingToDo

      @Contract(value=" -> new", pure=true) @NotNull static @NotNull Run.RunResult nothingToDo()
      Returns a RunResult that does nothing. This is used when there is nothing to do after a Run request has been made
      Returns:
      A RunResult that does nothing.