pub struct BreakpointPlan { /* private fields */ }Expand description
The breakpoints one request carries: every segment edge but the last, and the tail of the conversation when there is one.
The run segment’s edge carries none because the tail anchor sits
right after it and covers it, and a fifth breakpoint is one the
provider refuses (CACHE_BREAKPOINTS_MAX). The tail is the last
message rather than the last assistant message: trailing tool results
ride in the last message, and anchoring before them pays for them
again on every request (crates/runtime/spec/Turn.lean §8-6).
Implementations§
Source§impl BreakpointPlan
impl BreakpointPlan
Sourcepub fn for_conversation(messages: &[ChatMessage]) -> BreakpointPlan
pub fn for_conversation(messages: &[ChatMessage]) -> BreakpointPlan
The plan for a request carrying messages.
Sourcepub fn marks_edge(slot: SegmentSlot) -> bool
pub fn marks_edge(slot: SegmentSlot) -> bool
Whether the end of slot carries a breakpoint. The edges do not
depend on the conversation, so a request built without one (a
probe) asks the same question.
Sourcepub fn message_breakpoint(&self) -> MessageBreakpoint
pub fn message_breakpoint(&self) -> MessageBreakpoint
The message breakpoint a request carries under this plan, so a request carries exactly the message breakpoint the plan names.
Sourcepub fn breakpoints(&self) -> Vec<Breakpoint>
pub fn breakpoints(&self) -> Vec<Breakpoint>
Every breakpoint in request order: the edges, then the tail.