pub struct LlmRequestSnapshot {
pub system: Option<Arc<str>>,
pub messages: Vec<Message>,
}Expand description
A snapshot of an LLM call request, containing only the fields needed for observability
to reconstruct the generation input (system prompt + full message history). Does not
include tools, sampling parameters, etc.
Defined separately rather than embedded in CompletionRequest to avoid making
AgentEvent depend on the full request type, and to keep the snapshot minimal and
serialization-stable.
Fields§
§system: Option<Arc<str>>The system prompt, if any. Observability reconstructs it as a single
{role:"system"} entry.
messages: Vec<Message>The full message history sent to the provider.
Trait Implementations§
Source§impl Clone for LlmRequestSnapshot
impl Clone for LlmRequestSnapshot
Source§fn clone(&self) -> LlmRequestSnapshot
fn clone(&self) -> LlmRequestSnapshot
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 LlmRequestSnapshot
impl Debug for LlmRequestSnapshot
Source§impl Default for LlmRequestSnapshot
impl Default for LlmRequestSnapshot
Source§fn default() -> LlmRequestSnapshot
fn default() -> LlmRequestSnapshot
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LlmRequestSnapshot
impl<'de> Deserialize<'de> for LlmRequestSnapshot
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
Source§impl PartialEq for LlmRequestSnapshot
impl PartialEq for LlmRequestSnapshot
Source§fn eq(&self, other: &LlmRequestSnapshot) -> bool
fn eq(&self, other: &LlmRequestSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LlmRequestSnapshot
impl Serialize for LlmRequestSnapshot
impl StructuralPartialEq for LlmRequestSnapshot
Auto Trait Implementations§
impl Freeze for LlmRequestSnapshot
impl RefUnwindSafe for LlmRequestSnapshot
impl Send for LlmRequestSnapshot
impl Sync for LlmRequestSnapshot
impl Unpin for LlmRequestSnapshot
impl UnsafeUnpin for LlmRequestSnapshot
impl UnwindSafe for LlmRequestSnapshot
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