Skip to content

Commit 8ee3565

Browse files
authored
Update using_llms.md
Install ProfanityFree
1 parent 7b5716a commit 8ee3565

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/how_to_guides/using_llms.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,10 @@ See LiteLLM’s documentation [here](https://docs.litellm.ai/docs/providers) for
292292

293293
## Custom LLM Wrappers
294294
In case you're using an LLM that isn't natively supported by Guardrails and you don't want to use LiteLLM, you can build a custom LLM API wrapper. In order to use a custom LLM, create a function that accepts a positional argument for the prompt as a string and any other arguments that you want to pass to the LLM API as keyword args. The function should return the output of the LLM API as a string.
295-
295+
Install ProfanityFree from hub:
296+
```
297+
guardrails hub install hub://guardrails/profanity_free
298+
```
296299
```python
297300
from guardrails import Guard
298301
from guardrails.hub import ProfanityFree
@@ -334,4 +337,4 @@ validated_response = guard(
334337
prompt="Can you generate a list of 10 things that are not food?",
335338
**kwargs,
336339
)
337-
```
340+
```

0 commit comments

Comments
 (0)