It is a web application that allows users and guests to ask questions and receive answers from files stored in the system, such as One Reports (56-1), ESG Reports, or other related documents.
This repository is a backend of STELLA for API Server And SELF RAG System
- Hardware
- The computer must have more than 8 GB of RAM, as the Embedding Model requires approximately 2 GB of RAM.
- At least 4 GB of storage is required to run this project (For Caches and Vector DB).
- Software
- Install Environment
python -m venv venv
- Activate Environment
# MacOS and Linux
source ./venv/bin/activate
# Window
source ./venv/Scripts/activate
- Install Packages
python install -r requirements.text
- Rename
.env_exampleto.envand add the required data inside .env (This must be done before running Docker Compose)
- Install and Run Docker-Compose
# Change Path to Directory Milvus
cd milvus
# Run Docker-compose with use file .env
docker-compose --env-file ../.env up -d
- Init Vector Db and Schema (Only in First time)
# Run the script to initialize the vector database and set the configuration.
python core.py
The output should be like this:
[CORE] Initializing Milvus Database Core...
[DB] init Embedding Model...
[DB] init Embedding Model Successfully.
[DB] Found Database: global_evaluate
[DB] Create Collection "cnode_1"
[DB] Collection "cnode_1" Is Ready.
[DB] Create Collection "gnode_1"
[DB] Collection "gnode_1" Is Ready.
[DB] Create Collection "frontend_query_gnode"
[DB] Collection "frontend_query_gnode" Is Ready.
Create Schema Successfully.
- Start Backend Server
# Change Path Back to Main
cd ..
# Start
fastapi dev main/main.py
# After running this code, it will take 1–2 minutes to start the server.