stanfordnlp / dspy

DSPy: The framework for programming—not prompting—foundation models
https://dspy-docs.vercel.app/
MIT License
14.64k stars 1.13k forks source link

Using OllamaEmbedding as retriever ? #982

Open thad75 opened 2 months ago

thad75 commented 2 months ago

Hi,

I was trying to workout a solution with OllamaEmbedding as a retriever. However got the following error :

File ~/miniconda3/envs/RAG/lib/python3.11/site-packages/dsp/primitives/search.py:12, in retrieve(query, k, kwargs) 10 if not dsp.settings.rm: 11 raise AssertionError("No RM is loaded.") ---> 12 passages = dsp.settings.rm(query, k=k, kwargs) 13 if not isinstance(passages, Iterable): 14 # it's not an iterable yet; make it one. 15 # TODO: we should unify the type signatures of dspy.Retriever 16 passages = [passages]

TypeError: 'OllamaEmbeddings' object is not callable

Will there be any support for OllamaEmbedding in the future ? Thanks in advance

amritsingh183 commented 2 months ago

I am facing the same error.