Try it here 👉 olym.pe
If you are interested in this project, or just want to discuss, contact me on twitter
🚧 It's a proof-of-concept, there is lots of work to be done here... 🚧
- Support high number of tables
- Syntax support for entities ("Netflix" will match "net-flix")
- Use of database values and types to improve the query generation
- Multiple databases support
- Postgres
- BigQuery (wip)
- Plot results in a table or in a chart depending on the query/results
- Possibility to edit & correct the sql query
- Upload of CSV
- Support multiple profils and organisations
- AI based on OpenAI's GPT-3 API
- Frontend: Vue3, Vite
- Backend: NestJS
- Database: Postgres
- Upload Service: sanic (python)
├── service: backend in nestjs
│ ├── src/databases
│ │ ├── implementatons (postgres, bigquery)
│ ├── src/files
│ ├── src/queries
│ ├── src/tables
│ ├── src/users
├── uploader: micro service to upload data to the playground
├── view: frontend in vue3
in /service
- create a
.env
file with the following content:
OPENAI_API_KEY=sk-...
DATABASE_URL=postgres://...
yarn
-- install dependenciesyarn typeorm migration:run
-- run migrationsyarn start:dev
-- run the backend
in /view
yarn
-- install dependenciesyarn dev
-- run the front
You will need to add a database to start using the service
Check README.md in /uploader
for more details
You can add users management with Propelauth by adding the following env variables:
/service/.env
PROPELAUTH_URL=
PROPELAUTH_APIKEY=
PROPELAUTH_VERIFIER_KEY=
PROPELAUTH_ISSUER=
/view/.env
VITE_PROPELAUTH_URL=
If you prefer to use docker-compose, you can use the following command:
docker-compose up --build
You can modify the docker-compose.yml
file to add variables or modify the database url.
- getDatabaseSchema
- selectTables (openai.select_tables.ejs)
- extractConditionsValues (openai.where.ejs)
- fetchClosedValues (from database)
- getValidatedQueriesExamplesOnDatabase (openai.default.ejs)