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

feat(community): add FileChatMessageHistory #7303

Merged
merged 5 commits into from
Dec 4, 2024

Conversation

sinedied
Copy link
Contributor

@sinedied sinedied commented Dec 2, 2024

Changes

Added FileChatMessageHistory to allow chat history based on a local JSON file. The implementation optionally supports:

  • storing and listing sessions for a given user ID
  • storing additional context metadata alongside the messages history

The implementation is currently only compatible with Node.js, but the storage backend can be easily extended to support other environments.

The purpose of this module is to have a simple way to store chat histories locally, without having to rely on an external DB, for experimentations, local development, or local-first LLM scenarios.

Copy link

vercel bot commented Dec 2, 2024

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

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Dec 4, 2024 1:10am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Dec 4, 2024 1:10am

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. auto:improvement Medium size change to existing code to handle new use-cases labels Dec 2, 2024
@jacoblee93
Copy link
Collaborator

I've moved it to the proper export (stores/message/file_system) but otherwise looks great. Thanks for contributing @sinedied!

@jacoblee93 jacoblee93 changed the title community[minor] add FileChatMessageHistory feat(community): add FileChatMessageHistory Dec 4, 2024
@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label Dec 4, 2024
@jacoblee93 jacoblee93 merged commit 94026f6 into langchain-ai:main Dec 4, 2024
37 checks passed
syntaxsec pushed a commit to aks-456/langchainjs that referenced this pull request Dec 13, 2024
Co-authored-by: jacoblee93 <jacoblee93@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases lgtm PRs that are ready to be merged as-is size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants