Skip to content

Commit

Permalink
Merge pull request stanfordnlp#1354 from Gwenn-LR/fix-chromadbrm-impo…
Browse files Browse the repository at this point in the history
…rt-error

fix(dspy): chromadb_rm import error (stanfordnlp#1353)
  • Loading branch information
arnavsinghvi11 authored Aug 5, 2024
2 parents dfde145 + 882ca3f commit 874245b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dspy/retrieve/chromadb_rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import backoff
import openai

from dspy import Retrieve, Prediction
from dsp.utils.settings import settings
from dsp.utils import dotdict

Expand All @@ -31,7 +32,7 @@
)


class ChromadbRM(dspy.Retrieve):
class ChromadbRM(Retrieve):
"""
A retrieval module that uses chromadb to return the top passages for a given query.
Expand Down Expand Up @@ -139,7 +140,7 @@ def _get_embeddings(self, queries: List[str]) -> List[List[float]]:

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 query
Args:
Expand Down

0 comments on commit 874245b

Please sign in to comment.