Fetch completions from OpenAI using rails, implemented using Outside In TDD
- Fetches completions from OpenAI API
- Implemented following Outside In TDD and Layered Architecture
- Contains CI pipeline with lint and test
- ruby 3.0.4
git clone https://github.com/2kabhishek/codepilot-out-in-tdd
cd codepilot-out-in-tdd
bundle install
rspec # run tests
rails s # run server
You can go to the server url and navigate to /completions/ask
path with query as a query param
For example: http://localhost:3000/completions/ask?query=how to write hello world in ruby
- Learning Outside In TDD with https://github.com/sapanparikh18
- The main challenges were mocking and creating the architecture in rails
- Lack of documentation around the subject for rails
β hit the star button if you found this useful β
Source | Blog | Twitter | LinkedIn | More Links | Other Projects