Skip to content

The agent engineering platform.

Fixed huggingfacehub_api_token hadning in HuggingFaceEndpoint (#4335)

PawelFaron1d1166ded6c0
diff --git a/langchain/llms/huggingface_endpoint.py b/langchain/llms/huggingface_endpoint.py
index 66a073c172..cc549da238 100644
--- a/langchain/llms/huggingface_endpoint.py
+++ b/langchain/llms/huggingface_endpoint.py
@@ -73,6 +73,7 @@ class HuggingFaceEndpoint(LLM):
"Could not import huggingface_hub python package. "
"Please install it with `pip install huggingface_hub`."
)
+ values["huggingfacehub_api_token"] = huggingfacehub_api_token
return values
@property