
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
An unofficial Python wrapper for OpenAI's ChatGPT API
undetected_chromedriver
Since version 0.3.0, this library is using only the
undetected_chromedriver
to bypass Cloudflare's anti-bot protection.requests
module is no longer used due to the complexity of the protection. Please make sure you have Google Chrome / Chromium before using this wrapper.
pip install -U pyChatGPTH
F12
.__Secure-next-auth.session-token
cookie in Application
> Storage
> Cookies
> https://chat.openai.com
.Cookie Value
field.python3 -m pyChatGPT
from pyChatGPT import ChatGPT
session_token = 'abc123' # `__Secure-next-auth.session-token` cookie from https://chat.openai.com/chat
api = ChatGPT(session_token) # auth with session token
api = ChatGPT(session_token, conversation_id='some-random-uuid') # specify conversation id
api = ChatGPT(session_token, proxy='https://proxy.example.com:8080') # specify proxy
api = ChatGPT(session_token, chrome_args=['--window-size=1920,768']) # specify chrome args
api = ChatGPT(session_token, moderation=False) # disable moderation
api = ChatGPT(session_token, verbose=True) # verbose mode (print debug messages)
# auth with google login
api = ChatGPT(auth_type='google', email='example@gmail.com', password='password')
# auth with microsoft login
api = ChatGPT(auth_type='microsoft', email='example@gmail.com', password='password')
# auth with openai login (captcha solving using speech-to-text engine)
api = ChatGPT(auth_type='openai', email='example@gmail.com', password='password')
# auth with openai login (manual captcha solving)
api = ChatGPT(
auth_type='openai', captcha_solver=None,
email='example@gmail.com', password='password'
)
# auth with openai login (2captcha for captcha solving)
api = ChatGPT(
auth_type='openai', captcha_solver='2captcha', solver_apikey='abc',
email='example@gmail.com', password='password'
)
# reuse cookies generated by successful login before login,
# if `login_cookies_path` does not exist, it will process logining with `auth_type`, and save cookies to `login_cookies_path`
# only works when `auth_type` is `openai` or `google`
api = ChatGPT(auth_type='openai', email='example@xxx.com', password='password',
login_cookies_path='your_cookies_path',
)
resp = api.send_message('Hello, world!')
print(resp['message'])
api.reset_conversation() # reset the conversation
api.clear_conversations() # clear all conversations
api.refresh_chat_page() # refresh the chat page
# install chromium & X virtual framebuffer
sudo apt install chromium-browser xvfb
# start your script
python3 your_script.py
It is normal for the seession to be crashed when installing dependencies. Just ignore the error and run your script.
# install dependencies
!apt install chromium-browser xvfb
!pip install -U selenium_profiles pyChatGPT
# install chromedriver
from selenium_profiles.utils.installer import install_chromedriver
install_chromedriver()
# start your script as normal
!python3 -m pyChatGPT
This project is inspired by
This project is not affiliated with OpenAI in any way. Use at your own risk. I am not responsible for any damage caused by this project. Please read the OpenAI Terms of Service before using this project.
This project is licensed under the GPLv3 License - see the LICENSE file for details.
FAQs
An unofficial Python wrapper for OpenAI's ChatGPT API for HEROKU
We found that pyChatGPTH demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.