Skip to main content

Validates that the input string does not contain toxic language based on a BERT model.

Project description

guardrails-ai-bert-toxic

Validates that the input string does not contain toxic language based on a BERT model.

Installation

pip install guardrails-ai-bert-toxic

This validator ships local models. After installing, run the post-install step to download them:

python -m guardrails_ai.bert_toxic.post_install

Usage

from guardrails import Guard
from guardrails_ai.bert_toxic import BertToxic

guard = Guard().use(BertToxic)

License

MIT — © Guardrails AI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

guardrails_ai_bert_toxic-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

guardrails_ai_bert_toxic-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file guardrails_ai_bert_toxic-0.1.0.tar.gz.

File metadata

  • Download URL: guardrails_ai_bert_toxic-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for guardrails_ai_bert_toxic-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d9eed5c9ab8b0fdb4c46d98cce0879446c6d119f247764372af0c5252a89e8ed
MD5 de1ebc5b640cbc8cd583adb696997666
BLAKE2b-256 702185aaea8c5c5edfc12059abf47fe9735ab162587b7f7e04987adbb667fab1

See more details on using hashes here.

File details

Details for the file guardrails_ai_bert_toxic-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for guardrails_ai_bert_toxic-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6040aea8e2ac2f415422f01811482723a14e1357d0c4f0485c74030304558ee7
MD5 19e206d9634f92f07f8a985482c461f2
BLAKE2b-256 bb819dde091e3493e5aed8e1dc5de8a4d1038b2f62a69922616a61dde14a5175

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page