Skip to content

aliyeysides/openai-quickstart-ruby

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

(Unofficial) OpenAI API Quickstart - Ruby example app

This is an example pet name generator app used in the OpenAI API quickstart tutorial. It uses the Sinatra web framework. Check out the tutorial or follow the instructions below to get set up.

Setup

  1. If you don’t have Ruby >=3.1.0 installed, I recommend you install it with rbenv

  2. Clone this repository

  3. Navigate into the project directory

    $ cd openai-quickstart-ruby
  4. Install the bundler gem

    $ gem install bundler
  5. Install the requirements

    $ bundle install
  6. Make a copy of the example environment variables file

    $ cp .env.example .env
  7. Add your API key to the newly created .env file

  8. Run the app

    $ ruby app.rb

You should now be able to access the app at http://localhost:4567! For the full context behind this example app, check out the tutorial.

About

Ruby example app from the OpenAI API quickstart tutorial

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published