How to set max_execution_time to agents with PythonREPLTool #8172
Unanswered
Troyanovsky
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am building an agent that can execute code with the PythonREPLTool to provide answers to questions. But I found that the "max_execution_time" parameter is not applicable.
When the agent writes code and executes it with PythonREPLTool, the agent may include "input()" function in the code to ask for user input. But it does not time out when the max_execution_time is reached and no user input is provided.
How can I set max_execution_time to agents with PythonREPLTool?
(I guess another solution could be detecting if the agent has written code with "input()" and deny it from using the code. But I don't know if it's possible to do that.)
Here is my code to initialize the agent:
Beta Was this translation helpful? Give feedback.
All reactions