mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
docs: cleanup docs
This commit is contained in:
parent
142697cd87
commit
68eb0bbfea
1 changed files with 2 additions and 2 deletions
|
|
@ -10,11 +10,11 @@ Use this is you want to write code to run a custom guardrail
|
|||
|
||||
### 1. Write a `CustomGuardrail` Class
|
||||
|
||||
A CustomGuardrail has 3 methods to enforce guardrails
|
||||
A CustomGuardrail has 4 methods to enforce guardrails
|
||||
- `async_pre_call_hook` - (Optional) modify input or reject request before making LLM API call
|
||||
- `async_moderation_hook` - (Optional) reject request, runs while making LLM API call (help to lower latency)
|
||||
- `async_post_call_success_hook`- (Optional) apply guardrail on input/output, runs after making LLM API call
|
||||
|
||||
- `async_post_call_streaming_iterator_hook` - (Optional) pass the entire stream to the guardrail
|
||||
**[See detailed spec of methods here](#customguardrail-methods)**
|
||||
|
||||
**Example `CustomGuardrail` Class**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue