ZeroGPT
ZeroGPT is a Python library for interacting with AI APIs, providing capabilities for text and image generation.
Features
- Text generation using various models
- Image creation based on textual descriptions
- Support for "uncensored" mode for more unrestricted responses
- Optimized memory and data handling
- Streamed data support
- Secure request authentication
Installation
pip install zerogpt
Usage
Client Initialization
from zerogpt import Client
client = Client()
Text Generation
# Simple request
response = client.send_message("Hi, how are you?")
# Request with instruction
response = client.send_message(
"Tell me about space",
instruction="You are an astronomy expert"
)
# Using "uncensored" mode
response = client.send_message(
"Explain a complex topic",
uncensored=True
)
# Using "think" mode (deeper reasoning)
response = client.send_message(
"Solve a difficult math problem",
think=True
)
# With context
messages=[
{"role": "user", "content": "Hi"},
{"role": "assistant", "content": "Hello!"}
]
response = client.send_message(
messages,
think=True
)
Image Generation
# Create image
result = client.create_image(
prompt="anime neko girl",
samples=1,
resolution=(768, 512),
seed=-1,
steps=50
)
# Get generated image
image = client.get_image(result['data']['request_id'])
# Save image
image.download(['path/to/save/image.png'])
# View image
image.open()
Image to Prompt
from zerogpt.utils.tools import image_to_prompt
resp = image_to_prompt('path/to/image.png')
Working with Dummy Context1
from zerogpt.utils.prompt import Dummy
# Create context
dummy = Dummy()
dummy.create(messages=[
{"role": "user", "content": "Hi"},
{"role": "assistant", "content": "Hello!"}
])
# Also possible for image generation
dummy = Dummy()
dummy.create(prompt='neko girl', steps=100)
# Save context
dummy.save("context.bin")
# Load context
dummy.load("context.bin")
# Use instead of messages:
# client.send_message(dummy)
# or
# client.create_image(dummy)
Parameters
send_message
input(str or list): Text prompt or list of messagesinstruction(str, optional): System instructionthink(bool, optional): Use model with deeper reasoninguncensored(bool, optional): Use unrestricted mode
create_image
prompt(str): Description of the desired imagesamples(int, optional): Number of samplesresolution(tuple, optional): Image resolution (width, height)seed(int, optional): Seed for reproducibilitysteps(int, optional): Number of generation stepsnegative_prompt(str, optional): Description of undesired elements
Security
The library uses HMAC-SHA256 to sign requests and ensure secure data transmission. All requests are authenticated using timestamps to prevent replay attacks.
Requirements
- Python 3.8+
License
MIT License Copyright (c) 2025 RedPiar
Author
-
Dummy is used to compress context and data in general, very useful for systems with low RAM. It can also be saved for even greater memory efficiency! ↩
Metadata
Release files for zerogpt 1.3.0
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 |
|---|---|---|---|---|
| zerogpt-1.3.0.tar.gz | 17.0 kB | Without provenance | Details for zerogpt-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zerogpt-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for zerogpt-1.3.0-py3-none-any.whl |
Total release size: 34.3 kB
Release files / zerogpt-1.3.0.tar.gz
| Download URL | zerogpt-1.3.0.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef323f77e10da8b6263b6ac6356ef0ffa0961ff22664d8183b3c7286a538d8ba
|
|
BLAKE2b-256 checksum How to use checksums |
c4ae4b8c5413f548a959ac62761a62a7e57cf0dcb28da294f5a8f988ff10f5da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.0
|
Release files / zerogpt-1.3.0-py3-none-any.whl
| Download URL | zerogpt-1.3.0-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
176d6fb745bc42d5985333b92cbd4cd6b2f800fffe8edf09181f4a1ba44a3a99
|
|
BLAKE2b-256 checksum How to use checksums |
8f229b45a301bf8ec136236ff138569eb17432b41f227ec69f6d8e69ca158e6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.0
|
Security for zerogpt 1.3.0
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.