This service is responsible for the actual conversion of NLP to SQL and generating output data
It utilized two LLMs namely : Gemini and Worqhat
Create a .env
file and input the data accordingly
WORQHAT_API_KEY=<worqhat-api-key>
GEMINI_API_KEY=<gemini-api-key>
GEMINI_MODEL_NAME=gemini-1.5-flash
Goto /app/services/firebase_services/data/firebase-config.json
file and input the given information
{
"type": "",
"project_id": "",
"private_key_id": "",
"private_key": "",
"client_email": "",
"client_id": "",
"auth_uri": "",
"token_uri": "",
"auth_provider_x509_cert_url": "",
"client_x509_cert_url": "",
"universe_domain": ""
}
pip install virtualenv
virtualenv my_env
my_env/Scripts/activate
pip install -r requirements.txt
fastapi dev .\app\main.py
- /api/metadata/generate
Method: GET
This route is responsible for the Generating the meta-data from the given database
- /api/query
Method: POST
This route is used for actual conversion and execution of the query
Expected payload
{
"query": "string",
"model": "string",
"dbms": "string",
"credentials": {
"host": "string",
"user": "string",
"password": "string",
"database": "string",
"port": "string"
}
}
- /api/data-visualization Method: POST
This method is responsible for the creation of the graphs, charts and insights
Expected payload is the results of the /api/query
API Endpoint
{
"results": [
"string"
]
}