Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

![PyPI - Version](https://img.shields.io/pypi/v/tinfoil)
[![Integration](https://github.com/tinfoilsh/tinfoil-python/actions/workflows/integration.yml/badge.svg)](https://github.com/tinfoilsh/tinfoil-python/actions/workflows/integration.yml)
[![Documentation](https://img.shields.io/badge/docs-tinfoil.sh-blue)](https://docs.tinfoil.sh/sdk/python-sdk)

A Python client for secure AI model inference through Tinfoil.

Expand All @@ -13,6 +14,8 @@ pip install tinfoil

## Usage

The Tinfoil SDK automatically selects a router enclave and verifies it against the official GitHub repository. You just need to provide your API key:

```python
import os
from tinfoil import TinfoilAI
Expand Down Expand Up @@ -67,7 +70,6 @@ client = AsyncTinfoilAI(
)

async def main() -> None:
# start a streaming chat completion
stream = await client.chat.completions.create(
model="llama3-3-70b",
messages=[{"role": "user", "content": "Say this is a test"}],
Expand Down Expand Up @@ -128,11 +130,9 @@ Run unit and integration tests:
pytest -q
```

Integration tests require environment variables:
Integration tests require the `TINFOIL_API_KEY` environment variable:

```bash
export TINFOIL_ENCLAVE="..."
export TINFOIL_REPO="..."
export TINFOIL_API_KEY="..."
pytest -q -m integration
```