Skip to content

Instantly share code, notes, and snippets.

View pde-rent's full-sized avatar
🏠
Working from home

Paul pde-rent

🏠
Working from home
  • Paris
View GitHub Profile
@jasonjmcghee
jasonjmcghee / cached_chroma.py
Last active June 7, 2024 14:45
Cached embeddings in Chroma made easy.
from abc import ABC
from typing import List, Optional, Any
import chromadb
from langchain.docstore.document import Document
from langchain.embeddings.base import Embeddings
from langchain.vectorstores import Chroma
class CachedChroma(Chroma, ABC):