DSPy: The framework for programming—not prompting—language models
Python
fix(dspy): chromadb_rm import error (#1353)
leroch882ca3f1f0ec
diff --git a/dspy/retrieve/chromadb_rm.py b/dspy/retrieve/chromadb_rm.pyindex cd5c86fad..15ff6dc09 100644--- a/dspy/retrieve/chromadb_rm.py+++ b/dspy/retrieve/chromadb_rm.py@@ -7,6 +7,7 @@ from typing import List, Optional, Unionimport backoffimport openai+from dspy import Retrieve, Predictionfrom dsp.utils.settings import settingsfrom dsp.utils import dotdict@@ -31,7 +32,7 @@ except ImportError:)-class ChromadbRM(dspy.Retrieve):+class ChromadbRM(Retrieve):"""A retrieval module that uses chromadb to return the top passages for a given query.@@ -139,7 +140,7 @@ class ChromadbRM(dspy.Retrieve):def forward(self, query_or_queries: Union[str, List[str]], k: Optional[int] = None, **kwargs,- ) -> dspy.Prediction:+ ) -> Prediction:"""Search with db for self.k top passages for queryArgs: