Spaces:
Paused
Paused
Download litellm/proxy/post_call_rules.py from DesertWolf/test3: direct link, hf CLI and curl.
- Browser
- Download file 359 Bytes
-
https://huggingface.co/spaces/DesertWolf/test3/resolve/main/litellm/proxy/post_call_rules.py
- Command line
-
hf download hf://spaces/DesertWolf/test3/litellm/proxy/post_call_rules.py
-
curl -L -o post_call_rules.py https://huggingface.co/spaces/DesertWolf/test3/resolve/main/litellm/proxy/post_call_rules.py
359 Bytes
| 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 | |