mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-04 04:28:58 +00:00
huggingface: init package (#21097)
First Pr for the langchain_huggingface partner Package - Moved some of the hugging face related class from `community` to the new `partner package` Still needed : - Documentation - Tests - Support for the new apply_chat_template in `ChatHuggingFace` - Confirm choice of class to support for embeddings witht he sentence-transformer team. cc : @efriis --------- Co-authored-by: Cyril Kondratenko <kkn1993@gmail.com> Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
@@ -2,6 +2,7 @@ import json
|
||||
import logging
|
||||
from typing import Any, AsyncIterator, Dict, Iterator, List, Mapping, Optional
|
||||
|
||||
from langchain_core._api.deprecation import deprecated
|
||||
from langchain_core.callbacks import (
|
||||
AsyncCallbackManagerForLLMRun,
|
||||
CallbackManagerForLLMRun,
|
||||
@@ -21,6 +22,11 @@ VALID_TASKS = (
|
||||
)
|
||||
|
||||
|
||||
@deprecated(
|
||||
since="0.0.37",
|
||||
removal="0.3",
|
||||
alternative_import="from langchain_huggingface.llms import HuggingFaceEndpoint",
|
||||
)
|
||||
class HuggingFaceEndpoint(LLM):
|
||||
"""
|
||||
HuggingFace Endpoint.
|
||||
|
Reference in New Issue
Block a user