chainlit
chainlit copied to clipboard
fix: do not block entire program with sleep
trafficstars
Signed-off-by: San Nguyen [email protected]
with time.sleep(), the entire program is stopped, which yield very bad performance for server handling concurrent requests.
Introducing new async init method for creating Step and Message with asyncio.sleep so that the async loop will give back the control to the program while waiting for sleep.
Let me know what is your thought and I help to replace existing usage with the new one.