Class Run.RunResult
java.lang.Object
com.jackdaw.chatwithnpc.openaiapi.Run.RunResult
- All Implemented Interfaces:
AsyncTask.TaskResult
- Enclosing class:
- Run
Represents the result of a Run request.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable ConversationHandlerprivate final @Nullable Run -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the RunResult by calling the functions and replying to the conversation.booleanReturns whether the RunResult is callable.(package private) static @NotNull Run.RunResultReturns a RunResult that does nothing.
-
Field Details
-
conversation
-
run
-
-
Constructor Details
-
RunResult
RunResult(@Nullable @Nullable ConversationHandler conversation, @Nullable @Nullable Run run)
-
-
Method Details
-
execute
public void execute()Executes the RunResult by calling the functions and replying to the conversation.- Specified by:
executein interfaceAsyncTask.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:
isCallablein interfaceAsyncTask.TaskResult- Returns:
- True if the RunResult is callable, false otherwise.
-
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.
-