Skip to content

Generate and run SQL queries from plain text english using the OpenAI API.

Notifications You must be signed in to change notification settings

noahskorner/ai-powered-database-queries

Repository files navigation

ai-powered-database-queries

Prerequisites

This guide assumes you have already generated a OpenAI API key, which can be found here.

Running the application

  1. Create the env file and add your OpenAI API key
cp .env.example .env
  1. Install dependencies
npm install
  1. Run the application
npm run start

Using your own database

Want to use your own SQLite database? Just replace the ./data/baby_names.db path with the path to your database.

db.ts

const client = new Database("./data/baby_names.db");

About

Generate and run SQL queries from plain text english using the OpenAI API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published