In the folder App, I have a file "app.py" with the below code (from https://docs.chainlit.io/get-started/pure-python):
import chainlit as cl
from chainlit import user_session
@cl.on_message
async def main(message: cl.Message):
# Your custom logic goes here...
# Send a response back to the user
await cl.Message(
content=f"Received: {message.content}",
).send()
I'm trying to run this file in a terminal (macos Sonoma, zsh) with command "chainlit -w run app.py" and I'm getting the below error:
jarkow@MacBook-Air-Jarkow-2 App % chainlit run app.py -w
Usage: chainlit run [OPTIONS] TARGET Try 'chainlit run --help' for help.
Error: Invalid value: File does not exist: chainlit_basics.py
I installed the chainlit python package successfully and the command "chainlit hello" works well.
Atul
4,5786 gold badges55 silver badges109 bronze badges
lang-py
python -m chainlit run app.pypython3 ...