Chainlit / chainlit

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

How to disable reload feature? #1381

Closed bode135 closed 1 day ago

bode135 commented 1 day ago

The program will auto reload when i change any files! I can't find any help info for it, and the config file is also not use... who can help...

dosubot[bot] commented 1 day ago

Hey @bode135! I'm here to help you out with any bugs or questions you have. Let's tackle this reload feature together!

To enable the auto-reload feature so the program reloads when you change any files, you can use the -w flag when running your application. Here is the command to run your application with auto-reload enabled:

chainlit run app.py -w

Alternatively, you can enable auto-reload through the configuration file. In the config.toml file, set the watch attribute under the [run] section to true:

[run]
watch = true

This will enable the auto-reload feature without needing to use the command line flag [1][2].

To continue talking to Dosu, mention @dosu.

bode135 commented 1 day ago

Hey @bode135! I'm here to help you out with any bugs or questions you have. Let's tackle this reload feature together!

To enable the auto-reload feature so the program reloads when you change any files, you can use the -w flag when running your application. Here is the command to run your application with auto-reload enabled:

chainlit run app.py -w

Alternatively, you can enable auto-reload through the configuration file. In the config.toml file, set the watch attribute under the [run] section to true:

[run]
watch = true

This will enable the auto-reload feature without needing to use the command line flag [1][2].

To continue talking to Dosu, mention @dosu.

not work...

bode135 commented 1 day ago

I found the parameter watch in chainlit --help, change chainlit run demo.py -w to chanlit run demo.py, it will not watch the file change!