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.0.tar.gz (28.2 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.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ai_clients-0.1.0.tar.gz
  • Upload date:
  • Size: 28.2 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.0.tar.gz
Algorithm Hash digest
SHA256 99b1cf9fac47fac53d44536f9262c9b45c35e188f9834a652bfa936b18158087
MD5 60f18e923068834c69ca7e14954b4e56
BLAKE2b-256 05c8b4c221f6246181df28793ec033181236137ddbdb859ca376bf77f11b53ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_clients-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: ai_clients-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26846bfd984a92102063d1292ba68d83ce99e6c2e6cdc53e02469be284011e98
MD5 e013b75af4cd2ba3f08451d1eeb43ba5
BLAKE2b-256 fb0106671c8bb5a01aeb38cd64e971d7488084675e4f355a4021dc4f4f93389a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_clients-0.1.0-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