GETTING ERROR >> AttributeError: 'InferenceClient' object has no attribute 'post'


There is an issue with HuggingFaceEndpoint package

#from langchain_huggingface import HuggingFaceEndpoint
from langchain_community.llms import HuggingFaceEndpoint
from langchain import PromptTemplate, LLMChain
import os

repo_id="mistralai/Mistral-7B-Instruct-v0.3"

llm = HuggingFaceEndpoint(
    repo_id=repo_id,
    max_new_tokens=512,
    top_k=10,
    top_p=0.95,
    typical_p=0.95,
    temperature=0.01,
    repetition_penalty=1.03,
    huggingfacehub_api_token="hf_*****"
)

print(llm.invoke("write a poem on deep learning , for children age 10 "))
1 Like