# Ragbits Guardrails
Ragbits Guardrails is a Python package that contains utilities for ensuring the safety and relevance of responses generated by Ragbits components.
## Installation
You can install the latest version of Ragbits Guardrails using pip:
```bash
pip install ragbits-guardrails
```
## Quickstart
Example of using the OpenAI Moderation Guardrail to verify a message:
```python
import asyncio
from ragbits.guardrails.base import GuardrailManager, GuardrailVerificationResult
from ragbits.guardrails.openai_moderation import OpenAIModerationGuardrail
async def verify_message(message: str) -> list[GuardrailVerificationResult]:
manager = GuardrailManager([OpenAIModerationGuardrail()])
return await manager.verify(message)
if __name__ == '__main__':
print(asyncio.run(verify_message("Test message")))
```
## Documentation
* [How-To Guides - Guardrails](https://ragbits.deepsense.ai/how-to/use_guardrails/)
<!--
TODO:
* Add link to API Reference once classes from the Guardrails package are added to the API Reference.
-->
Raw data
{
"_id": null,
"home_page": null,
"name": "ragbits-guardrails",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "Evaluation, GenAI, Generative AI, LLMs, Large Language Models, RAG, Retrieval Augmented Generation",
"author": null,
"author_email": "\"deepsense.ai\" <ragbits@deepsense.ai>",
"download_url": "https://files.pythonhosted.org/packages/9b/60/830c5d42ea1dbc00e7e3bb8a8756e2a9723d5c3d2acb6af68c324b1b6306/ragbits_guardrails-1.1.0.tar.gz",
"platform": null,
"description": "# Ragbits Guardrails\n\nRagbits Guardrails is a Python package that contains utilities for ensuring the safety and relevance of responses generated by Ragbits components.\n\n## Installation\n\nYou can install the latest version of Ragbits Guardrails using pip:\n\n```bash\npip install ragbits-guardrails\n```\n\n## Quickstart\nExample of using the OpenAI Moderation Guardrail to verify a message:\n\n```python\nimport asyncio\nfrom ragbits.guardrails.base import GuardrailManager, GuardrailVerificationResult\nfrom ragbits.guardrails.openai_moderation import OpenAIModerationGuardrail\n\n\nasync def verify_message(message: str) -> list[GuardrailVerificationResult]:\n manager = GuardrailManager([OpenAIModerationGuardrail()])\n return await manager.verify(message)\n\n\nif __name__ == '__main__':\n print(asyncio.run(verify_message(\"Test message\")))\n```\n\n## Documentation\n* [How-To Guides - Guardrails](https://ragbits.deepsense.ai/how-to/use_guardrails/)\n<!--\nTODO:\n* Add link to API Reference once classes from the Guardrails package are added to the API Reference.\n-->\n",
"bugtrack_url": null,
"license": null,
"summary": "Guardrails module for Ragbits components",
"version": "1.1.0",
"project_urls": {
"Bug Reports": "https://github.com/deepsense-ai/ragbits/issues",
"Documentation": "https://ragbits.deepsense.ai/",
"Homepage": "https://github.com/deepsense-ai/ragbits",
"Source": "https://github.com/deepsense-ai/ragbits"
},
"split_keywords": [
"evaluation",
" genai",
" generative ai",
" llms",
" large language models",
" rag",
" retrieval augmented generation"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1b41312160be5237bb7de87871c7cef1aff07cb954555ec0b9c4a286fa0eda8a",
"md5": "fb3a48d78b674f04f157f36d136be26d",
"sha256": "6ee0515ce00f8528677848957084ed9e559add94bc8b2848385b5b1275fa5cc6"
},
"downloads": -1,
"filename": "ragbits_guardrails-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fb3a48d78b674f04f157f36d136be26d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 3646,
"upload_time": "2025-07-09T15:46:07",
"upload_time_iso_8601": "2025-07-09T15:46:07.400932Z",
"url": "https://files.pythonhosted.org/packages/1b/41/312160be5237bb7de87871c7cef1aff07cb954555ec0b9c4a286fa0eda8a/ragbits_guardrails-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9b60830c5d42ea1dbc00e7e3bb8a8756e2a9723d5c3d2acb6af68c324b1b6306",
"md5": "b37893464a842cb8415c84762ee53395",
"sha256": "2d6bd1bb8be127b3bc034a5434f90bebed4e8715d6f5cfef26060b664b8306e4"
},
"downloads": -1,
"filename": "ragbits_guardrails-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "b37893464a842cb8415c84762ee53395",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 3993,
"upload_time": "2025-07-09T15:46:13",
"upload_time_iso_8601": "2025-07-09T15:46:13.046441Z",
"url": "https://files.pythonhosted.org/packages/9b/60/830c5d42ea1dbc00e7e3bb8a8756e2a9723d5c3d2acb6af68c324b1b6306/ragbits_guardrails-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-09 15:46:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "deepsense-ai",
"github_project": "ragbits",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ragbits-guardrails"
}