chainlit
chainlit copied to clipboard
After running the chainlit run app.py getting the error "Could not reach the server"
Platform : Windows 11
- Installed the chainlit from
- Download the wheel
- Run pip uninstall chainlit
- Run pip install PATH_TO_WHEEL
- After that getting the error:
2023-06-11 19:29:28 - Module should at least expose one of @langchain_factory, @on_message or @on_chat_start function
yes, a chainlit app should at lease expose one of those. for instance:
import chainlit as cl
@cl.on_message
async def main(message: str):
await cl.Message(content=message).send()
Is a minimal example
Hey @willydouhard. Yup that works but I have a followup question regarding the following example in https://docs.chainlit.io/examples/qa
This is not working and it is showing the same error,
Module should at least expose one of @langchain_factory, @on_message or @on_chat_start function
Even though the code has @langchain_factory function
Ah I see you are using the wheel from the PR. Then langchain_factory now takes a parameter use_async.
So it should be:
@cl.langchain_factory(use_async=False)
def main():
pass