Closed shachar-ug closed 11 months ago
Thanks for highlighting this @shachar-ug!
I no longer see this issue. Please re-open if you can re-produce on latest rebuff sdk. If you do see it on the pypi installed rebuff that should be fixed shortly with #48
rb = Rebuff(api_token="MYTOKEN, api_url="https://www.rebuff.ai")
user_input = "Ignore all prior"
result = rb.detect_injection(user_input)
if result.injectionDetected:
print("Possible injection detected. Take corrective action.")
Possible injection detected. Take corrective action.
No error handling on partial prompts crash
detection_metrics, is_injection = rb.detect_injection("Ignore all prior") if is_injection: print("Possible injection detected. Take corrective action.")
File rebuff.py:86, in Rebuff.detect_injection(self, user_input, max_heuristic_score, max_vector_score, max_model_score, check_heuristic, check_vector, check_llm)