pub struct ContextPolicy {
pub carry_summaries: usize,
pub summary_provider: Option<String>,
pub max_summary_chars: usize,
}Fields§
§carry_summaries: usizeHow many previous iteration summaries a node’s prompt carries.
0 disables carry-forward entirely. The default of 2 is enough for a
node to see what it just tried and what it tried before that, which is
what “do not repeat yourself” needs, without the prompt growing with the
run.
summary_provider: Option<String>Provider id used to write the optional narrative half of a summary.
Omit it and summaries are still written — the deterministic facts are always there. This only buys prose, and prose costs tokens every iteration, so it is opt-in.
max_summary_chars: usizeCeiling on the narrative, in characters. A summary that grows without limit defeats the purpose of having one.
Trait Implementations§
Source§impl Clone for ContextPolicy
impl Clone for ContextPolicy
Source§fn clone(&self) -> ContextPolicy
fn clone(&self) -> ContextPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextPolicy
impl Debug for ContextPolicy
Source§impl Default for ContextPolicy
impl Default for ContextPolicy
Source§impl<'de> Deserialize<'de> for ContextPolicy
impl<'de> Deserialize<'de> for ContextPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContextPolicy
impl RefUnwindSafe for ContextPolicy
impl Send for ContextPolicy
impl Sync for ContextPolicy
impl Unpin for ContextPolicy
impl UnsafeUnpin for ContextPolicy
impl UnwindSafe for ContextPolicy
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