community: Add deprecation notice for Databricks integration in langchain-community (#27355)

We have released the
[langchain-databricks](https://github.com/langchain-ai/langchain-databricks)
package for Databricks integration. This PR deprecates the legacy
classes within `langchain-community`.

---------

Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
Yuki Watanabe
2024-10-16 11:20:40 +09:00
committed by GitHub
parent 15c1ddaf99
commit b8bfebd382
4 changed files with 26 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ from abc import ABC, abstractmethod
from typing import Any, Callable, Dict, List, Mapping, Optional
import requests
from langchain_core._api import deprecated
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.language_models import LLM
from pydantic import (
@@ -262,6 +263,11 @@ def _pickle_fn_to_hex_string(fn: Callable) -> str:
raise ValueError(f"Failed to pickle the function: {e}")
@deprecated(
since="0.3.3",
removal="1.0",
alternative_import="langchain_databricks.ChatDatabricks",
)
class Databricks(LLM):
"""Databricks serving endpoint or a cluster driver proxy app for LLM.