- Clone the github repository
git clone https://github.com/initd1/Shlok-AI.git
- Install python-pip in your environment
- Install virtualenv
pip install virtualenv
- Create virtual environment
virtualenv <environment-name>
- Activate virtual environment
Mac or Linux
source <environment-name>/bin/activate
Windows
<environment-name>\Scripts\activate.bat
- Install required packages in the virtual environment
pip install -r requirements.txt
- Ensure node and npm are installed in your environment
-
Ensure
config.ini
file is created under Config directory -
Use
config.ini.template
file as a reference and fill the required details. -
Rename
config.ini.template
toconfig.ini
Preview of
config.ini.template
file:[OPENAI] OPENAI_API_KEY= MODEL=
- Execute Flask API script so the API Endpoints are made available
python api.py
- From the home folder of the npm app,
cd shlok-ai
npm run start
It is important that before you do anything you have the requirements.txt
file
installed as it is required for the dependencies that are used in this project.
To install all dependencies listed in this file, run the following:
python -m pip install -r requirements.txt
To execute tests, please ensure that you have the pytest
module installed.
The unittest module is used, however, this is native to python and does not have to be installed.
To run tests, please ensure that you are in the base directory, where Tests
and main.py
is visible.
To run tests with print output:
pytest -s
To run tests without print output:
pytest
Warning pytest will not run if python site-packages are not already in your global path!
Use docker compose to provision the microservices for shlok-ai API and shlok-ai UI.
The below command will build the images as well as bring up both the containers:
docker-compose -f docker-compose-shlok-ai.yml up -d --build