Skip to content

dneighbors/method-missing-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Less a project and more a funny hack. @refriedchicken the other day mentioned that it would be great to make it so method missing would just use AI to implement the method rather than throw an error. So at a hacknight later that day a few of us threw together a quick implementation to show the stupid silly power of AI and Ruby. Think something like "thefuck" only in your ruby app calling methods...

Setup

  1. Install ruby-openai gem install ruby-openai
  2. Install dotenv gem install dotenv
  3. Copy .env file for access token cp .env.sample .env
  4. Add your open AI access token to .env that was copied
  5. Fire up IRB in console in same directory as this project
  6. Type load 'aimissing.rb'
  7. Type someobject = MyDynamicClass.new
  8. Type someobject.anymethod(anyparams) ie: any method and params you want You will get an AI generated response for that method and parameter set. ex: someobject.add(2, 5) will return 7

Quick Tutorial

Tutorial

Thank You's

About

Hackety Hack Methody Missingy with Botty Bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages