This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from terry3041/patch-pypasser
Add PyPasser support
- Loading branch information
Showing
3 changed files
with
86 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,25 +48,30 @@ session_token = 'abc123' # `__Secure-next-auth.session-token` cookie from https | |
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='http://proxy.example.com:8080') # specify proxy | ||
api = ChatGPT(auth_type='google', email='[email protected]', password='password') # auth with google login | ||
api = ChatGPT(session_token, moderation=False) # disable moderation | ||
api = ChatGPT(session_token, window_size=(1024, 768)) # specify window size | ||
api = ChatGPT(session_token, verbose=True) # verbose mode (print debug messages) | ||
|
||
# login with openai and solve simple reCAPTCHA automatically, but you should reCAPTCHA by yourself, | ||
# it does not work on server without GUI. | ||
api = ChatGPT(auth_type='openai', email='[email protected]', password='password', verbose=True) | ||
# login with openai and solve simple reCAPTCHA automatically, while pass reCAPTCHA enterprise with 2captcha API, | ||
# it works on server without GUI. | ||
api = ChatGPT(auth_type='openai', email='[email protected]', password='password', | ||
twocaptcha_apikey='2captcha_apikey', | ||
verbose=True) | ||
# auth with google login | ||
api = ChatGPT(auth_type='google', email='[email protected]', password='password') | ||
# auth with openai login (captcha solving using speech-to-text engine) | ||
api = ChatGPT(auth_type='openai', email='[email protected]', password='password') | ||
# auth with openai login (manual captcha solving) | ||
api = ChatGPT( | ||
auth_type='openai', captcha_solver='manual', | ||
email='[email protected]', password='password' | ||
) | ||
# auth with openai login (2captcha for captcha solving) | ||
api = ChatGPT( | ||
auth_type='openai', captcha_solver='2captcha', solver_apikey='abc', | ||
email='[email protected]', 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='[email protected]', password='password', | ||
login_cookies_path='your_cookies_path', | ||
verbose=True) | ||
login_cookies_path='your_cookies_path', | ||
) | ||
|
||
resp = api.send_message('Hello, world!') | ||
print(resp['message']) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "pyChatGPT" | ||
version = "0.4.0" | ||
version = "0.4.1" | ||
authors = [ | ||
{ name="terry3041", email="[email protected]" }, | ||
] | ||
|
@@ -19,7 +19,7 @@ classifiers = [ | |
dependencies = [ | ||
'undetected-chromedriver >= 3.1.7', | ||
'PyVirtualDisplay >= 3.0', | ||
'markdownify >= 0.11.6', | ||
'markdownify >= 0.11.6' | ||
] | ||
|
||
[project.urls] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters