Options:
word_list: An array of words to filtercase_sensitive: Whether matching is case sensitive (default false) whole_words_only: Match whole words only (default true) replacement: Text to replace filtered words with (default “[FILTERED]“)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Learn how to implement word filtering guardrails in TrueFoundry AI Gateway to detect and filter specific words and phrases in content.
name: word-filter-guardrails
type: word-filter-guardrails-config
rules:
- id: specific-word-filter
when:
models:
- openai-main/gpt-3-5-turbo
input_guardrails:
- type: word_filter
action: transform
options:
word_list:
- "unwantedword"
- "inappropriatephrase"
case_sensitive: false
whole_words_only: true
replacement: "[REMOVED]"
output_guardrails:
- type: word_filter
action: transform
options:
word_list:
- "unwantedword"
- "inappropriatephrase"
case_sensitive: false
whole_words_only: true
replacement: "[REMOVED]"
guardrails_service_url: https://word-filter-service.company.com
Was this page helpful?