(docs) add example post call rules to proxy

This commit is contained in:
ishaan-jaff 2024-01-15 20:58:50 -08:00
parent fcc1e23a05
commit 2873f587fd
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,8 @@
def post_response_rule(input): # receives the model response
print(f"post_response_rule:input={input}") # noqa
if len(input) < 200:
return {
"decision": False,
"message": "This violates LiteLLM Proxy Rules. Response too short",
}
return {"decision": True} # message not required since, request will pass