langchainrust 0.2.18

A LangChain-inspired framework for building LLM applications in Rust. Supports OpenAI, Agents, Tools, Memory, Chains, RAG, BM25, Hybrid Retrieval, LangGraph, HyDE, Reranking, MultiQuery, and native Function Calling.
1
2
3
4
5
6
7
8
9
// src/core/cache/mod.rs
//! LLM 调用缓存
//!
//! 提供内存缓存功能,减少重复 LLM 调用。
//! 支持 TTL(过期时间)和最大条目数限制。

pub mod llm_cache;

pub use llm_cache::{LLMCache, CachedLLMResult, CacheConfig};