Class ResponseRefusedException

  • All Implemented Interfaces:
    Serializable

    public final class ResponseRefusedException
    extends PromptExecutionException
    Exception thrown when executing a prompt query and the system refused to accept the response from the prompt service, e.g. because violates the system's policies or contains unsafe content such as malware.
    Since:
    8.5.0
    See Also:
    Serialized Form
    • Method Detail

      • refusalReason

        public String refusalReason()
        Gets the reason why the response was refused. This can be used to provide more context about the refusal.
        Returns:
        The reason why the response was refused.