> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Profanity Rule • Rust AI Agent SDK

> profanity_rule: Create a rule to block profanity.

# profanity\_rule

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**policy**](../modules/policy) module.

Create a rule to block profanity.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def profanity_rule(words: Vec<String>) -> PolicyRule
```

## Parameters

<ParamField query="words" type="Vec<String>" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="PolicyRule">
  The result of the operation.
</ResponseField>

## Uses

* `description`
* `action`
* `keyword`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/policy/mod.rs#L426">
  `praisonai/src/policy/mod.rs` at line 426
</Card>
