diff options
| author | sigoden <sigoden@gmail.com> | 2024-07-03 16:18:32 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-03 16:18:32 +0800 |
| commit | 499b7cdef5d62298c17889895a61a110d7cd8168 (patch) | |
| tree | 94d5c0d1fa7cd90e7948ae9d55e5b00bdf4ac289 /tools/execute_py_code.py | |
| parent | 970ed06d2b5759e8d17aeed55fbfde591fb0ff84 (diff) | |
| download | llm-functions-docker-499b7cdef5d62298c17889895a61a110d7cd8168.tar.gz | |
feat: rename `may_execute_*` to `execute_*` (#56)
Diffstat (limited to 'tools/execute_py_code.py')
| -rw-r--r-- | tools/execute_py_code.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/execute_py_code.py b/tools/execute_py_code.py new file mode 100644 index 0000000..5f6af2f --- /dev/null +++ b/tools/execute_py_code.py @@ -0,0 +1,6 @@ +def run(code: str): + """Runs the python code. + Args: + code: Python code to execute, such as `print("hello world")` + """ + exec(code) |
