Skip to content

marcomd/turbo_chat

Repository files navigation

Turbo chat

logo.jpg

Introduction

A tutorial to create an AI chat, a clone of ChatGPT (or Claude) but that can also run in your private network and without paying a monthly fee.

https://medium.com/@m.mastrodonato/lets-write-a-free-chatgpt-clone-with-rails-8-part-1-85ee5668d8fb

Install

Download the source and install the bundle:

git clone git@github.com:marcomd/turbo_chat.git

cd turbo_chat

bundle install

⚠️ To execute prompts locally you need ollama.

To only try the UI (not to develop):

bin/rails server

Navigate to http://localhost:3000


To develop I suggest you to install foreman to easily get the hot reload:

gem install foreman

foreman start -f Procfile.dev

Navigate to http://localhost:5100

Summary

In this first part the application is set up with the basic structure:

  • Part 1
    • authentication
    • basic models: user, chat and messages
    • rspec
    • a style with bootstrap
    • the service that interfaces the LLM models using ollama
  • Part 2
    • Added a UI
    • Prompt handled asynchronously in background
    • Propagating updates from server to clients

About

A simple AI chat application built with Rails 8, Hotwire and Turbo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published