pub struct PromptDumper { /* private fields */ }Expand description
Prompt dumper for observability
Implementations§
Source§impl PromptDumper
impl PromptDumper
Sourcepub fn enable_file_dump<P: Into<PathBuf>>(self, path: P) -> Self
pub fn enable_file_dump<P: Into<PathBuf>>(self, path: P) -> Self
Enable file dumping
Sourcepub fn enable_print(self) -> Self
pub fn enable_print(self) -> Self
Enable stdout printing
Sourcepub fn with_session(self, session_id: String) -> Self
pub fn with_session(self, session_id: String) -> Self
Set session ID
Sourcepub fn with_buffer_size(self, size: usize) -> Self
pub fn with_buffer_size(self, size: usize) -> Self
Set buffer size
Sourcepub fn dump(&mut self, prompt: &AssembledPrompt)
pub fn dump(&mut self, prompt: &AssembledPrompt)
Dump an assembled prompt
Sourcepub fn dump_with_conversation(
&mut self,
prompt: &AssembledPrompt,
conversation_id: String,
)
pub fn dump_with_conversation( &mut self, prompt: &AssembledPrompt, conversation_id: String, )
Dump with conversation ID
Sourcepub fn analyze_prompt(prompt: &str) -> PromptAnalysis
pub fn analyze_prompt(prompt: &str) -> PromptAnalysis
Analyze prompt for debugging
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PromptDumper
impl RefUnwindSafe for PromptDumper
impl Send for PromptDumper
impl Sync for PromptDumper
impl Unpin for PromptDumper
impl UnsafeUnpin for PromptDumper
impl UnwindSafe for PromptDumper
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