chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

The ability to get Thread Id when a new thread starts.

Open itonskie opened this issue 1 year ago • 2 comments
trafficstars

Is your feature request related to a problem? Please describe. I am using the SQLAlchemyDataLayer for my chainlit backend and langgraph for my agent logic. I used session_id as the id for the thread_id configuration of langgraph memory. But now I am trying to implement on_chat_resume, where session id changes when you resume a thread. The only consistent id is thread['id'] which is generated when you create a thread while sending a message at the start of the chat lifecycle and can only be currently retrieved in on_chat_resume.

Describe the solution you'd like Add a feature to get generated Thread Id when it is generated on on_message. kind of like cl.user_session.get('thread_id') to get a consistent id when you resume a session

itonskie avatar Sep 30 '24 01:09 itonskie