Code Monkey home page Code Monkey logo

sublayerapp / blueprints Goto Github PK

View Code? Open in Web Editor NEW
42.0 4.0 1.0 361 KB

Blueprints is an open-source tool that integrates with your text editor to help you generate code with an LLM based on patterns you already have in your codebase. Download one of our official editor plugins to get started.

Home Page: https://blueprints.sublayer.com

License: MIT License

Dockerfile 2.03% Ruby 84.00% JavaScript 4.00% CSS 1.13% HTML 8.47% Shell 0.37%

blueprints's Introduction

Blueprints by Sublayer

This Ruby on Rails app enables you to store chunks of your code we call "blueprints" and then use them as a basis for generating new code using those previously saved blueprints as a base for GPT4 to generate from.

Blog post sharing some background info: Is Software Engineering Dead?

Demo video showing Blueprints usage in VSCode

Installation

OpenAI Configuration

Google Configuration

  • Get a Gemini API key: https://ai.google.dev/

  • Set the API key in your environment as: GEMINI_API_KEY

  • Set config.ai_provider to google in config/application.rb

  • Install Postgres (if not installed): brew install postgres

  • Install pgvector (if on postgres14): brew install pgvector

  • Install one of the editor plugins:

  • Clone the repo: git clone https://github.com/sublayerapp/blueprints
  • Change to the blueprints directory: cd blueprints
  • Install dependencies: bundle install
  • Create your database: bin/rails db:create
  • Run migrations: bin/rails db:migrate
  • Generate the tailwind css: bin/rails tailwindcss:build
  • Run the server: bin/rails s

Usage

With a server running on http://localhost:3000 you can use any of the above plugins to start storing blueprints locally and generating new ones.

Once you have a handful of blueprints you can view them and their associated descriptions at http://localhost:3000

LLM Performance specs

  1. go to spec_perforamnce/llms/ai_models.yml to specify which llms you'd like to test
  2. run rspec spec_performance

You must have the appropriate llm setup. See sublayer for setup instructions.

How It Works

Create A New Blueprint

When you use the editor plugin to POST your highlighted code to blueprints#create it first sends the code to gpt4 to generate a description and a name.

Once it has a description and a name, it creates vector embeddings of that description and stores the whole record in the database for future lookup.

Create A Blueprint Variant

When you use the editor plugin to POST your highlighted description to blueprint_variants#create it uses the description to find the closest blueprint.

Once the closest blueprint is found, it sends that blueprint's description, associated code, and the new description to gpt4 for generation and replaces the highlighted text in your editor with the generated code.

Community

Like what you see, or looking for more people working on the future of programming with LLMs?

Come join us in the Sublayer Discord

blueprints's People

Contributors

andrewbkang avatar swerner avatar

Stargazers

Peter Melling avatar Robert Pannick avatar  avatar Sebastian avatar Glenn Ericksen avatar Pavel Khlustikov avatar Matteo Piotto avatar  avatar Jim Gay avatar Sean Isom avatar Abhishek Parolkar avatar Jim Waterwash avatar Vlad Starkov avatar Deivide Oliveira avatar xzgyb avatar Dmytro Piliugin avatar Jordan Huizenga avatar Jonathan Nelson avatar  avatar Mike Schwab avatar Stephen Ierodiaconou avatar Piotr Brudny avatar David Teren avatar Ed Tee avatar Igor Zubkov avatar Jeb Coleman avatar Jared Wenerd avatar Bashar AlShrah avatar Pavel Kalashnikov avatar Ernesto Tagwerker avatar Thomas Carr avatar Michael Deering avatar Treetop Interactive avatar Dave Anderson avatar Seth Horsley avatar Ankesh Bharti avatar Eric Richmond avatar Suha Sabi Hussain avatar Kojo Osei avatar Zubair Quraishi avatar Ivan Lugo avatar Eli Mellen avatar

Watchers

Abhik Khanra avatar Hooopo avatar  avatar  avatar

Forkers

yazz

blueprints's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.