dspy
dspy copied to clipboard
DSPy: The framework for programming—not prompting—language models
# Context ℹ️ 💁🏼♂️ I have a VectorDB with `Chroma` using OpenAI's Embeddings and created a `retriever_model` in `dspy`: ```python from dspy.retrieve.chromadb_rm import ChromadbRM retriever_model = ChromadbRM(collection_name=COLLECTION_NAME, persist_directory=MY_PATH) ``` The...
Fixing bugs mentioned here where `n` and `max_tokens` throw errors when passed as `kwargs`: https://github.com/stanfordnlp/dspy/issues/365
This PR allows to set LM and RM per module on their constructors or dynamically when calling them. Note that I removed the `query_only=True` parameter on the existent `with dsp.settings.context`...
Followed the Cohere LM template. It doesn't look like you can sample multiple generations in one call to the API (linked the Google API docs I'm following in the code)....
I've updated the ChromadbRM retriever to be more flexible and fix a bug: - **Flexibility with Embeddings**: Removed the direct dependency on OpenAI, allowing for the use of various embedding...
As described in #389 _get_embeddings is throwing an error when called via retriever(query): _TypeError: Embeddings.create() got an unexpected keyword argument 'engine'._ This is a result of the unnecessary usage of...
Added support for Nomic Embed v1.5: https://blog.nomic.ai/posts/nomic-embed-matryoshka This let's you specify a vectorizer that will generate much smaller but still performant embeddings for local use.
This may need to be done on a per-optimizer basis but it may be good to think of a dev UX that involves showing an estimation upfront of the number...
For the models in the intro.ipynb I get: AttributeError: module 'dspy' has no attribute 'OpenAI'
i've just made a quick walkthrough with ReAct module in dspy, however, it seems like it is not well-documented, could anyone provide me an example of creating a react flow...