DSPy: The framework for programming—not prompting—language models
Python
add docstrings and update docs
Hasala Marakkalage205fd2fa2598
diff --git a/docs/api/retrieval_model_clients/RAGatouilleRM.md b/docs/api/retrieval_model_clients/RAGatouilleRM.mdindex 9d34988e2..f3fb785fb 100644--- a/docs/api/retrieval_model_clients/RAGatouilleRM.md+++ b/docs/api/retrieval_model_clients/RAGatouilleRM.md@@ -34,5 +34,5 @@ Enables making queries to the RAGatouille made index for retrieval. Internally,- `k` (_int_, _optional_): Number of passages to retrieve. Defaults to 3.**Returns:**-- `dspy.Prediction`: List of K passages+- `dspy.Prediction`: List of k passagesdiff --git a/dspy/retrieve/ragatouille_rm.py b/dspy/retrieve/ragatouille_rm.pyindex dfedb734d..cff6ba299 100644--- a/dspy/retrieve/ragatouille_rm.py+++ b/dspy/retrieve/ragatouille_rm.py@@ -40,6 +40,14 @@ class RAGatouilleRM(dspy.Retrieve):raise FileNotFoundError(f"Index not found: {e}")def forward(self, query_or_queries: Union[str, list[str]], k: Optional[int]) -> dspy.Prediction:+ """Search with RAGAtouille based index for self.k top passages for query++ Args:+ query_or_queries (Union[str, List[str]]): The query or queries to search for.+ k (Optional[int]): The number of top passages to retrieve. Defaults to self.k.+ Returns:+ dspy.Prediction: An object containing the retrieved passages.+ """k = k if k is not None else self.kqueries = ([query_or_queries]