Skip to content

Programproductions/ChatGTP-NODE-JS-API-CALL

main
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

Files

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

ChatGTP-NODE-JS-API-CALL

A simple Nodejs function to call the ChatGTP endpoint

install axios: npm i axios

install dotenv: npm i dotenv

To avoid exposing your API key create a .gitignore and .env file

Store your OpenAi api key in the named variable OPENAI_API_KEY

Add .env to the gitignore file

change the input variable to anything you liken and run: node index.js

in the console and see your repsonse from ChatGTP

About

A simple Nodejs function to call the ChatGTP endpoint

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published