From 05cbf06e9dd1a28fac111e5235e4322674d8e318 Mon Sep 17 00:00:00 2001 From: Prithvi Kannan Date: Fri, 13 Dec 2024 15:00:37 -0800 Subject: [PATCH 1/2] databricks-langchain as primary package Signed-off-by: Prithvi Kannan --- integrations/langchain/README.md | 44 ++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/integrations/langchain/README.md b/integrations/langchain/README.md index c60cef0..6317861 100644 --- a/integrations/langchain/README.md +++ b/integrations/langchain/README.md @@ -1,38 +1,54 @@ -# 🦜🔗 Using Databricks AI Bridge with Langchain +# 🦜🔗 Databricks LangChain Integration -Integrate Databricks AI Bridge package with Langchain to allow seamless usage of Databricks AI features with Langchain/Langgraph applications. - -Note: This repository is the future home for all Databricks integrations currently found in `langchain-databricks` and `langchain-community`. We have now aliased `langchain-databricks` to `databricks-langchain`, consolidating integrations such as ChatDatabricks, DatabricksEmbeddings, DatabricksVectorSearch, and more under this package. +The `databricks-langchain` package provides seamless integration of Databricks AI features into LangChain applications. This repository is now the central hub for all Databricks-related LangChain components, consolidating previous packages such as `langchain-databricks` and `langchain-community`. ## Installation -### Install from PyPI +### From PyPI ```sh pip install databricks-langchain ``` -### Install from source - +### From Source ```sh pip install git+ssh://git@github.com/databricks/databricks-ai-bridge.git#subdirectory=integrations/langchain ``` -## Get started +## Key Features -### Use LLMs on Databricks +- **🤖 LLMs Integration:** Use Databricks-hosted large language models (LLMs) like Llama and Mixtral through `ChatDatabricks`. +- **📐 Vector Search:** Store and query vector representations using `DatabricksVectorSearch`. +- **🔢 Embeddings:** Generate embeddings with `DatabricksEmbeddings`. +- **📊 MLflow Support:** Track experiments, manage models, and use MLflow features. +## Getting Started + +### Use LLMs on Databricks ```python from databricks_langchain import ChatDatabricks + llm = ChatDatabricks(endpoint="databricks-meta-llama-3-1-70b-instruct") ``` -### (Preview) Use a Genie space as an agent - -> [!NOTE] -> Requires Genie API Private Preview. Reach out to your account team for enablement. +### Use a Genie Space as an Agent (Preview) +> **Note:** Requires Genie API Private Preview. Contact your Databricks account team for enablement. ```python from databricks_langchain.genie import GenieAgent -genie_agent = GenieAgent("space-id", "Genie", description="This Genie space has access to sales data in Europe") +genie_agent = GenieAgent( + "space-id", "Genie", + description="This Genie space has access to sales data in Europe" +) ``` + +--- + +## Contribution Guide +We welcome contributions! Please see our [contribution guidelines](https://github.com/databricks/databricks-ai-bridge/tree/main/integrations/langchain) for details. + +## License +This project is licensed under the [MIT License](LICENSE). + +Thank you for using Databricks LangChain! + From 740e305cfad3c0c8c1866b590a92d6ea6e02b894 Mon Sep 17 00:00:00 2001 From: Prithvi Kannan Date: Fri, 13 Dec 2024 15:02:34 -0800 Subject: [PATCH 2/2] genie Signed-off-by: Prithvi Kannan --- integrations/langchain/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/integrations/langchain/README.md b/integrations/langchain/README.md index 6317861..0d24f6b 100644 --- a/integrations/langchain/README.md +++ b/integrations/langchain/README.md @@ -16,10 +16,10 @@ pip install git+ssh://git@github.com/databricks/databricks-ai-bridge.git#subdire ## Key Features -- **🤖 LLMs Integration:** Use Databricks-hosted large language models (LLMs) like Llama and Mixtral through `ChatDatabricks`. -- **📐 Vector Search:** Store and query vector representations using `DatabricksVectorSearch`. -- **🔢 Embeddings:** Generate embeddings with `DatabricksEmbeddings`. -- **📊 MLflow Support:** Track experiments, manage models, and use MLflow features. +- **LLMs Integration:** Use Databricks-hosted large language models (LLMs) like Llama and Mixtral through `ChatDatabricks`. +- **Vector Search:** Store and query vector representations using `DatabricksVectorSearch`. +- **Embeddings:** Generate embeddings with `DatabricksEmbeddings`. +- **Genie:** Use [Genie](https://www.databricks.com/product/ai-bi/genie) in Langchain. ## Getting Started