langchain/libs
Lucain a2023a1e96
huggingface; fix huggingface_endpoint.py (initialize clients only with supported kwargs) (#26378)
## Description

By default, `HuggingFaceEndpoint` instantiates both the
`InferenceClient` and the `AsyncInferenceClient` with the
`"server_kwargs"` passed as input. This is an issue as both clients
might not support exactly the same kwargs. This has been highlighted in
https://github.com/huggingface/huggingface_hub/issues/2522 by
@morgandiverrez with the `trust_env` parameter. In order to make
`langchain` integration future-proof, I do think it's wiser to forward
only the supported parameters to each client. Parameters that are not
supported are simply ignored with a warning to the user. From a
`huggingface_hub` maintenance perspective, this allows us much more
flexibility as we are not constrained to support the exact same kwargs
in both clients.

## Issue

https://github.com/huggingface/huggingface_hub/issues/2522

## Dependencies

None

## Twitter 

https://x.com/Wauplin

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-20 16:05:24 -07:00
..
cli langchain-cli: release 0.0.31 (#26533) 2024-09-16 12:57:24 -04:00
community community[patch]: add web loader tests (#26728) 2024-09-20 18:29:54 -04:00
core core: release 0.3.4 (#26729) 2024-09-20 14:47:15 -07:00
experimental Fix async parsing for llm graph transformer (#26650) 2024-09-19 09:15:33 -04:00
langchain core/langchain: fix version used in deprecation (#26724) 2024-09-20 16:47:18 -04:00
partners huggingface; fix huggingface_endpoint.py (initialize clients only with supported kwargs) (#26378) 2024-09-20 16:05:24 -07:00
standard-tests anthropic[patch]: fix tool call and tool res image_url handling (#26587) 2024-09-17 14:30:07 -07:00
text-splitters Improvement[text-splitter] Fix import of ExperimentalMarkdownSyntaxTextSplitter (#26703) 2024-09-20 17:04:31 +00:00