From 2917f8573f388a01b6a65dbda0c0f518fae2a130 Mon Sep 17 00:00:00 2001 From: Prithvi Kannan <46332835+prithvikannan@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:03:28 -1000 Subject: [PATCH] docs: Update langchain docs to new Databricks package (#28274) Thank you for contributing to LangChain! Ctrl+F to find instances of `langchain-databricks` and replace with `databricks-langchain`. Additional guidelines: - Make sure optional dependencies are imported within a function. - Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests. - Most PRs should not touch more than one package. - Changes should be backwards compatible. - If you are adding something to community, do not re-import it in langchain. If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17. Signed-off-by: Prithvi Kannan --- docs/docs/integrations/chat/databricks.ipynb | 10 +++++----- .../docs/integrations/text_embedding/databricks.ipynb | 8 ++++---- docs/docs/integrations/tools/databricks.ipynb | 11 +++++------ .../vectorstores/databricks_vector_search.ipynb | 6 +++--- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/docs/docs/integrations/chat/databricks.ipynb b/docs/docs/integrations/chat/databricks.ipynb index 5b66d2b91ff24..1c9f6ea27be6f 100644 --- a/docs/docs/integrations/chat/databricks.ipynb +++ b/docs/docs/integrations/chat/databricks.ipynb @@ -31,7 +31,7 @@ "\n", "| Class | Package | Local | Serializable | Package downloads | Package latest |\n", "| :--- | :--- | :---: | :---: | :---: | :---: |\n", - "| [ChatDatabricks](https://python.langchain.com/api_reference/community/chat_models/langchain_community.chat_models.databricks.ChatDatabricks.html) | [langchain-databricks](https://python.langchain.com/api_reference/databricks/index.html) | ❌ | beta | ![PyPI - Downloads](https://img.shields.io/pypi/dm/langchain-databricks?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-databricks?style=flat-square&label=%20) |\n", + "| [ChatDatabricks](https://python.langchain.com/api_reference/community/chat_models/langchain_community.chat_models.databricks.ChatDatabricks.html) | [databricks-langchain](https://python.langchain.com/docs/integrations/providers/databricks/) | ❌ | beta | ![PyPI - Downloads](https://img.shields.io/pypi/dm/langchain-databricks?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-databricks?style=flat-square&label=%20) |\n", "\n", "### Model features\n", "| [Tool calling](/docs/how_to/tool_calling/) | [Structured output](/docs/how_to/structured_output/) | JSON mode | [Image input](/docs/how_to/multimodal_inputs/) | Audio input | Video input | [Token-level streaming](/docs/how_to/chat_streaming/) | Native async | [Token usage](/docs/how_to/chat_token_usage_tracking/) | [Logprobs](/docs/how_to/logprobs/) |\n", @@ -102,7 +102,7 @@ "source": [ "### Installation\n", "\n", - "The LangChain Databricks integration lives in the `langchain-databricks` package." + "The LangChain Databricks integration lives in the `databricks-langchain` package." ] }, { @@ -111,7 +111,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install -qU langchain-databricks" + "%pip install -qU databricks-langchain" ] }, { @@ -132,11 +132,11 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "from langchain_databricks import ChatDatabricks\n", + "from databricks_langchain import ChatDatabricks\n", "\n", "chat_model = ChatDatabricks(\n", " endpoint=\"databricks-dbrx-instruct\",\n", diff --git a/docs/docs/integrations/text_embedding/databricks.ipynb b/docs/docs/integrations/text_embedding/databricks.ipynb index 4de876b37cc8d..eab60db2aa390 100644 --- a/docs/docs/integrations/text_embedding/databricks.ipynb +++ b/docs/docs/integrations/text_embedding/databricks.ipynb @@ -28,7 +28,7 @@ "\n", "| Class | Package |\n", "| :--- | :--- |\n", - "| [DatabricksEmbeddings](https://api.python.langchain.com/en/latest/embeddings/langchain_databricks.embeddings.DatabricksEmbeddings.html) | [langchain-databricks](https://api.python.langchain.com/en/latest/databricks_api_reference.html) |\n", + "| [DatabricksEmbeddings](https://api.python.langchain.com/en/latest/embeddings/langchain_databricks.embeddings.DatabricksEmbeddings.html) | [databricks-langchain](https://python.langchain.com/docs/integrations/providers/databricks/) |\n", "\n", "### Supported Methods\n", "\n", @@ -80,7 +80,7 @@ "source": [ "### Installation\n", "\n", - "The LangChain Databricks integration lives in the `langchain-databricks` package:" + "The LangChain Databricks integration lives in the `databricks-langchain` package:" ] }, { @@ -90,7 +90,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install -qU langchain-databricks" + "%pip install -qU databricks-langchain" ] }, { @@ -108,7 +108,7 @@ "metadata": {}, "outputs": [], "source": [ - "from langchain_databricks import DatabricksEmbeddings\n", + "from databricks_langchain import DatabricksEmbeddings\n", "\n", "embeddings = DatabricksEmbeddings(\n", " endpoint=\"databricks-bge-large-en\",\n", diff --git a/docs/docs/integrations/tools/databricks.ipynb b/docs/docs/integrations/tools/databricks.ipynb index fafb14cd97357..42337b01bde37 100644 --- a/docs/docs/integrations/tools/databricks.ipynb +++ b/docs/docs/integrations/tools/databricks.ipynb @@ -34,7 +34,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -46,16 +46,16 @@ } ], "source": [ - "%pip install --upgrade --quiet databricks-sdk langchain-community langchain-databricks langgraph mlflow" + "%pip install --upgrade --quiet databricks-sdk langchain-community databricks-langchain langgraph mlflow" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "from langchain_databricks import ChatDatabricks\n", + "from databricks_langchain import ChatDatabricks\n", "\n", "llm = ChatDatabricks(endpoint=\"databricks-meta-llama-3-70b-instruct\")" ] @@ -92,8 +92,7 @@ } }, "source": [ - "(Optional) To increase the retry time for getting a function execution response, set environment variable UC_TOOL_CLIENT_EXECUTION_TIMEOUT. Default retry time value is 120s.", - + "(Optional) To increase the retry time for getting a function execution response, set environment variable UC_TOOL_CLIENT_EXECUTION_TIMEOUT. Default retry time value is 120s.\n", "## LangGraph agent example" ] }, diff --git a/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb b/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb index db97f9fb4cb66..a6716ef30379f 100644 --- a/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb +++ b/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb @@ -62,7 +62,7 @@ "source": [ "### Installation\n", "\n", - "The LangChain Databricks integration lives in the `langchain-databricks` package." + "The LangChain Databricks integration lives in the `databricks-langchain` package." ] }, { @@ -76,7 +76,7 @@ }, "outputs": [], "source": [ - "%pip install -qU langchain-databricks" + "%pip install -qU databricks-langchain" ] }, { @@ -225,7 +225,7 @@ }, "outputs": [], "source": [ - "from langchain_databricks.vectorstores import DatabricksVectorSearch\n", + "from databricks_langchain import DatabricksVectorSearch\n", "\n", "vector_store = DatabricksVectorSearch(\n", " endpoint=endpoint_name,\n",