Class PromptQueryTestExecutionResult
java.lang.Object
de.xima.fc.prompt.mgmt.gui.model.PromptQueryTestExecutionResult
- All Implemented Interfaces:
Serializable
Represents the result of a prompt query test execution, as started by the user in the backend query configuration UI.
- Since:
- 8.5.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new prompt query test execution result representing an error, i.e. when test execution failed.forSuccess(String json, List<PromptTestFileList<IPromptBinaryData>> files) Creates a new successful prompt query test execution result.getError()If this result represents anerror, gets the error message.getFiles()Gets the list of files that were produced as part of the prompt query test execution.getJson()Gets the JSON result of the prompt query test execution.booleanChecks whether this result represents an error, i.e. when test execution failed.
-
Method Details
-
getError
-
getFiles
Gets the list of files that were produced as part of the prompt query test execution. Contains one item for each file key.- Returns:
- The list of produced files.
-
getJson
Gets the JSON result of the prompt query test execution. This is a JSON value that conforms to theJSON output descriptorof the prompt query.- Returns:
- The JSON result.
-
isHasError
public boolean isHasError()Checks whether this result represents an error, i.e. when test execution failed. If so,getError()returns the error message; and other methods will return null or empty values.- Returns:
- True if this result represents an error, false otherwise.
-
forError
Creates a new prompt query test execution result representing an error, i.e. when test execution failed.- Parameters:
error- The error message.
-
forSuccess
public static PromptQueryTestExecutionResult forSuccess(String json, List<PromptTestFileList<IPromptBinaryData>> files) Creates a new successful prompt query test execution result.- Parameters:
json- The JSON returned by the prompt query.files- The files returned by the prompt query.- Returns:
- The prompt query test execution result.
-