litellm-mirror/litellm/proxy/_experimental/post_call_rules.py

4 lines
No EOL
171 B
Python

def my_custom_rule(input): # receives the model response
# if len(input) < 5: # trigger fallback if the model response is too short
return False
return True