git
ask
hub
Privacy
Terms
Sign in with GitHub
guardrails-ai/contains_string
↗
Language ·
Python
License ·
Apache-2.0
Simplify and Visualize This Repo
Scan the safety of this repo
Self Host this repo
Check out more work of Developer: guardrails-ai
Ask anything about this repo to start.
Install the contains_string validator from the Guardrails AI hub and write a Python script that checks if an AI-generated product description includes the phrase 'ACME Corp', raising an error if it is missing.
Create a Guardrails guard using the contains_string validator that filters out any generated text that does not contain the code 'PROMO2024'.
Show me how to combine the contains_string validator with another Guardrails validator so that my AI output must contain the word 'disclaimer' and also pass a basic quality check.
Full explanation on explaingit →
📎
Send
By chatting or signing in you agree to the
Terms
and chat-message logging (revocable in
History
).