Skip to main content

HTTP clients for easy integration with different ai models

Project description

ai-clients

HTTP clients for easy integration with different AI models.

Installation

To install the package, use pip:

pip install ai-clients

Usage

Here is a simple example of how to use the Codestral client:

import aiohttp
from ai_clients.codestral.client import Codestral
import asyncio

async def main():
    async with aiohttp.ClientSession() as session:
        client = Codestral(base_url="https://api.example.com", api_key="your_api_key", session=session)
        response = await client.chat_completion("Hello, how are you?")
        print(response)

asyncio.run(main())

Development

To set up the development environment, run:

python -m pip install --upgrade pip
python -m pip install uv
uv venv
source .venv/bin/activate
uv sync --all-extras

Testing

To run the tests, use:

uv run pytest -vv

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_clients-0.1.1.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_clients-0.1.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file ai_clients-0.1.1.tar.gz.

File metadata

  • Download URL: ai_clients-0.1.1.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ai_clients-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8f2c32d9a871180ba4e7fb8f0f833d84df23ca7a089c60cf4c7eaf379d26dfcd
MD5 a27e4e58db51805118731fe287a9d527
BLAKE2b-256 a106e3f418a5232bc3c248181af8bb06bfaa7aa907ee04da789f49e78984d14d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_clients-0.1.1.tar.gz:

Publisher: build-publish.yml on Vladimir-Titov/ai-clients

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ai_clients-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ai_clients-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ai_clients-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9feaf30dd3000ba6838048301289acf627058f6b55a843413e30366ebb59a72f
MD5 2ad7c72a3934b739385caf9b169c9e8f
BLAKE2b-256 9c8fc4ff835444ea33b2fde39dd1f04b7ccd972e6c40f242f2424070db748f82

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_clients-0.1.1-py3-none-any.whl:

Publisher: build-publish.yml on Vladimir-Titov/ai-clients

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page