chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

How to make `cl.make_async()` non-blocking for user input

Open lianghsun opened this issue 1 year ago • 0 comments
trafficstars

I am currently using the following code to set initial actions and update the greeting message:

init_actions = await cl.make_async(set_init_actions)(user_knowledge=user_knowledge, chat_profile=chat_profile)
greeting_msg.actions = init_actions
greeting_msg.content = greeting_msg.content + "\n\nOr, you may ask:"
await greeting_msg.update()

However, the execution of cl.make_async() blocks the user from inputting chat. Is there a way to execute this without blocking user input and perform it synchronously? Thanks! 🙏

lianghsun avatar Jun 05 '24 04:06 lianghsun