paper-qa icon indicating copy to clipboard operation
paper-qa copied to clipboard

LiteLLM with HuggingFace and PaperQA

Open diazr04 opened this issue 1 year ago • 1 comments

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.

diazr04 avatar Oct 11 '24 02:10 diazr04