Skip to content

Npm package to use chatgpt in your application. Get openai API and you are good to go.

Notifications You must be signed in to change notification settings

roshankcpkr/chatgptapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This package enables you to use chatGpt in your application without worrying about underlying methods. You can get api key from openai labs and get started in a minute.

Getting Started

Here are instructions on how you can get started.

Prerequisites

You must have openai labs api key credentials before you can get going. Get one from openaichatgpt

Installation

# Npm
npm install openai
npm install getchatgpt
# yarn
yarn add openai
yarn add getchatgpt
# pnpm
pnpm add openai
pnpm add getchatgpt

Usage

const gptapi = require('getchatgpt')

const myGpt = new gptapi({
    apiKey: process.env.OPEN_AI_API,
  })
async function myFunction()
{
    const myResponse = await myGpt.answer("who made tesla?")
    console.log(myResponse)

}
myFunction()

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Npm package to use chatgpt in your application. Get openai API and you are good to go.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published