Metadata-Version: 2.5
Name: dejahit
Version: 0.1.0
Summary: Verified semantic cache for LLM apps: wrap your LLM call, repeated questions come from cache.
Project-URL: Homepage, https://dejahit.com
Project-URL: Documentation, https://dejahit.com/docs.html
Author-email: Hodolist <hello@dejahit.com>
License: MIT
Keywords: anthropic,cache,cost,latency,llm,openai,semantic-cache
Requires-Python: >=3.9
Requires-Dist: httpx>=0.25
Description-Content-Type: text/markdown

# dejahit (Python)

Stop paying for the same LLM answer twice. Wrap the call you already make; repeated questions come back from cache in milliseconds, and every reuse is verified before it is served.

```bash
pip install dejahit
```

```python
import os
from dejahit import Cache

cache = Cache(api_key=os.environ["DEJAHIT_KEY"])

answer = cache.ask(
    question,
    lambda: call_my_llm(question),   # runs only on a miss
    scope=["support-bot", "v3"],     # who may reuse this answer (required)
    ttl="24h",
)
```

- Your LLM call, key and model stay in your code.
- Never breaks your app: short lookup budget, circuit breaker, your errors pass through unchanged.
- `AsyncCache` for asyncio, `ask_stream` for streaming, shadow mode to measure savings before serving from cache.
- Requires an API key. In tests use `mode="off"` (always calls your function, caches nothing).

Get an API key at [dejahit.com](https://dejahit.com) · Docs: [dejahit.com/docs.html](https://dejahit.com/docs.html)
