pub struct CacheKeyGenerator;Expand description
Cache key generator utilities
Implementations§
Source§impl CacheKeyGenerator
impl CacheKeyGenerator
Sourcepub fn llm_prompt_key(
model: &str,
prompt: &str,
params: &[(&str, &str)],
) -> String
pub fn llm_prompt_key( model: &str, prompt: &str, params: &[(&str, &str)], ) -> String
Generate cache key for LLM prompt
Creates a deterministic cache key based on:
- Model name
- Prompt text
- Configuration parameters (temperature, max_tokens, etc.)
Sourcepub fn code_execution_key(
runtime: &str,
code: &str,
input_vars: &HashMap<String, String>,
) -> String
pub fn code_execution_key( runtime: &str, code: &str, input_vars: &HashMap<String, String>, ) -> String
Generate cache key for code execution
Auto Trait Implementations§
impl Freeze for CacheKeyGenerator
impl RefUnwindSafe for CacheKeyGenerator
impl Send for CacheKeyGenerator
impl Sync for CacheKeyGenerator
impl Unpin for CacheKeyGenerator
impl UnwindSafe for CacheKeyGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more