Skip to main content

Crate embed_key

Crate embed_key 

Source
Expand description

§embed-key

Deterministic 64-char cache key for an embedding request.

Mixes the text with (provider, model, dimensionality) so a single shared cache can hold embeddings from multiple providers/models without false hits.

§Example

use embed_key::key;
let k = key("openai", "text-embedding-3-large", 3072, "hello world");
assert_eq!(k.len(), 64);

Functions§

key
Build a 64-char hex cache key.