Class BaseOutput
java.lang.Object
de.xima.fc.prompt.ms.impl.service.generic_oai.client.model.BaseOutput
- Direct Known Subclasses:
AskOutput, ListModelsOutput, TestConnectionOutput
Base class for outputs from API calls, with the ability to represent errors. Subclasses should add specific fields
for successful outputs.
- Since:
- 8.5.0
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedBaseOutput(GenericOaiErrorType errorType, String errorMessage, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionfinal ThrowableGets the exception that caused the error, if there was an error.final StringGets the error message, if there was an error.final GenericOaiErrorTypeGets the type of error, if there was an error.final booleanhasError()Checks if the output represents an error.
-
Constructor Details
-
BaseOutput
protected BaseOutput() -
BaseOutput
-
-
Method Details
-
errorCause
Gets the exception that caused the error, if there was an error.- Returns:
- The exception, or null if synthesis was successful.
-
errorMessage
Gets the error message, if there was an error.- Returns:
- The error message, or null if synthesis was successful.
-
errorType
Gets the type of error, if there was an error.- Returns:
- The error type, or null if synthesis was successful.
-
hasError
public final boolean hasError()Checks if the output represents an error.- Returns:
- true if there was an error, false otherwise.
-