This project uses GPT chat completions to help users find data in SQL Server. It uses the OpenAI API to generate SQL queries based on user input.
This was made during a hackathon and does not account in any way for security, ethics, etc. - it is only meant as a technical proof-of-concept!
Prerequisites:
- Azure OpenAI subscription
- SQL Server database
- Clone this repository
- Create an
appsettings.jsonfile with the following schema and enter your own values (OAI values - see REST API docs):
{
"ConnectionStrings": {
"default": "SQL_CONNECTION_STRING"
},
"oaiDeploymentName": "DEPLOYMENT_ID",
"oaiKey": "API_KEY",
"oaiEndpoint": "ENDPOINT_URL"
}- Install the required packages:
dotnet restore - Run with
dotnet run