Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 2.19 KB

README.md

File metadata and controls

67 lines (47 loc) · 2.19 KB

Human to ActiveRecord

Live on Railway

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.

Features

  • Translates natural language queries to ActiveRecord queries.
  • Real-time updates using Stimulus Reflex and Cable Ready.
  • Minimalistic and database-less architecture.

Requirements

  • Ruby (version 3.1.2)
  • Ruby on Rails (version 7.0.7)

Installation

  1. Clone this repository:
git clone https://github.com/nedzib/human_to_activerecord
cd human_to_activerecord
  1. Install gem dependencies:
bundle install
  1. 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
  1. Start the Rails server:
rails server
  1. Visit the app at http://localhost:3000
  2. Enjoy!

Contributing

Contributions are welcome! Feel free to open issues or pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments