chainlit
chainlit copied to clipboard
How to make `cl.make_async()` non-blocking for user input
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! 🙏