Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
6.24k stars 799 forks source link

RuntimeWarning: coroutine 'main' was never awaited #106

Closed amirrezam closed 1 year ago

amirrezam commented 1 year ago

when i run this code, i got RuntimeWarning: coroutine 'main' was never awaited and main method doesn't call

@cl.on_message
async def main(message: str):
    # this is an intermediate step
    await cl.Message(author="Tool 1", content=f"Response from tool1", indent=1).send()
    # send back the final answer
    await cl.Message(content=f"This is the final answer").send()
amirrezam commented 1 year ago

python==3.11.3 chainlit==0.4.2

willydouhard commented 1 year ago

Can i see your chainlit run command?

amirrezam commented 1 year ago

problem solved.