Ataraxia (Blackbox)
Ataraxia is unofficial Python wrapper for Blackbox AI.
Installation
pip install ataraxia
Usage
Chat
from ataraxia import Blackbox, Model
# Use Models.BLACKBOXAI by default
blackbox = Blackbox()
response = blackbox.chat('What do you think about gen alpha?') # ChatResponse<CHAT_ID>
print(response)
# Chat with image
response = blackbox.chat('What do you think about this image?', 'https://example.com/image.png') # from image link
response = blackbox.chat('What do you think about this image?', 'QWt1IFBIUA==') # from base64 string
response = blackbox.chat('What do you think about this image?', 'data:image/png;base64,QWt1IFBIUA==') # from base64 image data
response = blackbox.chat('What do you think about this image?', b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x03\xe8\x00\x00') # from image bytes
# Use other model from Model
blackbox = Blackbox(Model.GPT_4O)
# Set system instruction prompt
blackbox = Blackbox(instruction='You are a gen alpha assistant')
# or
blackbox.change_instruction('You are a gen alpha assistant')
# Load chat data and history from saved file
blackbox = Blackbox(chat_id='SAVED_CHAT_ID')
# or
blackbox.load_chat('SAVED_CHAT_ID')
# Save chat data and history to JSON file
blackbox.save_chat()
# or
blackbox.save_chat('./ataraxia_{CHAT_ID}.json') # {CHAT_ID} will be replaced with current chat id
# Change save path
blackbox.change_save_path('filename_{CHAT_ID}.json')
Image Generation (Imagine)
from ataraxia import Blackbox
blackbox = Blackbox()
result = blackbox.imagine('A pregnant kitten') # ImageResponse<IMAGE_ID>
print(result) # https://storage.googleapis.com/...
# Download the image to bytes
image_bytes = result.download()
# Save the image to file
result.save('./imagine.jpg') # True if success False otherwise
Search
from ataraxia import Blackbox
blackbox = Blackbox()
results = blackbox.search('Schall meaning') # list of SearchResult<TITLE>
print(results[0]) # Schall. [ʃal]Maskulinum | masculine m...
Deep Search
from ataraxia import Blackbox
blackbox = Blackbox()
result = blackbox.deep_search('Schall meaning') # SearchResult<OK>
print(result)
Blackbox Params
| Param | Type | Description | Required | Default |
|---|---|---|---|---|
model |
Models |
Set the Blackbox AI (chat) default model | No | Model.BLACKBOXAI |
chat_id |
str |
Set the saved chat_id to load the history and chat data |
No | None |
instruction |
str |
Set the system instruction for every chat request | No | None |
auto_save |
bool |
Will save chat data and history to save_path if True |
No | True |
save_path |
str |
File path to save chat data like model, instruction, and history. It is recommended to always insert {CHAT_ID} so that it can be loaded with load_chat() |
No | ./ataraxia_{CHAT_ID}.json |
Blackbox.chat Params
| Param | Type | Description | Required | Default |
|---|---|---|---|---|
message |
str |
Message to send | Yes | - |
image |
str | bytes |
Additional image | No | None |
history |
list |
Chat history | No | [] |
max_tokens |
int |
Response max tokens | No | 1024 |
top_p |
float |
Probability sampling to determine the selected set of tokens for the response | No | 0.9 |
temperature |
float |
Set the level of creativity or randomness in the generated response | No | 0.7 |
Buy me tanghulu
Metadata
Release files for ataraxia 1.1.6
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 |
|---|---|---|---|---|
| ataraxia-1.1.6.tar.gz | 9.3 kB | Without provenance | Details for ataraxia-1.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ataraxia-1.1.6-py3-none-any.whl | Python 3 | none | any | Details for ataraxia-1.1.6-py3-none-any.whl |
Total release size: 19.7 kB
Release files / ataraxia-1.1.6.tar.gz
| Download URL | ataraxia-1.1.6.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f4e157b2bedb9a49e61c76860a0679ef9910887bc7930a95b26a7c10337ad46
|
|
BLAKE2b-256 checksum How to use checksums |
d57c89e1ba74668865d9b3d424e485e903c0eafacacc889a4cc1f59cce29e638
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / ataraxia-1.1.6-py3-none-any.whl
| Download URL | ataraxia-1.1.6-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94917538f922b84fe8e71a44e485f4ade4b3a9d812fc901726dc3c7b63b04fe9
|
|
BLAKE2b-256 checksum How to use checksums |
c7c3a9744607da76f5dd469026f9264fb7a5352eabd8e167c6e31dfde5df86e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Security for ataraxia 1.1.6
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.