
This project is a Next.js application that allows users to query a PostgreSQL database using natural language and visualize the results. It's powered by the AI SDK by Vercel and uses OpenAI's GPT-4o model to translate natural language queries into SQL.
The database contains information about unicorn companies, including:
This data is based on CB Insights' list of unicorn companies.
To get the project up and running, follow these steps:
Install dependencies:
Copy the example environment file:
Add your OpenAI API key and PostgreSQL connection string to the .env file:
Download the dataset:
unicorns.csv in the root of your projectSeed the database:
Start the development server:
Your project should now be running on http://localhost:3000.
The project is set up for easy deployment on Vercel. Use the "Deploy with Vercel" button in the repository to create your own instance of the application.
To learn more about the technologies used in this project, check out the following resources: