MySQL
The Turboline.NLQ2SQL.MySQL
package enables developers to convert natural language queries into SQL for MySQL databases. It integrates seamlessly with .NET applications, allowing non-technical users to query databases using natural language. The package simplifies configuration by requiring a connection string, API key, and application settings. It is ideal for building AI-powered applications and dashboards that support natural language queries.
Download Nuget Package
Download your package here.
Objective
To integrate MySQL Turboline Packages into your application efficiently and effectively.
Key Steps
- Create a blank project using the ASP.NET web app model view controller.
- Choose .NET 8.0 for the project.
- Select individual accounts for authentication.
- Install the MySQL package from NuGet packages.
dotnet add package Turboline.NLP2SQL.MySQL
- Add code in the program.cs file:
- Add namespace using
Turboline.NLQ2SQL.MySQL;
. - Add
builder.Services.EnableTurbolineDashboard(builder.Configuration).ActivateMysql();
. - Add
app.UseTurbolineDashboard().UseMysql();
after the controller route.
- Add namespace using
- Update the application settings with the following configurations:
- Set MySQL as the database type.
- Provide the connection string for the database.
- Add an API key obtained from the plan subscription from https://platform.turboline.ai.
- Set an app name and logo URL.
"NLQ2SQLSettings": {
"mySql": {
"ConnectionString": "<Connectionstring>"
},
"APIKey": "",
"AppName": "Amtev Data Studio, Powered by Turboline",
"Logo": "https://cdn.turboline.ai/cdn/adminlte/dist/img/TLLogo.png"
}
- Run the project to complete the setup.
- To access the Turboline NLQ to MySQL, navigate
/Turboline/mysql
.
Cautionary Notes
- Ensure correct installation of the MySQL package from NuGet.
- Double-check the code additions in the program.cs file for accuracy.
- Securely store and manage the API key obtained from the subscription plan.
Tips for Efficiency
- Follow the steps sequentially to avoid missing any crucial configurations.
- Keep all necessary information and URLs handy for quick reference during setup.
- Test the integration thoroughly after completion to ensure functionality.
By following these steps, you can seamlessly integrate MySQL Turboline Packages into your application within a few minutes.