Git Product home page Git Product logo

chatgpt's Introduction

ChatGPT

Reverse Engineered ChatGPT by OpenAI. Extensible for chatbots etc.

Note: This is a proof of concept. The goal here is to be able to write bots using the API.

Features

  • Scientific knowledge
  • Has memory. It remembers the chat history and context
  • No moderation
  • Programmable

Setup

Install

pip3 install revChatGPT

Get your Bearer token

Go to https://chat.openai.com/chat and log in or sign up

  1. Open console with F12
  2. Go to Network tab in console
  3. Find session request (Might need refresh)
  4. Copy accessToken value to config.json.example as Authorization
  5. Save as config.json (In current active directory) image image

Running

python3 -m revChatGPT Remember to press enter twice to send the message. This allows for multi-line input.

Arguments

You can pass the output through a processor using command line arguments.

Example:

Use python3 -m revChatGPT say to make a Mac speak the output

Development:

pip3 install revChatGPT

from revChatGPT.revChatGPT import Chatbot
import json

# Get your config in JSON
config = {
        "Authorization": "<Your Bearer Token Here>"
    }

chatbot = Chatbot(config, conversation_id=None)
prompt = "<Some prompt>"
response = chatbot.get_chat_response(prompt)
print(response["message"])
print(response["conversation_id"])
print(response["parent_id"])

This can be imported to projects for bots and much more. You can have multiple independent conversations by keeping track of the conversation_id.

Known issues

  • Access token expires in one hour

chatgpt's People

Contributors

scottleibrand avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.