Closed Cenrax closed 1 year ago
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
Platform : Windows 11