Skip to content

Commit

Permalink
docs: Update langchain docs to new Databricks package (#28274)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
prithvikannan authored Nov 22, 2024
1 parent 49254cd commit 2917f85
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
10 changes: 5 additions & 5 deletions docs/docs/integrations/chat/databricks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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."
]
},
{
Expand All @@ -111,7 +111,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -qU langchain-databricks"
"%pip install -qU databricks-langchain"
]
},
{
Expand All @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/integrations/text_embedding/databricks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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:"
]
},
{
Expand All @@ -90,7 +90,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -qU langchain-databricks"
"%pip install -qU databricks-langchain"
]
},
{
Expand All @@ -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",
Expand Down
11 changes: 5 additions & 6 deletions docs/docs/integrations/tools/databricks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -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\")"
]
Expand Down Expand Up @@ -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"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -76,7 +76,7 @@
},
"outputs": [],
"source": [
"%pip install -qU langchain-databricks"
"%pip install -qU databricks-langchain"
]
},
{
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 2917f85

Please sign in to comment.