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

How to use LLMCaching #16

Open
brooda opened this issue Nov 25, 2024 · 2 comments
Open

How to use LLMCaching #16

brooda opened this issue Nov 25, 2024 · 2 comments

Comments

@brooda
Copy link

brooda commented Nov 25, 2024

Hi,

I wanted to use Langchain LLMCaching - https://python.langchain.com/docs/how_to/llm_caching/
How I can use it with trustcall extractor (when input is the same - I would just like to use the cache)?

Just using
set_llm_cache(SQLiteCache(database_path=".langchain.db"))
does not work

@hinthornw
Copy link
Owner

Hm it should work as-is, so long as the langchain caching mechanism is working correctly - so you're not getting any matches?

@jasonbhart
Copy link

Confirming it should just work out of the box, as long as you setup caching on the LLM before you create a trustcall extractor with it. Its working here. I'd suggest confirming caching works as expected before introducing trustcall to the mix.

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

No branches or pull requests

3 participants