src/pqc_content_provenance/assertions/ai_generated.py
| 1 | """Assertion: this content was generated by AI (C2PA c2pa.ai_generated).""" |
| 2 | |
| 3 | from __future__ import annotations |
| 4 | |
| 5 | from dataclasses import dataclass, field |
| 6 | from typing import ClassVar |
| 7 | |
| 8 | from pqc_content_provenance.assertions.base import Assertion |
| 9 | |
| 10 | |
| 11 | @dataclass |
| 12 | class AIGeneratedAssertion(Assertion): |
| 13 | """C2PA-compatible assertion that this content was AI-generated.""" |
| 14 | |
| 15 | label: ClassVar[str] = "c2pa.ai_generated" |
| 16 | |
| 17 | model_name: str = "" # e.g. "Llama-3-8B-Instruct" |
| 18 | model_version: str = "" # e.g. "1.0" |
| 19 | model_did: str = "" # e.g. "did:pqaid:..." for this model's signer |
| 20 | generator_type: str = "text" # text | image | audio | video | multimodal |
| 21 | human_edited: bool = False # was it post-edited by a human? |
| 22 | generation_params: dict = field(default_factory=dict) # temperature, top_p, seed, etc. |
| 23 | |