Skip to content

Commit c816d03

Browse files
authored
dcos: Add admonition to PythonREPL tool (#22909)
Add admonition to the documentation to make sure users are aware that the tool allows execution of code on the host machine using a python interpreter (by design).
1 parent 8171efd commit c816d03

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/docs/integrations/tools/python.ipynb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99
"\n",
1010
"Sometimes, for complex calculations, rather than have an LLM generate the answer directly, it can be better to have the LLM generate code to calculate the answer, and then run that code to get the answer. In order to easily do that, we provide a simple Python REPL to execute commands in.\n",
1111
"\n",
12-
"This interface will only return things that are printed - therefore, if you want to use it to calculate an answer, make sure to have it print out the answer."
12+
"This interface will only return things that are printed - therefore, if you want to use it to calculate an answer, make sure to have it print out the answer.\n",
13+
"\n",
14+
"\n",
15+
":::{.callout-caution}\n",
16+
"Python REPL can execute arbitrary code on the host machine (e.g., delete files, make network requests). Use with caution.\n",
17+
"\n",
18+
"For more information general security guidelines, please see https://python.langchain.com/v0.2/docs/security/.\n",
19+
":::"
1320
]
1421
},
1522
{
@@ -95,7 +102,7 @@
95102
"name": "python",
96103
"nbconvert_exporter": "python",
97104
"pygments_lexer": "ipython3",
98-
"version": "3.10.1"
105+
"version": "3.11.4"
99106
}
100107
},
101108
"nbformat": 4,

0 commit comments

Comments
 (0)