git clone https://github.com/hwchase17/notion-qa cd notion-qa
qa.py append below another importsimport pathlib temp = pathlib.PosixPath pathlib.PosixPath = pathlib.WindowsPath
OPENAI_API_KEY= pip install -r requirements.txt # install pytorch and transformer pip install --force-reinstall charset-normalizer==3.1.0 python qa.py $query
If you want to change DB
change code
ingest.py for p in ps: with open(p, encoding='UTF8') as f:
chain = VectorDBQAWithSourcesChain.from_llm(llm=OpenAI(temperature=0), vectorstore=store, reduce_k_below_max_tokens=True)
and then replace Notion_DB folder
rm faiss_store.pkl python ingest.py

Seonglae Cho