Class RequestRefusedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
de.xima.fc.prompt.service.PromptExecutionException
de.xima.fc.prompt.service.RequestRefusedException
- All Implemented Interfaces:
Serializable
Exception thrown when executing a prompt query and the prompt service refuses to process the request, e.g. because
violates its usage policies or contains inappropriate content. For example, an LLM service might refuse to process
requests that contain hate speech or explicit content.
- Since:
- 8.5.0
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new builder forRequestRefusedException.Gets the reason why the request was refused.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
refusalReason
Gets the reason why the request was refused. This can be used to provide more context about the refusal.- Returns:
- The reason why the request was refused.
-
builder
Creates a new builder forRequestRefusedException.- Returns:
- The new builder.
-