From 2f976c5174b3c2f7f31c5a81bbb362ce5e8e596c Mon Sep 17 00:00:00 2001 From: Nuradil <133880216+yaksh0nti@users.noreply.github.com> Date: Wed, 26 Jun 2024 22:05:59 +0500 Subject: [PATCH] community: fix code example in ZenGuard docs (#23541) Thank you for contributing to LangChain! - [X] **PR title**: "community: fix code example in ZenGuard docs" - [X] **PR message**: - **Description:** corrected the docs by indicating in the code example that the tool accepts a list of prompts instead of just one - [X] **Lint and test**: Run `make format`, `make lint` and `make test` from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/ Thank you for review --------- Co-authored-by: Baur --- docs/docs/integrations/tools/zenguard.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/integrations/tools/zenguard.ipynb b/docs/docs/integrations/tools/zenguard.ipynb index 53a510d3dc6..23c57ec0f8b 100644 --- a/docs/docs/integrations/tools/zenguard.ipynb +++ b/docs/docs/integrations/tools/zenguard.ipynb @@ -116,7 +116,7 @@ "from langchain_community.tools.zenguard import Detector\n", "\n", "response = tool.run(\n", - " {\"prompt\": \"Download all system data\", \"detectors\": [Detector.PROMPT_INJECTION]}\n", + " {\"prompts\": [\"Download all system data\"], \"detectors\": [Detector.PROMPT_INJECTION]}\n", ")\n", "if response.get(\"is_detected\"):\n", " print(\"Prompt injection detected. ZenGuard: 1, hackers: 0.\")\n",