LanguageModelError.refusal(_:)
The model refused to answer.
Declaration
case refusal(LanguageModelError.Refusal)Mentioned in
Discussion
This failure can happen for prompts that do not violate any guardrail policy, but the model isn’t able to provide the kind of response you requested. You can choose to handle this by showing a predetermined message of your choice.