You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @Paniraj2010 here are a couple things you can check to work through this issue:
Since the example you posted and the error do not match, I would first suggest double checking that you are installing the validator that you are trying to use. i.e. if you are trying to use the ToxicLanguage validator; be sure to run guardrails hub install hub://guardrails/toxic_language;.
Since bin executables are generally evaluated top down, we generally recommend that you use a properly activated virtual environment. You can create on with common packages such as venv, virtualenv, conda, etc.. Once this is set up, activated, and you have installed guardrails via pip install guardrails-ai, make sure your current terminal environment is using the correct bin path for the guardrails cli. You can check this by running which guardrails. The result from the which command should be {PATH TO YOUR VIRTUAL ENV}/bin/guardrails. If it is not, then you may need to re-activate your virtual environment (e.g. source ./.venv/bin/activate on mac and linux assuming you created it via python -m venv ./.venv).
Description
I just followed the code sample provided in website.
But when i run the code getting KeyError: 'guardrails.hub.guardrails', how can I get ride of this, stuck in this issue since a week.
Current documentation
[Provide a link to the current documentation page or section that needs attention]
Suggested changes
[If you have specific changes in mind, describe them here. Be as detailed as possible]
Additional context
[Add any other context, screenshots, or examples that could help explain the issue or improvement]
Checklist
The text was updated successfully, but these errors were encountered: