Skip to main content

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

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)

Source distribution for achat 0.1.0
File Size Uploaded
achat-0.1.0.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for achat 0.1.0
File Interpreter ABI Platform
achat-0.1.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page