langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Improve python repl tool

Open hwchase17 opened this issue 2 years ago • 1 comments

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().

hwchase17 avatar Jan 11 '23 20:01 hwchase17

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()

xanderdunn avatar Jan 11 '23 23:01 xanderdunn

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).

jon-chuang avatar Apr 01 '23 11:04 jon-chuang

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.

willsmithorg avatar Jun 21 '23 22:06 willsmithorg

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!

dosubot[bot] avatar Sep 21 '23 16:09 dosubot[bot]