Copyright | (c) 2025 Tushar Adhatrao |
---|---|
License | MIT |
Maintainer | Tushar Adhatrao <[email protected]> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Langchain.LLM.Huggingface
Description
Huggingface inference implementation Langchain's LLM Interface. https:/huggingface.codocsinference-providersproviders/cerebras
- Support for text generation, chat, and streaming responses
- Configuration of Huggingface-specific parameters (temperature, max tokens, etc.)
- Conversion between Langchain's message format and Huggingface's API requirements
- Compatibility with Huggingface's hosted inference API and other providers
Synopsis
- data Huggingface = Huggingface {}
- data Provider
- data HuggingfaceParams = HuggingfaceParams {}
- defaultHuggingfaceParams :: HuggingfaceParams
- defaultMessage :: Message
Types
data Huggingface Source #
Configuration for Huggingface LLM integration
Constructors
Huggingface | |
Instances
Show Huggingface Source # | |||||
Defined in Langchain.LLM.Huggingface Methods showsPrec :: Int -> Huggingface -> ShowS # show :: Huggingface -> String # showList :: [Huggingface] -> ShowS # | |||||
LLM Huggingface Source # | |||||
Defined in Langchain.LLM.Huggingface Associated Types
Methods generate :: Huggingface -> Text -> Maybe (LLMParams Huggingface) -> IO (Either String Text) Source # chat :: Huggingface -> ChatMessage -> Maybe (LLMParams Huggingface) -> IO (Either String Text) Source # stream :: Huggingface -> ChatMessage -> StreamHandler -> Maybe (LLMParams Huggingface) -> IO (Either String ()) Source # | |||||
type LLMParams Huggingface Source # | |||||
Defined in Langchain.LLM.Huggingface |
Providers integrated with Huggingface Inference https://huggingface.co/docs/inference-providers/index#partners
Constructors
Cerebras | |
Cohere | |
FalAI | |
Fireworks | |
HFInference | |
Hyperbolic | |
Nebius | |
Novita | |
Replicate | |
SambaNova | |
Together |
data HuggingfaceParams Source #
Generation parameters specific to Huggingface models
Constructors
HuggingfaceParams | |
Fields
|
Instances
Show HuggingfaceParams Source # | |
Defined in Langchain.LLM.Huggingface Methods showsPrec :: Int -> HuggingfaceParams -> ShowS # show :: HuggingfaceParams -> String # showList :: [HuggingfaceParams] -> ShowS # | |
Eq HuggingfaceParams Source # | |
Defined in Langchain.LLM.Huggingface Methods (==) :: HuggingfaceParams -> HuggingfaceParams -> Bool # (/=) :: HuggingfaceParams -> HuggingfaceParams -> Bool # |
Functions
defaultHuggingfaceParams :: HuggingfaceParams Source #
Default values for huggingface params
defaultMessage :: Message Source #
Default message type