Redis cache implementation for LangChain.
Redis cache implementation for LangChain.
This class provides a Redis-based caching mechanism for LangChain, allowing storage and retrieval of language model responses.
Redis-based semantic cache implementation for LangChain.
This class provides a semantic caching mechanism using Redis and vector similarity search. It allows for storing and retrieving language model responses based on the semantic similarity of prompts, rather than exact string matching.
Managed LangCache-backed semantic cache.
This uses redisvl.extensions.cache.llm.LangCacheSemanticCache (a wrapper over the
managed LangCache API). The optional dependency langcache must be installed at
runtime when this class is used.
Install with either pip install 'langchain-redis[langcache]' or
pip install langcache.