Create credit for AI-generated content.
(
author_name: impl Into<String>,
author_email: Option<impl Into<String>>,
vendor: AIVendor,
model: impl Into<String>,
change_hash: Hash,
timestamp: Dat
| 239 | |
| 240 | /// Create credit for AI-generated content. |
| 241 | pub fn ai_generated( |
| 242 | author_name: impl Into<String>, |
| 243 | author_email: Option<impl Into<String>>, |
| 244 | vendor: AIVendor, |
| 245 | model: impl Into<String>, |
| 246 | change_hash: Hash, |
| 247 | timestamp: DateTime<Utc>, |
| 248 | confidence: Option<f32>, |
| 249 | ) -> Self { |
| 250 | Self { |
| 251 | author_name: author_name.into(), |
| 252 | author_email: author_email.map(Into::into), |
| 253 | credit_type: CreditType::AiGenerated, |
| 254 | ai_vendor: Some(vendor), |
| 255 | ai_model: Some(model.into()), |
| 256 | change_hash, |
| 257 | timestamp, |
| 258 | confidence: confidence.map(|c| (c.clamp(0.0, 1.0) * 100.0) as u8), |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | /// Create credit for collaborative human+AI content. |
| 263 | pub fn collaborative( |
nothing calls this directly
no outgoing calls
no test coverage detected