Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

docs update Aporia Example

Ishaan Jaff8b23a2334f88
diff --git a/docs/my-website/docs/tutorials/litellm_proxy_aporia.md b/docs/my-website/docs/tutorials/litellm_proxy_aporia.md
index 522d6aba4cf..1fea3037fc1 100644
--- a/docs/my-website/docs/tutorials/litellm_proxy_aporia.md
+++ b/docs/my-website/docs/tutorials/litellm_proxy_aporia.md
@@ -61,7 +61,7 @@ guardrails:
- `pre_call` Run **before** LLM call, on **input**
- `post_call` Run **after** LLM call, on **input & output**
-- `during_call` Run **during** LLM call, on **input**
+- `during_call` Run **during** LLM call, on **input** Same as `pre_call` but runs in parallel as LLM call. Response not returned until guardrail check completes
## 3. Start LiteLLM Gateway
@@ -72,6 +72,8 @@ litellm --config config.yaml --detailed_debug
## 4. Test request
+**[Langchain, OpenAI SDK Usage Examples](../proxy/user_keys##request-format)**
+
<Tabs>
<TabItem label="Unsuccessful call" value = "not-allowed">
@@ -134,11 +136,10 @@ curl -i http://localhost:4000/v1/chat/completions \
</Tabs>
-## Advanced
-### Control Guardrails per Project (API Key)
+## 5. Control Guardrails per Project (API Key)
Use this to control what guardrails run per project. In this tutorial we only want the following guardrails to run for 1 project (API Key)
-- `guardrails`: ["aporia-pre-guard", "aporia"]
+- `guardrails`: ["aporia-pre-guard", "aporia-post-guard"]
**Step 1** Create Key with guardrail settings
@@ -150,7 +151,7 @@ curl -X POST 'http://0.0.0.0:4000/key/generate' \
-H 'Authorization: Bearer sk-1234' \
-H 'Content-Type: application/json' \
-D '{
- "guardrails": ["aporia-pre-guard", "aporia"]
+ "guardrails": ["aporia-pre-guard", "aporia-post-guard"]
}
}'
```
@@ -164,7 +165,7 @@ curl --location 'http://0.0.0.0:4000/key/update' \
--header 'Content-Type: application/json' \
--data '{
"key": "sk-jNm1Zar7XfNdZXp49Z1kSQ",
- "guardrails": ["aporia-pre-guard", "aporia"]
+ "guardrails": ["aporia-pre-guard", "aporia-post-guard"]
}
}'
```