mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-28 11:40:47 +00:00
intervention fix, timed output fix?, dirty json {{ fix, prompt additions
This commit is contained in:
parent
cc19171464
commit
5c592ca71f
10 changed files with 41 additions and 45 deletions
9
python/helpers/timed_input.py
Normal file
9
python/helpers/timed_input.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from inputimeout import inputimeout, TimeoutOccurred
|
||||
|
||||
def timeout_input(prompt, timeout=10):
|
||||
try:
|
||||
import readline
|
||||
user_input = inputimeout(prompt=prompt, timeout=timeout)
|
||||
return user_input
|
||||
except TimeoutOccurred:
|
||||
return ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue