paper-qa
paper-qa copied to clipboard
LiteLLM with HuggingFace and PaperQA
Hello.
I want to know if I can use a HuggingFace model (that can be used with Litellm) as the model.
This is my code:
`from paperqa import Settings, ask import litellm
Set verbose to see detailed logs
litellm.set_verbose = True
answer = ask( "What is the size of the catalyst in this paper?", settings=Settings( llm="huggingface/01-ai/Yi-1.5-34B-Chat", paper_directory=r'C:\Users\raul_\Documents\test_litellm_paperqa', ), )
print(answer.formatted_answer) `
Still, it asks for an api key.
but I do not know if i can pass my HuggingFace Api key, if it is possible how?
Thank you.