pub struct PromptShapeCompared {
pub tools: ShapePart,
pub run: ShapePart,
pub upper_bound: u64,
pub changed: ShapeChanged,
}Expand description
prompt_shape_compared: one request’s cache shape where a prompt
cache looks at it, and which of its regions moved since the request
before it in the same run.
The four segments are deliberately absent: prompt_assembled,
written immediately before this line, already states each one’s hash
and length, and a second copy here would be a second home for them.
What this adds are the two regions that record never names - the tool
table and the conversation - and the comparison itself.
Fields§
§tools: ShapePart§run: ShapePart§upper_bound: u64The most bytes this request can be billed as input, counted from
the parts above and the segments prompt_assembled states, added
with checked arithmetic.
changed: ShapeChangedTrait Implementations§
Source§impl Clone for PromptShapeCompared
impl Clone for PromptShapeCompared
Source§impl Debug for PromptShapeCompared
impl Debug for PromptShapeCompared
Source§impl<'de> Deserialize<'de> for PromptShapeCompared
impl<'de> Deserialize<'de> for PromptShapeCompared
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
impl Eq for PromptShapeCompared
Source§impl PartialEq for PromptShapeCompared
impl PartialEq for PromptShapeCompared
Source§impl Serialize for PromptShapeCompared
impl Serialize for PromptShapeCompared
impl StructuralPartialEq for PromptShapeCompared
Auto Trait Implementations§
impl Freeze for PromptShapeCompared
impl RefUnwindSafe for PromptShapeCompared
impl Send for PromptShapeCompared
impl Sync for PromptShapeCompared
impl Unpin for PromptShapeCompared
impl UnsafeUnpin for PromptShapeCompared
impl UnwindSafe for PromptShapeCompared
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