-
Add OPENAI_API_KEY to environment variables
# .env.local OPENAI_API_KEY=...
-
Install dependencies
$ pip install -r backend/requirements.txt $ yarn install
-
Start the server.
$ yarn build && yarn start
-
(Optional) Copy wikipedia dump files into
1-wikipedia
and extract documents containing a keyword.. ├── README.md └── backend └── 1-wikipedia └── AA ├── wiki_00 ├── wiki_01 └── wiki_02 ... $ python backend/extract.py [keyword]
-
Create embeddings by using an OpenAI API.
$ python backend/index.py [keyword]
-
Add a new option for using the index in
src/page.tsx
.<option value="gpt-3.5-turbo">GPT-3.5 Turbo</option> <option value="gpt-4">GPT-4</option> <option value="llama-keyword">Llama Keyword</option> ...
-
Start the server.
$ yarn build && yarn start