Jhonbrayaan / node-chatgpt-api

A Node integration with OpenAI api for text completions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

๐Ÿ‘จโ€๐Ÿš€ Repo for the purpose of personal study

GitHub top language GitHub language count Repository size

โš”๏ธ Proposed Challenge

Create a api integration with openIA text completion (ChatGPT) with Node.

# Routes
POST     /api/prompt      sending prompt to text completion

๐Ÿš€ Technologies

This code source was developed with the following technologies:

โš›๏ธ Main Techs

๐Ÿ“š Libs & Dependencys

  • openAI - To integrate with openAI Algorhitms
  • express - For create rest apis with more
  • cors - Control access to api requests/resources
  • dotenv - Configuration custom file
  • nodemon - Node monitoring server for development

๐Ÿฅท Techniques

โ„น๏ธ How To Use

To clone and run this application, you'll need Git, Node.js v14.16 or higher + NPM v8 or higher installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/felipeAguiarCode/node-chatgpt-api

# Go into the repository
$ cd node-chatgpt-api

# Install dependencies
$ npm install

# Run (development ambient)
$ npm run dev
  • to use openai lib
The library needs to be configured with your account's secret key, which is available on the website. Setting API key as an environment variable in .env. before run

About

A Node integration with OpenAI api for text completions


Languages

Language:JavaScript 98.6%Language:Shell 1.4%