This is a LangChain project with over 1700+ pages of documentation scraped from https://docs.unrealengine.com/5.1/en-US/
Data is scraped using BeautifulSoup and stored in the data\scraping_cache
folder. If the data is already scraped, it will be loaded from the cache instead of scraping again to save time.
FAISS is used as the vector store to store the OpenAI embeddings. The FAISS index is stored in the data
folder with the .index
extension. If the index is already built, it will be loaded from the cache instead of building again to save time.
To start fresh (scrapping and building the index again), delete the data
folder.
All commands are run from the root of the repository.
-
Clone this repository.
-
Run
pip install -r requirements.txt
to install the dependencies. -
Set the
OPENAI_API_KEY
environment variable to your OpenAI API key on your system. -
Install langchain-serve then run
lc-serve deploy local main
.
Visit http://localhost:8080/docs
to interact with the API. (Make sure to provide the OPENAI_API_KEY
in the request)