community[minor]: bump version of LayerupSecurity, add support for untrusted_input parameter (#19985)

**Description:** update version of LayerupSecurity package for the
Layerup Security integration. Add untrusted_input parameter.
This commit is contained in:
Jamsheed Mistri 2024-04-30 11:55:26 -07:00 committed by GitHub
parent f1c3687aa5
commit 3e749369ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,7 +82,7 @@ class LayerupSecurity(LLM):
if self.prompt_guardrails:
security_response = self.client.execute_guardrails(
self.prompt_guardrails, messages, self.metadata
self.prompt_guardrails, messages, prompt, self.metadata
)
if not security_response["all_safe"]:
return self.handle_prompt_guardrail_violation(security_response)
@ -98,7 +98,7 @@ class LayerupSecurity(LLM):
if self.response_guardrails:
security_response = self.client.execute_guardrails(
self.response_guardrails, messages, self.metadata
self.response_guardrails, messages, result, self.metadata
)
if not security_response["all_safe"]:
return self.handle_response_guardrail_violation(security_response)