Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End chat lifecycle is called twice #970

Open
kevinwmerritt opened this issue May 7, 2024 · 0 comments
Open

End chat lifecycle is called twice #970

kevinwmerritt opened this issue May 7, 2024 · 0 comments

Comments

@kevinwmerritt
Copy link
Contributor

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

Screen.Recording.2024-05-07.at.9.45.04.AM.mov

Additional context
Chainlit 1.0.506

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant