Skip to content

Commit 2424d6a

Browse files
google-genai-botcopybara-github
authored andcommitted
feat: Reorder create_time and mime_type to ArtifactVersion
Before: http://sponge2/ba05f9ac-c13d-43b6-bb8a-3e1b029cc705(failed) After: http://sponge2/a623ba76-62c1-4d17-b4b6-22044333a801 PiperOrigin-RevId: 819896989
1 parent 36c96ec commit 2424d6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/google/adk/artifacts/base_artifact_service.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from abc import ABC
1717
from abc import abstractmethod
18+
from datetime import datetime
1819
from typing import Any
1920
from typing import Optional
2021

@@ -32,6 +33,10 @@ class ArtifactVersion(BaseModel):
3233
"""The canonical URI of the artifact version."""
3334
custom_metadata: dict[str, Any] = Field(default_factory=dict)
3435
"""A dictionary of custom metadata associated with the artifact version."""
36+
create_time: float = Field(default_factory=lambda: datetime.now().timestamp())
37+
"""The creation time of the artifact version."""
38+
mime_type: Optional[str] = None
39+
"""The MIME type of the artifact version."""
3540

3641

3742
class BaseArtifactService(ABC):

0 commit comments

Comments
 (0)