Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.
/ CustomGPT Public archive

Use GPT-4 models in Python without using the openai's API. A package that provides user the ability to use their own GPT chat in python without needing openai-API

License

Notifications You must be signed in to change notification settings

NLmeng/CustomGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CustomGPT

This current implementation has deprecated because of security updates.

This project provides GPT-Plus subscribers the ability to use their GPT-4 in python without having access to GPT-4's API. It provides a class that substitute the actual API; it will essentially use https://chat.openai.com/chat in the background. This also supports the usage of older versions of GPT, this way you don't have to pay for the openai-API usage or wait for the API's waitlist.

.env setup

(NOTE: You need a subscription to GPT-Plus to use "gpt-4", otherwise you can use "text-davinci-002-render-sha" (default 3.5), or "text-davinci-002-render-paid" (legacy 3.5))

Create .env file in the root directory with the following content inside (to be filled):

    OPENAI_API_KEY=
    _PUID=
  • go to https://chat.openai.com/chat
  • inspect the website
  • go to application tab
  • locate Cookies then locate the https://chat.openai.com tab under it
  • copy the value of _puid (this is for _PUID in .env)
  • go to network tab
  • locate Fetch/XHR
  • refresh the page and locate models then locate authorization under Headers
  • copy the value of the authorization (don't copy Bearer) (this is for OPENAI_API_KEY in .env)

Usage:

Installation:

  • pip install CustomGPT

Importing:

  • from CustomGPT import CustomGPT

Usage Example:

    from CustomGPT import CustomGPT
    
    if __name__ == "__main__":

      gpt = CustomGPT().start_new_chat()
    
      # getting help with .env:

      gpt = CustomGPT().help()

About

Use GPT-4 models in Python without using the openai's API. A package that provides user the ability to use their own GPT chat in python without needing openai-API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published