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
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 22.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 260.59 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 27s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • MukundaKatta/prompt-hash
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MukundaKatta

prompt-hash

crates.io

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

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.