The demo is using nonsense made up QuantumFlux software documentation generated by ChatGPT
The project is built using the following open source tools:
- Frontend: Vue 3, HeadlessUI, Prism
- Backend: Redis, Nest.js
- DevOps: Docker
- Others: LangChain, Socket.io
- Database: Qdrant
In order to run the app you should have the following installed:
-
Clone the repository:
git clone https://github.com/zaikinv/rag-starter.git cd rag-starter
-
Install the dependencies:
npm i
-
Create a
docs
foldermkdir docs
-
Add your docs to folder.
🚨 Currently supports
.md
files only. Adjustpackages/scripts/loader
if needed. -
Run the script
npm run ingest
Clone the project
-
Create
.env
in the root folder:touch .env
-
Set environment variables in
.env
:OPENAI_API_KEY= OPENAI_API_BASE_URL= VECTOR_STORE_DEFAULT_COLLECTION_NAME= VECTOR_STORE_API_KEY= VECTOR_STORE_URL= REDIS_HOST= REDIS_PORT= DOCS_FOLDER_NAME=
Example
OPENAI_API_KEY=sk-JsdnaErYVIPuej4kqweT7BmzkGH7FXIDPR6u4fGyUF8W1ET OPENAI_API_BASE_URL=https://api.openai.com/v1/ VECTOR_STORE_DEFAULT_COLLECTION_NAME=my-embeddings VECTOR_STORE_API_KEY=JsdnaErYVIPuej4kqweT7Bmzk VECTOR_STORE_URL=http://localhost:6333 REDIS_HOST=localhost REDIS_PORT=6379 DOCS_FOLDER_NAME=docs
-
Configure the assistant web component:
<ask-docs-widget ui-theme="" api-url="" vector-store-collection-name="" external-source-base-url=""> </ask-docs-widget>
Parameter Example Description ui-theme
light
Can be customized in src/styles/themes.scss
api-url
http://localhost:3000
Base URL of Nest backend vector-store-collection-name
my-embeddings
Name of Qdrant collection external-source-base-url
https://google.com
Optional, used to prefix links -
Run the containers:
docker compose -f docker-compose.yml up --build --remove-orphans
-
Run the app:
npm run start:all