chatgpt-free-api
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

chatgpt-free-api

Access ChatGPT's free "text-davinci-002-render-sha" model without needing an OpenAI API key or account!

🚨🚫 IMPORTANT: PLEASE READ BEFORE USING 🚫🚨

Do not use this package for spam!

This package is intended for educational purposes only. Spamming with this package is strictly prohibited and goes against ethical usage. Respect OpenAI's usage policies and guidelines.

NPM

Features

  • No OpenAI Account Required: Seamlessly interact with ChatGPT without signup hassles.
  • Free Model: Leverages OpenAI's "text-davinci-002-render-sha" model, accessible for free.
  • Conversational Chat: Start and continue multi-turn conversations for context-aware responses.
  • Easy-to-Use API: Simple functions for initiating and chaining conversations.

Installation

npm install chatgpt-free-api

Usage

import { chat } from 'chatgpt-free-api';

// Single-Message Conversation
async function startChat(message: string) {
  try {
    const response = await chat.startConversation(message);
    console.log(response);
  } catch (error) {
    console.error('Error starting conversation:', error);
  }
}

// Chained Conversation
async function chainChatMessages() {
  try {
    const firstResponse = await chat.startConversation('What is the output of 10 + 20?');
    console.log(firstResponse);

    const secondResponse = await chat.startConversation('Multiply by 5', firstResponse.conversation_id);
    console.log(secondResponse);
  } catch (error) {
    console.error('Error in chained conversation:', error);
  }
}

Available Functions

chat.startConversation(message: string, conversationId?: string) - Starts a new conversation or continues an existing one.

Contributing

Welcome contributions!

License

This package is licensed under the MIT License. See the LICENSE for more information.

Package Sidebar

Install

npm i chatgpt-free-api

Weekly Downloads

5

Version

1.0.5

License

none

Unpacked Size

7.42 kB

Total Files

5

Last publish

Collaborators

  • ajaykumbhre