DSPy: The framework for programming—not prompting—language models
Python
fix databricksrm (#1967)
Chen Qiandbc96d491fef
diff --git a/dspy/retrieve/databricks_rm.py b/dspy/retrieve/databricks_rm.pyindex d9eb45210..249b3856d 100644--- a/dspy/retrieve/databricks_rm.py+++ b/dspy/retrieve/databricks_rm.py@@ -288,7 +288,7 @@ class DatabricksRM(dspy.Retrieve):page_content=doc[self.text_column_name],metadata={"doc_id": self._extract_doc_ids(doc),- "doc_uri": doc[self.docs_uri_column_name],+ "doc_uri": doc[self.docs_uri_column_name] if self.docs_uri_column_name else None,}| self._get_extra_columns(doc),type="Document",@@ -300,7 +300,7 @@ class DatabricksRM(dspy.Retrieve):return Prediction(docs=[doc[self.text_column_name] for doc in sorted_docs],doc_ids=[self._extract_doc_ids(doc) for doc in sorted_docs],- doc_uris=[doc[self.docs_uri_column_name] for doc in sorted_docs],+ doc_uris=[doc[self.docs_uri_column_name] for doc in sorted_docs] if self.docs_uri_column_name else None,extra_columns=[self._get_extra_columns(item) for item in sorted_docs],)