achat
achat is an asynchronous wrapper over the chatsonic api for the python programming language.
Features
- asynchronous support
- message history support
- convenient customization of all query parameters
Installation
To install the latest stable version, use
pip install achat
Examples
Using chat instance
import asyncio
from achat import SonicChat
async def main():
chat = SonicChat(token="your api token here")
try:
await chat.start()
response = await chat.ask("Who is Elon Musk?")
print(response.message)
response = await chat.ask("When was he born?")
print(response.message)
finally:
await chat.close()
asyncio.run(main())
Using async context manager
import asyncio
from achat import SonicChat
async def main():
async with SonicChat(token="your api token here") as chat:
response = await chat.ask("Who is Elon Musk?")
print(response.message)
response = await chat.ask("When was he born?")
print(response.message)
asyncio.run(main())
Documentation
Coming soon
Dependencies
Metadata
Release files for achat 0.1.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 |
|---|---|---|---|---|
| achat-0.1.0.tar.gz | 3.1 kB | Without provenance | Details for achat-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| achat-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for achat-0.1.0-py3-none-any.whl |
Total release size: 6.9 kB
Release files / achat-0.1.0.tar.gz
| Download URL | achat-0.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1316103416bcd726d2279008690d189f2c56697deef3de2a02abbee3bf04736a
|
|
BLAKE2b-256 checksum How to use checksums |
b76e9e7bd63d7571e6a811e1ff7cca62fc4a960776256505f253ef36934d6090
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.11.2 Windows/10
|
Release files / achat-0.1.0-py3-none-any.whl
| Download URL | achat-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee048de129cb0c6beced8ea23d86abe8e404a45950659a59c3d469087f9b5cf4
|
|
BLAKE2b-256 checksum How to use checksums |
47f374cee33313155188e1c41a3fdcbeeb32562373e419aea88dbc689e7ebcf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.11.2 Windows/10
|
Security for achat 0.1.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.