Skip to content

Commit dbc96d4

Browse files
fix databricksrm (#1967)
1 parent 6085098 commit dbc96d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dspy/retrieve/databricks_rm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def forward(
288288
page_content=doc[self.text_column_name],
289289
metadata={
290290
"doc_id": self._extract_doc_ids(doc),
291-
"doc_uri": doc[self.docs_uri_column_name],
291+
"doc_uri": doc[self.docs_uri_column_name] if self.docs_uri_column_name else None,
292292
}
293293
| self._get_extra_columns(doc),
294294
type="Document",
@@ -300,7 +300,7 @@ def forward(
300300
return Prediction(
301301
docs=[doc[self.text_column_name] for doc in sorted_docs],
302302
doc_ids=[self._extract_doc_ids(doc) for doc in sorted_docs],
303-
doc_uris=[doc[self.docs_uri_column_name] for doc in sorted_docs],
303+
doc_uris=[doc[self.docs_uri_column_name] for doc in sorted_docs] if self.docs_uri_column_name else None,
304304
extra_columns=[self._get_extra_columns(item) for item in sorted_docs],
305305
)
306306

0 commit comments

Comments
 (0)