prompt-hash 0.1.0

Deterministic cache key for an LLM prompt: normalize whitespace, hash messages, mix in model + temperature. Pairs with semantic-cache-key. Zero deps.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
# prompt-hash

[![crates.io](https://img.shields.io/crates/v/prompt-hash.svg)](https://crates.io/crates/prompt-hash)

Deterministic 64-char cache key for an LLM prompt. Whitespace-stable,
temperature quantized to 2 decimals.

```rust
use prompt_hash::key;
let k = key("claude-sonnet-4-5", &[("user", "what is 2+2?")], 1.0);
```

Zero deps. MIT or Apache-2.0.