Official Python SDK for Reno AI API
Project description
Reno AI SDK
Official Python client for the Reno API.
Installation
pip install .
Quick Start
from renoai import Reno
client = Reno(api_key="reno_sk_xxx")
# Single-turn
answer = client.ask("What is Python?")
print(answer)
# Multi-turn chat
response = client.chat([
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"},
])
print(response.text)
# Streaming
for token in client.stream_text("Tell me a story"):
print(token, end="", flush=True)
# Stateful conversation
from renoai import Conversation
conv = Conversation(client, system="You are a pirate.")
print(conv.say("Hello!"))
print(conv.say("What is your ship called?"))
Error Handling
from renoai import RenoError, RenoConnectionError, RenoTimeoutError, RenoValidationError
try:
answer = client.ask("Hello")
except RenoValidationError as e:
print("Bad input:", e.message)
except RenoConnectionError:
print("Could not reach the server")
except RenoTimeoutError:
print("Request timed out")
except RenoError as e:
print(e.user_friendly())
if e.is_retryable:
print(f"Retry after {e.retry_after}s")
Running Tests
pip install pytest
pytest tests/ -v
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
renoai-0.1.5.tar.gz
(17.6 kB
view details)
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
renoai-0.1.5-py3-none-any.whl
(12.7 kB
view details)
File details
Details for the file renoai-0.1.5.tar.gz.
File metadata
- Download URL: renoai-0.1.5.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3e0f9fa1393a3acadc0ffeb91b88d969c3665f384c7d621d6e9bc36761487f6
|
|
| MD5 |
a46e15a9a60f568c9456537588b5305d
|
|
| BLAKE2b-256 |
5393e54aa2c791e9f4aa80b8e9eb643b838f376b7811db33acfa1f7cca8ea40c
|
File details
Details for the file renoai-0.1.5-py3-none-any.whl.
File metadata
- Download URL: renoai-0.1.5-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4edbfaa5245bdd3fe697a1b6e4e6a4997f22d048f9acc2491a41b5dc19262bf
|
|
| MD5 |
59defa18bb96065e0960b91c90824ac9
|
|
| BLAKE2b-256 |
5cda23f097b858fe00e6d71d55a65b214d6a4052fba1e665fc73e2c5e82c3fb9
|