disclaimer_required()
Guard that ensures a required disclaimer appears in the response.
Usage
disclaimer_required(
disclaimer_text,
*,
position="end",
)If the disclaimer is missing, it is appended (or prepended) automatically.
Parameters
disclaimer_text: str-
The exact disclaimer text that must appear.
position: str = "end"-
Where to add the disclaimer if missing:
"end"(default) or"start".
Returns
Guard- A configured disclaimer enforcement guard (output-only).
Examples
bot = tb.ChatBot().guardrail(
tb.disclaimer_required("This is not financial advice.")
)