guardrails
, 日志记录
, 虚拟密钥管理
, 新模型
在此获取 LiteLLM 企业版的 7 天免费试用。
无需致电
新功能
✨ 记录 Guardrail 追踪
追踪 guardrail 失败率,以及 guardrail 是否异常并导致请求失败。从这里开始
追踪到的 Guardrail 成功
追踪到的 Guardrail 失败
/guardrails/list
/guardrails/list
允许客户端查看可用的 guardrails + 支持的 guardrail 参数
curl -X GET 'http://0.0.0.0:4000/guardrails/list'
预期响应
{
"guardrails": [
{
"guardrail_name": "aporia-post-guard",
"guardrail_info": {
"params": [
{
"name": "toxicity_score",
"type": "float",
"description": "Score between 0-1 indicating content toxicity level"
},
{
"name": "pii_detection",
"type": "boolean"
}
]
}
}
]
}
✨ 使用模拟 LLM 的 Guardrails
发送 mock_response
来测试 guardrails,而无需进行 LLM 调用。有关 mock_response
的更多信息,请点击此处
curl -i https://:4000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-npnwjPQciVRok5yNZgKmFQ" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [
{"role": "user", "content": "hi my email is ishaan@berri.ai"}
],
"mock_response": "This is a mock response",
"guardrails": ["aporia-pre-guard", "aporia-post-guard"]
}'
将密钥分配给用户
您现在可以通过 Proxy UI 将密钥分配给用户
新模型
openrouter/openai/o1
vertex_ai/mistral-large@2411
修复
- 修复
vertex_ai/
mistral 模型定价问题:https://github.com/BerriAI/litellm/pull/7345 - aspeech 调用类型的日志中缺少 model_group 字段 https://github.com/BerriAI/litellm/pull/7392