Catalog PyPI
PACKAGE EXPLORERView in registry

ai71

PyPI

The official Python library for the AI71 API

Versions collected1
Direct dependencies3From release 1.0.1
Last observed21 Oct, 09:49 UTC

README

Version 1.0.1 documentation

Developers building Python 3.8+ apps can now interact seamlessly with the AI71 API thanks to the ai71 Python library. It includes built-in type checking for both requests and responses, and provides both synchronous and asynchronous HTTP clients powered by httpx.

Documentation

The API documentation can be found here.

Installation

pip install ai71

Usage

Define AI71_API_KEY environment variable or provide api_key in AI71 and AsyncAI71.

import os
from ai71 import AI71

client = AI71()

chat_completion = client.chat.completions.create(
    messages=[{"role": "user", "content": "What is your name?"}],
    model="tiiuae/falcon-180B-chat",
)

# Fetch supported models
model_list = client.models.list()

Async Usage

import asyncio

from ai71 import AsyncAI71

client = AsyncAI71()


async def main():
    stream = await client.chat.completions.create(
        messages=[{"role": "user", "content": "What is your name?"}],
        model="tiiuae/falcon-180B-chat",
        stream=True,
    )
    async for chunk in stream:
        print(chunk.choices[0].delta.content or "", end="")

    # Fetch supported models
    model_list = await client.models.list()


asyncio.run(main())

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.116 Apr 20253

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:49 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:591a819359e6b65cbe4de2a4a1c6cd8c64c5af4d7b3de9bc831b892d4281284e