pub struct MemoryPolicy {
pub carry_summaries: usize,
pub summary_provider: Option<String>,
pub max_summary_chars: usize,
pub namespaces: Namespaces,
pub max_retrieved: usize,
}Expand description
The whole memory policy: carry-forward within a run, namespaces across runs.
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.
namespaces: NamespacesCross-run memory.
max_retrieved: usizeMost records a single retrieval may return.
Trait Implementations§
Source§impl Clone for MemoryPolicy
impl Clone for MemoryPolicy
Source§impl Debug for MemoryPolicy
impl Debug for MemoryPolicy
Source§impl Default for MemoryPolicy
impl Default for MemoryPolicy
Source§impl<'de> Deserialize<'de> for MemoryPolicy
impl<'de> Deserialize<'de> for MemoryPolicy
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>,
Source§impl JsonSchema for MemoryPolicy
impl JsonSchema for MemoryPolicy
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more