Skip to main content

CachingConfig

Defined in the config module.
Rust AI Agent SDK Configuration for caching behavior

Fields

NameTypeDescription
enabledboolEnable response caching
prompt_cachingboolEnable prompt caching (provider-specific)
ttl_secsOption<u64>Cache TTL in seconds

Methods

new

fn new() -> Self
Create a new caching config

disabled

fn disabled(mut self) -> Self
Disable caching

with_prompt_caching

fn with_prompt_caching(mut self) -> Self
Enable prompt caching

ttl

fn ttl(mut self, secs: u64) -> Self
Set TTL Parameters:
NameType
secsu64

Source

View on GitHub

praisonai/src/config.rs at line 643