community[patch]: deprecate all HF classes (#22444)

This commit is contained in:
Bagatur
2024-06-04 09:48:25 -07:00
committed by GitHub
parent 58b118544e
commit 17c127531a
7 changed files with 25 additions and 7 deletions

View File

@@ -20,7 +20,11 @@ VALID_TASKS_DICT = {
}
@deprecated("0.0.21", removal="0.3.0", alternative="HuggingFaceEndpoint")
@deprecated(
"0.0.21",
removal="0.3.0",
alternative_import="from langchain_huggingface import HuggingFaceEndpoint",
)
class HuggingFaceHub(LLM):
"""HuggingFaceHub models.
! This class is deprecated, you should use HuggingFaceEndpoint instead.