chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

End chat lifecycle is called twice

Open kevinwmerritt opened this issue 1 year ago • 0 comments
trafficstars

Describe the bug The on_chat_end hook is called twice.

To Reproduce Steps to reproduce the behavior:

@cl.on_chat_start
async def on_chat_start():
    print("on_chat_start")

@cl.on_chat_end
async def end_chat():
    print("on_chat_end")
  1. Navigate to /
  2. Click on New Chat
  3. Submit at least one message.
  4. Observe in logs that on_chat_end is called twice.

Expected behavior The on_chat_end hook is called once.

Screenshots

https://github.com/Chainlit/chainlit/assets/590874/91bf99af-96f8-457e-9893-7d71ec6f62d8

Additional context Chainlit 1.0.506

kevinwmerritt avatar May 07 '24 13:05 kevinwmerritt