Skip to main content

Module llm_cache

Module llm_cache 

Source
Expand description

LLM 调用缓存实现

基于内存的 LRU 缓存,缓存重复的 LLM 调用结果。 支持可选的 TTL 过期和最大条目限制。

Structs§

CacheConfig
缓存配置
CachedLLMResult
缓存的 LLM 结果,包含过期时间
LLMCache
LLM 调用缓存

Enums§

CacheError
Error type for the LLM cache.