Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

Update databricks_rm.py

arnavsinghvi1187fbf415e678
diff --git a/dspy/retrieve/databricks_rm.py b/dspy/retrieve/databricks_rm.py
index 530fcf02d..a63929d02 100644
--- a/dspy/retrieve/databricks_rm.py
+++ b/dspy/retrieve/databricks_rm.py
@@ -37,7 +37,7 @@ class DatabricksRM(dspy.Retrieve):
#Example for Direct Vector Acces Index
index = client.create_direct_access_index(
- endpoint_name="your_endpoint_url",
+ endpoint_name="your_databricks_host_url",
index_name="your_index_name",
primary_key="id",
embedding_dimension=1024,
@@ -51,7 +51,7 @@ class DatabricksRM(dspy.Retrieve):
llm = dspy.OpenAI(model="gpt-3.5-turbo")
retriever_model = DatabricksRM(databricks_index_name = "your_index_name",
- databricks_endpoint = "your_endpoint_url", databricks_token = "your_databricks_token", columns= ["id", "field2", "field3", "text_vector"], k=3)
+ databricks_endpoint = "your_databricks_host_url", databricks_token = "your_databricks_token", columns= ["id", "field2", "field3", "text_vector"], k=3)
dspy.settings.configure(lm=llm, rm=retriever_model)
```
@@ -116,4 +116,4 @@ class DatabricksRM(dspy.Retrieve):
docs = []
for data_row in results["result"]["data_array"]:
docs.append({col: val for col, val in zip(results["manifest"]["columns"], data_row)})
- return dspy.Prediction(embeddings=docs)
\ No newline at end of file
+ return dspy.Prediction(embeddings=docs)