mirror of
https://github.com/hwchase17/langchain
synced 2024-11-18 09:25:54 +00:00
community[patch]: Fix the _call of HuggingFaceHub (#16891)
Fixed the following identified issue: #16849 @baskaryan
This commit is contained in:
parent
304f3f5fc1
commit
3c4b24b69a
@ -127,10 +127,10 @@ class HuggingFaceHub(LLM):
|
||||
response = hf("Tell me a joke.")
|
||||
"""
|
||||
_model_kwargs = self.model_kwargs or {}
|
||||
params = {**_model_kwargs, **kwargs}
|
||||
parameters = {**_model_kwargs, **kwargs}
|
||||
|
||||
response = self.client.post(
|
||||
json={"inputs": prompt, "params": params}, task=self.task
|
||||
json={"inputs": prompt, "parameters": parameters}, task=self.task
|
||||
)
|
||||
response = json.loads(response.decode())
|
||||
if "error" in response:
|
||||
|
Loading…
Reference in New Issue
Block a user