Metadata-Version: 2.4
Name: hermes-px
Version: 0.0.1
Summary: Secure AI inference proxy library with Tor routing — Drop-in OpenAI SDK replacement
Author: EGen Labs
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests<3.0.0,>=2.31.0
Requires-Dist: requests[socks]<3.0.0,>=2.31.0
Requires-Dist: python-dotenv<2.0.0,>=1.0.0
Provides-Extra: rag
Requires-Dist: chromadb<1.0.0,>=0.4.0; extra == "rag"
Requires-Dist: watchdog<5.0.0,>=3.0.0; extra == "rag"
Requires-Dist: tiktoken<1.0.0,>=0.5.0; extra == "rag"
Requires-Dist: sentence-transformers<4.0.0,>=2.2.0; extra == "rag"
Requires-Dist: PyMuPDF<2.0.0,>=1.23.0; extra == "rag"
Requires-Dist: python-docx<2.0.0,>=1.0.0; extra == "rag"
Requires-Dist: Pillow<12.0.0,>=10.0.0; extra == "rag"
Requires-Dist: pytesseract<1.0.0,>=0.3.10; extra == "rag"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 🏛️ Hermes — Secure AI Inference Proxy

A lightweight, production-grade Python SDK providing a **1:1 drop-in replacement** for the OpenAI Python library with automatic Tor proxy routing. No API keys required.

---

## Features

- **OpenAI SDK Compatible** — `client.chat.completions.create()` works identically
- **Tor Proxy Routing** — All traffic routes through configurable SOCKS5 proxy chains
- **Built-in RAG** — Local document ingestion with sentence-transformers embeddings
- **Structured Errors** — Granular exception hierarchy for robust error handling
- **Zero Config** — Works out of the box with sensible defaults

## Installation

```bash
pip install hermes-px
```

**Requires:** A running Tor daemon (default: `127.0.0.1:9050`)

## Quick Start

```python
from hermes import Hermes

with Hermes() as client:
    response = client.chat.completions.create(
        model="OLYMPUS-1",
        messages=[{"role": "user", "content": "Hello!"}]
    )
    print(response.choices[0].message.content)
```

## Migrating from OpenAI

```diff
- from openai import OpenAI
- client = OpenAI(api_key="sk-...")
+ from hermes import Hermes
+ client = Hermes()

  response = client.chat.completions.create(
      model="OLYMPUS-1",
      messages=[{"role": "user", "content": "Hello!"}]
  )
```

## Error Handling

```python
from hermes import Hermes, HermesConnectionError, HermesTimeoutError

try:
    response = client.chat.completions.create(messages=[...])
except HermesConnectionError:
    print("Tor proxy unreachable.")
except HermesTimeoutError:
    print("Request timed out.")
```

## Documentation

Full documentation available at the [project repository](https://github.com/EGenLabs/hermes).

## License

MIT — Use responsibly. Ensure Tor is operational for proxy routing.
