mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 23:54:14 +00:00
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 <baur.krykpayev@gmail.com>
This commit is contained in:
parent
6d0ebbca1e
commit
2f976c5174
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user