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

redis[patch]: Adds a connection pool to RedisChatHistory #5963

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

itamarhaber
Copy link
Contributor

This is a premature optimization after having reviewed the code.

When supplied with a config instead of a client instance, a new connection will be opened each time a history is loaded.

Instead, we can reuse opened clients by keeping them in a "pool".

This PR affects the proposed change.

Copy link

vercel bot commented Jul 2, 2024

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

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2024 3:37pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview Jul 2, 2024 3:37pm

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

Nice, thanks!

@jacoblee93 jacoblee93 changed the title Adds a connection pool to RedisChatHistory redis[patch]: Adds a connection pool to RedisChatHistory Jul 2, 2024
@jacoblee93 jacoblee93 merged commit 70240f9 into langchain-ai:main Jul 2, 2024
30 checks passed
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 size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants