Closed savyez closed 10 months ago
@savyez what about the manager.py? like is there any time input? If we suspend the input for UI the program will be still running in the background or will it terminate fully?
@neokd for CLI there already was a timer in manager.py but for ui, I thinking adding a seperate timer to ui.py was a better choice as we can easily find the timer and also ui takes more time to load than CLI
The CLI one stops if LLM takes more than 2minutes to respond. I was thinking to add something like https://pypi.org/project/pytimedinput/#:~:text=timedInput(),if%20the%20user%20goes%20idle. this into our project for CLI. The UI one looks good ,probably you can add a warning like message at initialisation that bot stops after no interaction received for 5 minutes.
Also check that #104 does not affect the code .
@neokd ig it won't have any conflicts with #104 , we are already importing ui in manager.py. also CLI and ui should have different timings as they both require different set of resources... some of which intersect with each other.... for #104 we can add them similiarly as the persona_list
.
Thanks for your contribution @savyez
Thanks for your contribution @savyez
No problem @neokd, happy to contribute more into your repo. Gotta release it ASAP.
also, update the documentation demonstrating --ui
.
Current behavior
The user input is now timed for 5 mins that is, if the user does not give any input for 5 min, the program will close itself. The ui will run again if we hit refresh, but the previous text prompts asked and the answers given will be deleted.
Proposed changes
last_input_time
is tracked usingst.session_state
. Which helps in comparing it with thetimedelta
funtion.if datetime.now() - last_input_time > timedelta(minutes=5)
the chat input will be closed.It is better to close the
chat_input
for ui mode by changing the ui.py rather than terminating the program by changing manager.py. Hence, it is a enhanced solution for issue #93 .After the program is executed (see the bottom right corner for time).
After 5-6 mins (see the bottom right corner for time).
Checks