pub struct LoggingPolicy {
pub prompt: LogDetail,
pub output: LogDetail,
pub retain_raw_bodies: bool,
}Expand description
Logging and redaction policy attached to a purpose.
Fields§
§prompt: LogDetailWhat may be logged about the prompt (system, messages, tools).
output: LogDetailWhat may be logged about the model output.
retain_raw_bodies: boolWhether raw provider bodies may be retained anywhere. Always false for
request-path purposes (spec §25.2).
Implementations§
Source§impl LoggingPolicy
impl LoggingPolicy
Sourcepub const METADATA_ONLY: Self
pub const METADATA_ONLY: Self
Metadata only for both directions, no raw bodies.
Sourcepub const REDACTED_OUTPUT: Self
pub const REDACTED_OUTPUT: Self
Metadata for the prompt, redacted output, no raw bodies.
Sourcepub const fn logs_content(&self) -> bool
pub const fn logs_content(&self) -> bool
Returns true when any content (beyond metadata) may be logged.
Trait Implementations§
Source§impl Clone for LoggingPolicy
impl Clone for LoggingPolicy
impl Copy for LoggingPolicy
Source§impl Debug for LoggingPolicy
impl Debug for LoggingPolicy
Source§impl<'de> Deserialize<'de> for LoggingPolicy
impl<'de> Deserialize<'de> for LoggingPolicy
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 LoggingPolicy
Source§impl Hash for LoggingPolicy
impl Hash for LoggingPolicy
Source§impl PartialEq for LoggingPolicy
impl PartialEq for LoggingPolicy
Source§impl Serialize for LoggingPolicy
impl Serialize for LoggingPolicy
impl StructuralPartialEq for LoggingPolicy
Auto Trait Implementations§
impl Freeze for LoggingPolicy
impl RefUnwindSafe for LoggingPolicy
impl Send for LoggingPolicy
impl Sync for LoggingPolicy
impl Unpin for LoggingPolicy
impl UnsafeUnpin for LoggingPolicy
impl UnwindSafe for LoggingPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.