Future-House / paper-qa

LLM Chain for answering questions from documents with citations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HuggingFace Demo Broken?

evanVerinomics opened this issue · comments

commented

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"

also having this issue