ERROR : The class `HuggingFaceHub` was deprecated in LangChain 0.0.21 and will be removed in 0.2.0. Use HuggingFaceEndpoint instead.
#116
by
Goncalo08PT
- opened
import os
Replace this with your HF token
os.environ["HUGGINGFACE_ACCESS_TOKEN"] = "hf_MYCODE"
from embedchain import App
config = {
'llm': {
'provider': 'huggingface',
'config': {
'model': 'mistralai/Mistral-7B-Instruct-v0.2',
'top_p': 0.5
}
},
'embedder': {
'provider': 'huggingface',
'config': {
'model': 'sentence-transformers/all-mpnet-base-v2'
}
}
}
app = App.from_config(config=config)
app.add("https://www.forbes.com/profile/elon-musk")
app.add("https://en.wikipedia.org/wiki/Elon_Musk")
app.query("What is the net worth of Elon Musk today?")
Answer: The net worth of Elon Musk today is $258.7 billion.
Goncalo08PT
changed discussion status to
closed
Goncalo08PT
changed discussion status to
open
i think this issue is more for the langchain repo
Goncalo08PT
changed discussion status to
closed