chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

fix: do not block entire program with sleep

Open sandangel opened this issue 1 year ago • 1 comments
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.

sandangel avatar Sep 25 '24 23:09 sandangel