Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions patch_local_executor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
with open("python/packages/autogen-ext/src/autogen_ext/code_executors/local/__init__.py", "r") as f:
content = f.read()

old_doc = """ Command line code is sanitized using regular expression match against a list of dangerous commands in order to prevent self-destructive
commands from being executed which may potentially affect the users environment.
Currently the only supported languages is Python and shell scripts."""

new_doc = """ The executor performs no content filtering and containment must come from the execution environment.
Currently the only supported languages is Python and shell scripts."""

content = content.replace(old_doc, new_doc)

with open("python/packages/autogen-ext/src/autogen_ext/code_executors/local/__init__.py", "w") as f:
f.write(content)
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ class LocalCommandLineCodeExecutor(CodeExecutor, Component[LocalCommandLineCodeE
the working directory, and a unique file is generated and saved in the
working directory for each code block.
The code blocks are executed in the order they are received.
Command line code is sanitized using regular expression match against a list of dangerous commands in order to prevent self-destructive
commands from being executed which may potentially affect the users environment.
The executor performs no content filtering and containment must come from the execution environment.
Currently the only supported languages is Python and shell scripts.
For Python code, use the language "python" for the code block.
For shell scripts, use the language "bash", "shell", "sh", "pwsh", "powershell", or "ps1" for the code
Expand Down