pub struct PromptAnalysis {
pub sections: Vec<String>,
pub xml_tags: Vec<String>,
pub xml_tag_counts: HashMap<String, usize>,
pub has_cache_boundary: bool,
pub estimated_tokens: usize,
pub char_count: usize,
pub line_count: usize,
}Expand description
Analysis result for a prompt
Fields§
§sections: Vec<String>Detected sections
Detected XML tags
xml_tag_counts: HashMap<String, usize>XML tag counts
has_cache_boundary: boolHas cache boundary
estimated_tokens: usizeEstimated tokens
char_count: usizeCharacter count
line_count: usizeLine count
Implementations§
Source§impl PromptAnalysis
impl PromptAnalysis
Sourcepub fn print_summary(&self)
pub fn print_summary(&self)
Print analysis summary
Trait Implementations§
Source§impl Clone for PromptAnalysis
impl Clone for PromptAnalysis
Source§fn clone(&self) -> PromptAnalysis
fn clone(&self) -> PromptAnalysis
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 PromptAnalysis
impl Debug for PromptAnalysis
Source§impl Default for PromptAnalysis
impl Default for PromptAnalysis
Source§fn default() -> PromptAnalysis
fn default() -> PromptAnalysis
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PromptAnalysis
impl<'de> Deserialize<'de> for PromptAnalysis
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 PromptAnalysis
impl RefUnwindSafe for PromptAnalysis
impl Send for PromptAnalysis
impl Sync for PromptAnalysis
impl Unpin for PromptAnalysis
impl UnsafeUnpin for PromptAnalysis
impl UnwindSafe for PromptAnalysis
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