Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.28 KB

readme.md

File metadata and controls

37 lines (26 loc) · 1.28 KB

NyaySathi Backend

This repository contains the backend code for NyaySathi project. Nyay Sathi is an AI powered platform where people can get legal guidance and advice for their legal quiries through voice input and output in their regional language.

The backend is build using FLask and it is deployed on replit. This flask server is responsible for the following tasks.

  1. Handling the incoming requests from the frontend.
  2. Using RAG (Retrival Augemented Generation) model with OpenAI's GPT 3 embeddings to generate response for the user's query.
  3. Using Indian Kanoon API to fetch relevant legal documents for the user's query to train the RAG model.
  4. Using Narakeet API to convert the generated response into audio.
  5. Sending the response back to the frontend.

Getting Started

  • Setup a virtual environment and install the dependencies.
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
  • Create a .env file and add the following variables.
OPENAI_KEY=<your openai api key>
ORG=<your openai org id>
NARAKEET_KEY=<your narakeet api key>
  • Run the flask server.
flask run
  • The server will be running on port 5000.