Class ResponseRefusedException.Builder
java.lang.Object
de.xima.fc.prompt.service.PromptExecutionException.Builder<ResponseRefusedException, ResponseRefusedException.Builder>
de.xima.fc.prompt.service.ResponseRefusedException.Builder
- Enclosing class:
ResponseRefusedException
public static final class ResponseRefusedException.Builder
extends PromptExecutionException.Builder<ResponseRefusedException, ResponseRefusedException.Builder>
Builder for a
ResponseRefusedException.- Since:
- 8.5.0
-
Field Summary
Fields inherited from class PromptExecutionException.Builder
cause, message -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates the exception instance with the configured values.refusalReason(String refusalReason) Sets the reason why the response was refused.Methods inherited from class PromptExecutionException.Builder
cause, message
-
Method Details
-
build
Description copied from class:PromptExecutionException.BuilderCreates the exception instance with the configured values.- Specified by:
buildin classPromptExecutionException.Builder<ResponseRefusedException, ResponseRefusedException.Builder>- Returns:
- The created exception instance.
-
refusalReason
Sets the reason why the response was refused. This can be used to provide more context about the refusal.- Parameters:
refusalReason- The reason why the response was refused.- Returns:
- The builder instance.
-