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

Fix redis chat message history message hydration #1374

Merged
merged 1 commit into from
May 23, 2023

Conversation

nfcampos
Copy link
Collaborator

Closes #1339

@vercel
Copy link

vercel bot commented May 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview May 23, 2023 1:28pm

Copy link
Contributor

@vowelparrot vowelparrot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think dynamoDB also needs fixed!

@@ -57,19 +56,7 @@ export class RedisChatMessageHistory extends BaseListChatMessageHistory {
const orderedMessages = rawStoredMessages
.reverse()
.map((message) => JSON.parse(message));
const previousMessages = orderedMessages
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah so it was being assigned empty values before going to the mapStoredMessagesToChatMessages :( thanks for catching

@@ -15,7 +15,13 @@ afterAll(async () => {
await client.disconnect();
});

test.skip("Test Redis history store", async () => {
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helpful comment. Thanks!

@nfcampos
Copy link
Collaborator Author

@vowelparrot no I tested dynamo and it seems fine, because it has its own custom format for saving (not ideal)

@vowelparrot
Copy link
Contributor

Thanks for fixing this

@jacoblee93 jacoblee93 merged commit 099dbc9 into main May 23, 2023
9 checks passed
@jacoblee93 jacoblee93 deleted the nc/fix-redis-message-hist branch May 23, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chat History not beeing retrieved / saved
3 participants