guardrail as an input guardrail, for GuardrailMiddleware: a CompositeGuardrail or any other Guardrail[String] (a cast throws a ClassCastException). Both validate forms delegate, so a guardrail that calls a model through the hook's context keeps doing so, and the name and description are the guardrail's. One that already is an InputGuardrail is returned unchanged.
guardrail as an input guardrail, for GuardrailMiddleware: a CompositeGuardrail or any other Guardrail[String] (a cast throws a ClassCastException). Both validate forms delegate, so a guardrail that calls a model through the hook's context keeps doing so, and the name and description are the guardrail's. One that already is an InputGuardrail is returned unchanged.