mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-19 13:23:35 +00:00
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 <prithvi.kannan@databricks.com>
This commit is contained in:
parent
49254cde70
commit
2917f8573f
@ -31,7 +31,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"| Class | Package | Local | Serializable | Package downloads | Package latest |\n",
|
"| Class | Package | Local | Serializable | Package downloads | Package latest |\n",
|
||||||
"| :--- | :--- | :---: | :---: | :---: | :---: |\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 |  |  |\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 |  |  |\n",
|
||||||
"\n",
|
"\n",
|
||||||
"### Model features\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",
|
"| [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": [
|
"source": [
|
||||||
"### Installation\n",
|
"### Installation\n",
|
||||||
"\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": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"%pip install -qU langchain-databricks"
|
"%pip install -qU databricks-langchain"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -132,11 +132,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 3,
|
"execution_count": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from langchain_databricks import ChatDatabricks\n",
|
"from databricks_langchain import ChatDatabricks\n",
|
||||||
"\n",
|
"\n",
|
||||||
"chat_model = ChatDatabricks(\n",
|
"chat_model = ChatDatabricks(\n",
|
||||||
" endpoint=\"databricks-dbrx-instruct\",\n",
|
" endpoint=\"databricks-dbrx-instruct\",\n",
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"| Class | Package |\n",
|
"| Class | Package |\n",
|
||||||
"| :--- | :--- |\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",
|
"\n",
|
||||||
"### Supported Methods\n",
|
"### Supported Methods\n",
|
||||||
"\n",
|
"\n",
|
||||||
@ -80,7 +80,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"### Installation\n",
|
"### Installation\n",
|
||||||
"\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": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"%pip install -qU langchain-databricks"
|
"%pip install -qU databricks-langchain"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -108,7 +108,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from langchain_databricks import DatabricksEmbeddings\n",
|
"from databricks_langchain import DatabricksEmbeddings\n",
|
||||||
"\n",
|
"\n",
|
||||||
"embeddings = DatabricksEmbeddings(\n",
|
"embeddings = DatabricksEmbeddings(\n",
|
||||||
" endpoint=\"databricks-bge-large-en\",\n",
|
" endpoint=\"databricks-bge-large-en\",\n",
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
@ -46,16 +46,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"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",
|
"cell_type": "code",
|
||||||
"execution_count": 2,
|
"execution_count": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from langchain_databricks import ChatDatabricks\n",
|
"from databricks_langchain import ChatDatabricks\n",
|
||||||
"\n",
|
"\n",
|
||||||
"llm = ChatDatabricks(endpoint=\"databricks-meta-llama-3-70b-instruct\")"
|
"llm = ChatDatabricks(endpoint=\"databricks-meta-llama-3-70b-instruct\")"
|
||||||
]
|
]
|
||||||
@ -92,8 +92,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"source": [
|
"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"
|
"## LangGraph agent example"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"### Installation\n",
|
"### Installation\n",
|
||||||
"\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": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"%pip install -qU langchain-databricks"
|
"%pip install -qU databricks-langchain"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -225,7 +225,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from langchain_databricks.vectorstores import DatabricksVectorSearch\n",
|
"from databricks_langchain import DatabricksVectorSearch\n",
|
||||||
"\n",
|
"\n",
|
||||||
"vector_store = DatabricksVectorSearch(\n",
|
"vector_store = DatabricksVectorSearch(\n",
|
||||||
" endpoint=endpoint_name,\n",
|
" endpoint=endpoint_name,\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user