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

HuggingFace Demo Broken?

Open evanVerinomics opened this issue 2 years ago • 1 comments

Space failed. Exit code: 1. Reason: Traceback (most recent call last): File "app.py", line 2, in import paperqa File "/home/user/.local/lib/python3.8/site-packages/paperqa/init.py", line 1, in from .docs import Answer, Docs, PromptCollection, Doc, Text File "/home/user/.local/lib/python3.8/site-packages/paperqa/docs.py", line 35, in class Docs(BaseModel, arbitrary_types_allowed=True, smart_union=True): File "/home/user/.local/lib/python3.8/site-packages/paperqa/docs.py", line 43, in Docs llm: Union[str, BaseLanguageModel] = ChatOpenAI( File "/home/user/.local/lib/python3.8/site-packages/langchain/load/serializable.py", line 74, in init super().init(**kwargs) File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init pydantic.error_wrappers.ValidationError: 1 validation error for ChatOpenAI root Did not find openai_api_key, please add an environment variable OPENAI_API_KEY which contains it, or pass openai_api_key as a named parameter. (type=value_error)

I get the same error when I try to run this, This used to work and I've tried updating my openai api key but still get errors.

export OPENAI_API_KEY="sk-foo"

evanVerinomics avatar Dec 01 '23 16:12 evanVerinomics

also having this issue

kaiwen-wang avatar Jan 06 '24 23:01 kaiwen-wang

Closing as a duplicate of https://github.com/Future-House/paper-qa/issues/196

jamesbraza avatar Sep 11 '24 18:09 jamesbraza