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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ead50be147503c12be549bc04dedb3a14a3631f48c586d6667bf9c91b0b3a5e9
|
|
| MD5 |
983defdf17f91532f6d632d20ebfe68b
|
|
| BLAKE2b-256 |
464d9e30774754e01caf8a85e7b35257fefdbc062c34a649e3fe00bd6696557f
|
Provenance
The following attestation bundles were made for ai_clients-0.2.0.tar.gz:
Publisher:
build-publish.yml on Vladimir-Titov/ai-clients
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_clients-0.2.0.tar.gz -
Subject digest:
ead50be147503c12be549bc04dedb3a14a3631f48c586d6667bf9c91b0b3a5e9 - Sigstore transparency entry: 176047695
- Sigstore integration time:
-
Permalink:
Vladimir-Titov/ai-clients@c4ddd1e3e1f96402f7807e25aa7babed6711aa69 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/Vladimir-Titov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-publish.yml@c4ddd1e3e1f96402f7807e25aa7babed6711aa69 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f244ee4d6656d132ec1124820a63d0a28952e3ed45d18b19df46c4ad5a7219e1
|
|
| MD5 |
e1eea1897b9b03247ffc4c0af21d3e7d
|
|
| BLAKE2b-256 |
f046cdea716e84b7e26bf2c2bec016d8a141693160673c4283d2749a4ac141ca
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_clients-0.2.0-py3-none-any.whl -
Subject digest:
f244ee4d6656d132ec1124820a63d0a28952e3ed45d18b19df46c4ad5a7219e1 - Sigstore transparency entry: 176047698
- Sigstore integration time:
-
Permalink:
Vladimir-Titov/ai-clients@c4ddd1e3e1f96402f7807e25aa7babed6711aa69 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/Vladimir-Titov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-publish.yml@c4ddd1e3e1f96402f7807e25aa7babed6711aa69 -
Trigger Event:
release
-
Statement type: