Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community[patch]: Fix HuggingFace LLM to not repeat the prompt as part of the result #17363

Closed
wants to merge 8 commits into from
2 changes: 1 addition & 1 deletion libs/community/langchain_community/llms/huggingface_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def _call(
response = hf("Tell me a joke.")
"""
_model_kwargs = self.model_kwargs or {}
parameters = {**_model_kwargs, **kwargs}
parameters = {**_model_kwargs, **kwargs, "return_full_text": False}
lin-calvin marked this conversation as resolved.
Show resolved Hide resolved

response = self.client.post(
json={"inputs": prompt, "parameters": parameters}, task=self.task
Expand Down
Loading