The `langchain-databricks` package was an integration library connecting LangChain with Databricks AI features, including LLMs, vector search, and MLflow. It has been superseded by `databricks-langchain` to consolidate Databricks-related LangChain components. The last published version of `langchain-databricks` is 0.1.2, and it is no longer actively maintained or receiving new features. Users should migrate to the `databricks-langchain` package for continued support and new functionality.
pip install langchain-databricksVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to instantiate and use `ChatDatabricks` from the *recommended* `databricks-langchain` package to interact with a Databricks Model Serving endpoint. If running outside a Databricks Workspace, ensure `DATABRICKS_HOST` and `DATABRICKS_TOKEN` environment variables are set for authentication. The code for the deprecated `langchain-databricks` is shown for historical context but should not be used in new projects.
Migrate your `pip install` command to `pip install databricks-langchain` and update all imports from `langchain_databricks` to `databricks_langchain`.
Set `DATABRICKS_HOST` and `DATABRICKS_TOKEN` environment variables or pass `databricks_host` and `databricks_token` directly during class instantiation (e.g., `ChatDatabricks(endpoint=..., databricks_host=..., databricks_token=...)`).
Double-check that the `endpoint` name passed to `ChatDatabricks` or `DatabricksEmbeddings` exactly matches the configured endpoint name in your Databricks workspace. Verify associated API keys and resource configurations.
Use `mlflow.langchain.log_model(lc_model=..., registered_model_name='your_catalog.your_schema.your_model', model_config={'chain_type': 'stuff'})`.