Lightweight version of ChatGPT
Uses API by Pawan
Disclaimer
This is not open source. PawanOsman can see all your requests and your session token.
Install
pip3 install ChatGPT-lite
Setup:
Getting session token
Check https://github.com/acheong08/ChatGPT/wiki/Setup
Usage
Command line
usage: ChatGPT-lite [-h] [--session_token SESSION_TOKEN] [--bypass_node BYPASS_NODE (optional)] [--async_mode]
Example development:
import argparse
import sys
import asyncio
from ChatGPT_lite.ChatGPT import Chatbot
async def async_main(args):
if args.session_token is None:
print("Please provide a session token")
sys.exit(1)
chat = Chatbot(args.session_token, args.bypass_node)
await asyncio.gather(chat.wait_for_ready())
while True:
try:
prompt = input("You: ")
if prompt == "!exit":
break
response = await chat.ask(prompt)
print(f"\nBot: {response['answer']}\n")
except KeyboardInterrupt:
break
# Close sockets
chat.close()
# exit
sys.exit(0)
def sync_main(args):
chat = Chatbot(args.session_token, args.bypass_node)
# Create loop
loop = asyncio.new_event_loop()
# Set
asyncio.set_event_loop(loop)
# Run
loop.run_until_complete(chat.wait_for_ready())
while True:
try:
prompt = input("You: ")
if prompt == "!exit":
break
response = loop.run_until_complete(chat.ask(prompt))
print(f"\nBot: {response['answer']}\n")
except KeyboardInterrupt:
break
# Close sockets
chat.close()
# stop asyncio event loop
loop.stop()
# exit
sys.exit(0)
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--session_token', type=str, default=None)
parser.add_argument('--bypass_node', type=str,
default="https://gpt.pawan.krd")
parser.add_argument('--async_mode', action='store_true')
args = parser.parse_args()
if args.session_token is None:
print("Please provide a session token")
sys.exit(1)
print("Starting. Please wait...")
if args.async_mode:
asyncio.run(async_main(args))
else:
sync_main(args)
if __name__ == "__main__":
main()
Metadata
Release files for ChatGPT-lite 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ChatGPT_lite-0.0.5.tar.gz | 4.7 kB | Without provenance | Details for ChatGPT_lite-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ChatGPT_lite-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for ChatGPT_lite-0.0.5-py3-none-any.whl |
Total release size: 10.4 kB
Release files / ChatGPT_lite-0.0.5.tar.gz
| Download URL | ChatGPT_lite-0.0.5.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ca1701107cc1ef196a280e20d3e1852c02c79055ebae48143690b8084759e84
|
|
BLAKE2b-256 checksum How to use checksums |
3386e97dafede302b3397a6108e95c518b8988a656bcc0a1c92d660867b12d6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / ChatGPT_lite-0.0.5-py3-none-any.whl
| Download URL | ChatGPT_lite-0.0.5-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f1941929bfd8b7bf051f48d6247c89513a0e88749d8af344231b0191c77e432a
|
|
BLAKE2b-256 checksum How to use checksums |
93d7e3448c785fecfb82ead7d9ecb380ba7751cb46afbac50b05b3db02bcb9e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for ChatGPT-lite 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.