Home

Awesome

Code Samples for OpenAI & ChatGPT API

This repo contains code samples using the OpenAI API.

Setup

  1. If you don’t have Node.js installed, install it from here

  2. Clone this repository

  3. Install the requirements

    $ npm install
    
  4. Make a copy of the example environment variables file

    On Linux systems:

    $ cp .env.example .env
    

    On Windows:

    $ copy .env.example .env
    
  5. Add your API key to the newly created .env file

  6. Run the app

    $ node xxx.js
    

ChatGPT Bot Apps

Reference