From 2c7a34259395b1294319118d0f3d1b3b867b44d6 Mon Sep 17 00:00:00 2001 From: Shangjie Chen Date: Tue, 14 Oct 2025 13:28:55 -0700 Subject: [PATCH] feat: Add create_time and mime_type to ArtifactVersion PiperOrigin-RevId: 819372593 --- src/google/adk/artifacts/base_artifact_service.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/google/adk/artifacts/base_artifact_service.py b/src/google/adk/artifacts/base_artifact_service.py index cc2a3a1e..da0f88f1 100644 --- a/src/google/adk/artifacts/base_artifact_service.py +++ b/src/google/adk/artifacts/base_artifact_service.py @@ -15,6 +15,7 @@ from __future__ import annotations from abc import ABC from abc import abstractmethod +from datetime import datetime from typing import Any from typing import Optional @@ -28,6 +29,10 @@ class ArtifactVersion(BaseModel): version: int """The version number of the artifact.""" + create_time: float = Field(default_factory=lambda: datetime.now().timestamp()) + """The creation time of the artifact version.""" + mime_type: Optional[str] = None + """The MIME type of the artifact version.""" canonical_uri: str """The canonical URI of the artifact version.""" custom_metadata: dict[str, Any] = Field(default_factory=dict)