Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

fix: use generic embedding function as default in ChromadbRM

ragul-kachiappana81f9a32a79f
diff --git a/dspy/retrieve/chromadb_rm.py b/dspy/retrieve/chromadb_rm.py
index b55fec8ff..e41be8427 100644
--- a/dspy/retrieve/chromadb_rm.py
+++ b/dspy/retrieve/chromadb_rm.py
@@ -70,11 +70,11 @@ class ChromadbRM(dspy.Retrieve):
persist_directory: str,
embedding_function: Optional[
EmbeddingFunction[Embeddable]
- ] = None,
+ ] = ef.DefaultEmbeddingFunction(),
k: int = 7,
):
self._init_chromadb(collection_name, persist_directory)
- self.ef = embedding_function or self._chromadb_collection._embedding_function
+ self.ef = embedding_function
super().__init__(k=k)