Welcome to text-sql! This tool helps you convert natural language text into SQL queries effortlessly. Whether you're a SQL novice or a seasoned developer, text-sql streamlines the process of database querying.
- 🧠 AI-Powered Conversion: Transform natural language queries into precise SQL statements using advanced AI models.
- 🔄 Dual API Support: Choose between OpenAI's GPT and Anthropic's Claude for diverse AI capabilities.
- 📊 Multi-Table Support: Handle complex database schemas with multiple tables and relationships.
- 🔧 Dynamic Schema Input: Easily input and modify your database structure through the user interface.
- 💻 User-Friendly Interface: Intuitive web-based UI for seamless interaction.
- 🔒 Secure Backend: Node.js server ensuring safe handling of API requests and responses.
- 📚 Educational Tool: Learn SQL through natural language interactions.
- 📊 Data Analysis: Quickly generate SQL queries for data exploration and reporting.
- 🎓 SQL Learning: Help students understand how natural language translates to SQL.
- 💼 Business Intelligence: Enable non-technical users to query databases using familiar language.
- 🧪 Prototyping: Rapidly prototype database queries for application development.
- 🔍 Database Exploration: Easily explore and understand new or complex database schemas.
- Clone the repository:
git clone https://github.com/ftchvs/text-sql.git
- Navigate to the project directory:
cd text-sql
- Install dependencies:
npm install
To start the application, run:
npm start
The application will be available at http://localhost:3000
.
- Enter your query: Type a natural language query in the input box.
- Convert to SQL: Click the "Convert" button to generate the SQL query.
- Copy the SQL: Copy the generated SQL query for use in your database management system.
- Method: POST
- Description: Converts natural language to SQL.
- Request:
{ "query": "Show me all users who signed up in the last month." }
- Response:
{ "sql": "SELECT * FROM users WHERE signup_date >= NOW() - INTERVAL 1 MONTH;" }
Q1: How do I add a new event?
A1: Navigate to the 'Events' section and click on 'Add Event'. Fill in the required details and click 'Save'.
Q2: Can I use text-sql with any database?
A2: Yes, text-sql supports multiple database types. Ensure your database schema is correctly inputted in the 'Schema' section.
- Initial release with AI-powered SQL conversion, multi-table support, and dynamic schema input.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or support, please contact ftchvs.