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

New sessions table that allows for chat history and metadata greater than 400KB #584

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

gbone-restore
Copy link

Issue #, if available:
#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.

@gbone-restore
Copy link
Author

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.

@charles-marion
Copy link
Collaborator

charles-marion commented Oct 17, 2024

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.

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

Successfully merging this pull request may close these issues.

2 participants