Open gbone-restore opened 1 month ago
I will take a look at the failed tests. I made this change prior to the tests being available, so there probably is a little cleanup needed to get the tests to pass.
Hi @gbone-restore , Thank you for creating this PR! It is greatly appreciated.
I reviewed the change and I have minor suggestions (not published) However, this change would break existing deployments of the project since the change of partition key would invalidate existing sessions.
A possible option is to apply a similar change with a new table for messages.
We will follow up with a new PR based on your change.
Issue #, if available: https://github.com/aws-samples/aws-genai-llm-chatbot/issues/580
Description of changes: Session History table was redesigned to handle chat history and meta data that is greater than 400KB. The partition key is now users and the sort key is sessions. And there are two types of items to make selecting session history and dealing with chat history a little easier. I can submit a PR with a working example. The bulk of the changes are in lib/shared/layers/python-sdk/python/genai_core/langchain/chat_message_history.py and lib/shared/layers/python-sdk/python/genai_core/sessions.py.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.