Skip to content

Commit

Permalink
community[minor]: bump version of LayerupSecurity, add support for un…
Browse files Browse the repository at this point in the history
…trusted_input parameter (langchain-ai#19985)

**Description:** update version of LayerupSecurity package for the
Layerup Security integration. Add untrusted_input parameter.
  • Loading branch information
JamsheedMistri authored Apr 30, 2024
1 parent f1c3687 commit 3e74936
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/community/langchain_community/llms/layerup_security.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _call(

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)
Expand All @@ -98,7 +98,7 @@ def _call(

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)
Expand Down

0 comments on commit 3e74936

Please sign in to comment.