DSPy: The framework for programming—not prompting—language models
Python
Updated ChromadbRM documentation to use generic EmbeddingFunction
Daniel Kovalenko7dab4bbdba14
diff --git a/dspy/retrieve/chromadb_rm.py b/dspy/retrieve/chromadb_rm.pyindex d6500c305..aa4398bb3 100644--- a/dspy/retrieve/chromadb_rm.py+++ b/dspy/retrieve/chromadb_rm.py@@ -42,10 +42,8 @@ class ChromadbRM(dspy.Retrieve):Args:collection_name (str): chromadb collection namepersist_directory (str): chromadb persist directory- openai_embed_model (str, optional): The OpenAI embedding model to use. Defaults to "text-embedding-ada-002".- openai_api_key (str, optional): The API key for OpenAI. Defaults to None.- openai_org (str, optional): The organization for OpenAI. Defaults to None.- k (int, optional): The number of top passages to retrieve. Defaults to 3.+ embedding_function (Optional[EmbeddingFunction[Embeddable]]): Optional function to use to embed documents. Defaults to DefaultEmbeddingFunction.+ k (int, optional): The number of top passages to retrieve. Defaults to 7.Returns:dspy.Prediction: An object containing the retrieved passages.