Closed Franckegao closed 1 year ago
When a message is sent, the await
means wait until the message is sent, not until the an action is clicked. At the moment it is not possible to freeze the UI until an action has been clicked.
The user session is the right way to pass data between action callbacks and the main function.
@willydouhard how to use open ai azure with this app?
@willydouhard how to use open ai azure with this app? Which example in the cookbook are you referring to?
After invoking the action class, the values obtained within async def on_action(action): cannot be returned to async def main(message: str); this is my code.
I have tried global variables, and the async def main won't wait until the correct value of user_choice is passed through. if i put
while pick == none cl.sleep(1)
after " awaitcl.Message(content="pick an option:", actions=pick_template).send()
It would stop the button from clicking as well. Also tried asyncio.Event(), same problem, as the while method, whatever I want to use to pause until the right value is processed, it freezes the button from click.