pub struct PeriodConfig {
pub mode: CacheKeepWarm,
pub ttl: CacheTtl,
pub model: String,
pub max_tokens: u64,
pub interval_override: Option<Duration>,
pub auto_max_hours: u32,
pub reply_tokens: Option<u64>,
}Expand description
What the period needs to know about the session at start.
Fields§
§mode: CacheKeepWarm§ttl: CacheTtlThe configured cache_ttl (the honoured one is derived from it).
model: String§max_tokens: u64The ping’s max_tokens (worst-case output).
interval_override: Option<Duration>Replaces ping_interval(honoured TTL) (test seam only).
auto_max_hours: u32Longest an auto period may run, in hours
(cache_keepwarm_auto_max_hours; 0 = no cap). <N>h ignores it.
reply_tokens: Option<u64>Tokens of the last reply that the cached prefix will actually hold
(thinking stripped on resend, see
runtime::keepwarm::reply_prefix_tokens). None: the reply’s
billed output_tokens.
Trait Implementations§
Source§impl Clone for PeriodConfig
impl Clone for PeriodConfig
Auto Trait Implementations§
impl Freeze for PeriodConfig
impl RefUnwindSafe for PeriodConfig
impl Send for PeriodConfig
impl Sync for PeriodConfig
impl Unpin for PeriodConfig
impl UnsafeUnpin for PeriodConfig
impl UnwindSafe for PeriodConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.