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 SQLAlchemy LLM cache clear #7653

Merged
merged 2 commits into from
Jul 13, 2023
Merged

Conversation

molntamas
Copy link
Contributor

@molntamas molntamas commented Jul 13, 2023

Fixes #7652

Description:
This is a fix for clearing the cache for SQL Alchemy based LLM caches.

The langchain.llm_cache.clear() did not take effect for SQLite cache.
Reason: it didn't commit the deletion database change.

See SQLAlchemy documentation for proper usage:
https://docs.sqlalchemy.org/en/20/orm/session_basics.html#opening-and-closing-a-session
https://docs.sqlalchemy.org/en/20/orm/session_basics.html#deleting

@hwchase17 @baskaryan

@vercel
Copy link

vercel bot commented Jul 13, 2023

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

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2023 0:46am

@dosubot dosubot bot added the 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature label Jul 13, 2023
@vercel vercel bot temporarily deployed to Preview July 13, 2023 12:46 Inactive
@baskaryan baskaryan added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jul 13, 2023
@baskaryan
Copy link
Collaborator

awesome, thanks for the fix @molntamas!

@baskaryan baskaryan merged commit 24c1654 into langchain-ai:master Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature lgtm PR looks good. Use to confirm that a PR is ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQLite LLM cache clear does not take effect
3 participants