langchain
langchain copied to clipboard
Improve python repl tool
It would be convenient if perhaps the PythonREPL returned the last output of the REPL if there's no stdout
Also, improve the tool description to note that All Python outputs must use print().
Another nice feature here would be a timeout on the Python REPL responses. It's possible for the LLM to give the REPL input that never halts. For example, calling input()
Another nice feature here would be a timeout on the Python REPL responses. It's possible for the LLM to give the REPL input that never halts. For example, calling input()
Let's make the timeout relatively high (10s), and make the timeout configurable (-1 to indicate no timeout).
Another nice feature here would be a timeout on the Python REPL responses. It's possible for the LLM to give the REPL input that never halts. For example, calling
input()
Or generating an infinite loop that never exits.
Hi, @hwchase17! I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.
From what I understand, the issue you raised was about improving the Python REPL tool. The tool should return the last output if there is no stdout, and it was suggested by xanderdunn to add a timeout on the Python REPL responses to prevent input that never halts. This suggestion was agreed upon by jon-chuang and willsmithorg.
Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.
Thank you for your contribution!