InMemorySemanticCache(
self,
redis_url: str,
embedding: Embeddings,
score_threshold: float = 0.2
| Name | Type |
|---|---|
| redis_url | str |
| embedding | Embeddings |
| score_threshold | float |
Cache that uses MemoryDB as a vector-store backend.
URL to connect to MemoryDB.
Embedding provider for semantic encoding and search.
Clear semantic cache for a given llm_string.
Look up based on prompt and llm_string.
Update cache based on prompt and llm_string.