langchain
langchain copied to clipboard
Optionally return shell output on incorrect command
This allows the LLM to correct its previous command by looking at the error message output to the shell.
Additionally, this uses subprocess.run because that is now recommended over subprocess.check_output: https://docs.python.org/3/library/subprocess.html#using-the-subprocess-module