Files
2023-03-26 19:49:46 -07:00

1.9 KiB

Bash

It can often be useful to have an LLM generate bash commands, and then run them. A common use case for this is letting the LLM interact with your local file system. We provide an easy util to execute bash commands.

In [1]:
from langchain.utilities import BashProcess
In [2]:
bash = BashProcess()
In [3]:
print(bash.run("ls"))
bash.ipynb
google_search.ipynb
python.ipynb
requests.ipynb
serpapi.ipynb

In [ ]: