#[derive(Debug, Clone, Default)]
pub struct HashOpts {
pub ignore_field_names: Vec<&'static str>,
}
impl HashOpts {
pub fn new() -> Self {
Self::default()
}
pub fn ignore(mut self, field: &'static str) -> Self {
self.ignore_field_names.push(field);
self
}
pub fn anthropic() -> Self {
Self {
ignore_field_names: vec![
"cache_control",
"id",
"usage",
"stop_reason",
"stop_sequence",
],
}
}
pub fn openai() -> Self {
Self {
ignore_field_names: vec![
"created",
"id",
"object",
"system_fingerprint",
"usage",
"finish_reason",
],
}
}
pub fn bedrock() -> Self {
Self {
ignore_field_names: vec!["cache_control", "usage", "stopReason", "metrics"],
}
}
pub fn gemini() -> Self {
Self {
ignore_field_names: vec!["usageMetadata", "safetyRatings", "finishReason"],
}
}
}