# Reno AI SDK

Official Python client for the Reno API.

## Installation

```bash
pip install .
```

## Quick Start

```python
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

```python
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

```bash
pip install pytest
pytest tests/ -v
```
