This Rails 7 application demonstrates the use of ChatGPT API to translate human natural language queries into ActiveRecord queries. It is a database-less application using Stimulus Reflex and Cable Ready to provide real-time updates.
The app was inspired by SQLTranslate, which provided the initial idea and inspiration for creating a similar tool that translates natural language queries into ActiveRecord queries.
- Translates natural language queries to ActiveRecord queries.
- Real-time updates using Stimulus Reflex and Cable Ready.
- Minimalistic and database-less architecture.
- Ruby (version 3.1.2)
- Ruby on Rails (version 7.0.7)
- Clone this repository:
git clone https://github.com/nedzib/human_to_activerecord
cd human_to_activerecord
- Install gem dependencies:
bundle install
- Setup your chatGPT API key:
- Create a .env file in the project root.
- Add your ChatGPT API credentials to the .env file:
CHATGPT_API_KEY=your_api_key_here
- Start the Rails server:
rails server
- Visit the app at http://localhost:3000
- Enjoy!
Contributions are welcome! Feel free to open issues or pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- ChatGPT API
- Stimulus Reflex
- Cable Ready
- This app was inspired by SQLTranslate.
- https://github.com/nedzib/human_to_activerecord