-
Notifications
You must be signed in to change notification settings - Fork 935
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
on_chat_resume function is unable to retrieve the metadata of messages when using the thread's steps #1461
Comments
Steps to reproduce
|
The issue you're encountering is that the In Chainlit, the As a workaround, you are currently storing the chat history, including metadata, in the To address this issue, you might need to ensure that the metadata is correctly set and retrieved in the To continue talking to Dosu, mention @dosu. Written by @dosu, approved by dokterbob |
Describe the bug
The on_chat_resume function is unable to retrieve the metadata of messages when using the thread's steps.
To Reproduce
Start a chat session and send messages.
Resume the chat session.
In the on_chat_resume function, try to access message metadata using thread["steps"].
Expected behavior
When resuming a chat, the on_chat_resume function should be able to retrieve the full message history, including metadata, from the thread["steps"] object. Each message in the steps should contain its associated metadata.
Currently, the code uses a workaround by storing the chat history in the thread metadata (thread["metadata"]["chat_history"]). While this works, it would be more efficient and consistent to retrieve the message history directly from the thread["steps"] object, including all associated metadata.
The text was updated successfully, but these errors were encountered: