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(checkpoint-mongodb): fix utf8 encoding support #665

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mosluce
Copy link

@mosluce mosluce commented Nov 10, 2024

Issue
The MongoDB checkpoint storage implementation currently does not properly handle UTF-8 encoded input (such as Chinese characters). When retrieving checkpoints via getTuple, message contents containing non-ASCII characters are corrupted and displayed as garbled text.
Changes

Added proper UTF-8 encoding support for MongoDB checkpoint storage
Ensures correct storage and retrieval of non-ASCII characters in checkpoint messages
Maintains data integrity for international character sets

Impact
This fix enables LangGraphJS to properly handle international text in conversations and workflows when using MongoDB as the checkpoint storage backend. Users working with non-English languages will now see their content preserved correctly throughout the graph execution process.

@mosluce mosluce force-pushed the fix-checkpoint-mongodb-unicode branch from 8b21389 to fae938f Compare November 14, 2024 16:03
@mosluce mosluce force-pushed the fix-checkpoint-mongodb-unicode branch from fae938f to e8bd26b Compare December 3, 2024 01:56
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.

1 participant