Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/2kabhishek/codepilot-out-in-tdd

OpenAI autocompletion with Outside In TDD 🤖✨
https://github.com/2kabhishek/codepilot-out-in-tdd

learning mocking openai openai-api outside-in-tdd ruby ruby-on-rails tdd

Last synced: 29 days ago
JSON representation

OpenAI autocompletion with Outside In TDD 🤖✨

Awesome Lists containing this project

README

        

CodePilot Out In TDD


License


People


Stars


Forks


Watches


Last Updated

OpenAI autocompletion with Outside In TDD 🤖✨

Fetch completions from OpenAI using rails, implemented using Outside In TDD

## ✨ Features

- Fetches completions from OpenAI API
- Implemented following Outside In TDD and Layered Architecture
- Contains CI pipeline with lint and test

## Setup

### ⚡ Requirements

- ruby 3.0.4

### 🚀 Installation

```bash
git clone https://github.com/2kabhishek/codepilot-out-in-tdd
cd codepilot-out-in-tdd
bundle install
rspec # run tests
rails s # run server
```

### 💻 Usage

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`

## Behind The Code

### 🌈 Inspiration

- Learning Outside In TDD with https://github.com/sapanparikh18

### 💡 Challenges/Learnings

- The main challenges were mocking and creating the architecture in rails
- Lack of documentation around the subject for rails

### 🧰 Tooling

- [Dotfiles](https://github.com/2kabhishek/Dotfiles) — Dev Environment
- [nvim2k](https://github.com/2kabhishek/nvim2k) — Personalized Editor
- [awesome2k](https://github.com/2kabhishek/awesome2k) — Tiling Window Manager


⭐ hit the star button if you found this useful ⭐

Source
| Blog
| Twitter
| LinkedIn
| More Links
| Other Projects