i’m working on chatpdf and i got this error while working on HuggingFaceHub_api_keys.
llm = HuggingFaceHub(repo_id=‘OpenAssistant/oasst-sft-1-pythia-12b’)
chain = RetrievalQA.from_chain_type(llm=llm, chain_type=“stuff”, retriever=knowledge_base.as_retriever())
response = chain.run(question)
st.success(“Completed question.”)
st.write("Answer: ", response)
File “C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\langchain\llms\huggingface_hub.py”, line 112, in _call
raise ValueError(f"Error raised by inference API: {response[‘error’]}")
ValueError: Error raised by inference API: Authorization header is correct, but the token seems invalid