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.2.0.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.2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ai_clients-0.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 ead50be147503c12be549bc04dedb3a14a3631f48c586d6667bf9c91b0b3a5e9
MD5 983defdf17f91532f6d632d20ebfe68b
BLAKE2b-256 464d9e30774754e01caf8a85e7b35257fefdbc062c34a649e3fe00bd6696557f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ai_clients-0.2.0-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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f244ee4d6656d132ec1124820a63d0a28952e3ed45d18b19df46c4ad5a7219e1
MD5 e1eea1897b9b03247ffc4c0af21d3e7d
BLAKE2b-256 f046cdea716e84b7e26bf2c2bec016d8a141693160673c4283d2749a4ac141ca

See more details on using hashes here.

Provenance

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