chainlit
chainlit copied to clipboard
getting 'could not reach the server' error
Describe the bug I am trying to bringup a simple chatbot from chainlit. I am using local LLM. Hence there is some time delay in response. My problem is that, very frequently I am getting "could not reach the server" error. though I made LLM call to run via syncio, I am still facing same issue. Can some one help me on this. Below is the code that I am using to get response from llm
To Reproduce Steps to reproduce the behavior: running below code. @cl.on_message async def main(message: cl.Message): await cl.Message( content=f"Received: {message.content}", ).send()
print("llm invoked, wait for response")
query = message.content
response = asyncio.run(agent_executor.invoke(input=query))
print("response received", response)
await cl.Message(
content=f"Bot Answer: {response}"
).send()
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS] windows
- Browser [e.g. chrome, safari]
- Version [e.g. 22] 1.0.401 version of chainlit
Additional context Add any other context about the problem here.