mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-11 16:01:33 +00:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user