Skip to content

Migrate CassandraChatMemory to CassandraChatMemoryRepository #2998

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

Open
markpollack opened this issue May 5, 2025 · 1 comment
Open

Migrate CassandraChatMemory to CassandraChatMemoryRepository #2998

markpollack opened this issue May 5, 2025 · 1 comment
Milestone

Comments

@markpollack
Copy link
Member

This would allow us to have a more robust implementation than we currently have based on the ChatMemory.get(conversationId, lastn) interface that is currently deprecated.

This has been done for Jdbc in the PR - as a basis for comparison.

#2890

@linarkou
Copy link
Contributor

linarkou commented May 6, 2025

As for now, cassandraChatMemory stores data in table with 4 columns like that:

create table ai_chat_memory (
    session_id        text,
    message_timestamp timestamp,
    assistant         text,
    user              text,
    primary key (session_id, message_timestamp)
)
    with clustering order by (message_timestamp desc);

Maybe we should change table structure similar to JdbcChatMemory?

create table ai_chat_memory (
    session_id        text,
    message_timestamp timestamp,
    type              text,
    content           text,
    primary key (session_id, message_timestamp)
)
    with clustering order by (message_timestamp desc);

It'll give us an ability to store tool/system messages, not only user/assistant.

What do you think @markpollack @michaelsembwever ?

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

2 participants