import chainlit as cl async def some_function(): file = await cl.AskFileMessage( content="Please upload a python file to begin!", accept={"text/plain": [".py"]} ).send()