Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/a2a/server/tasks/task_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def update_status(
async def add_artifact(
self,
parts: list[Part],
artifact_id: str = str(uuid.uuid4()),
artifact_id: str | None = None,
name: str | None = None,
metadata: dict[str, Any] | None = None,
):
Expand All @@ -82,6 +82,9 @@ async def add_artifact(
append: Optional boolean indicating if this chunk appends to a previous one.
last_chunk: Optional boolean indicating if this is the last chunk.
"""
if not artifact_id:
artifact_id = str(uuid.uuid4())

await self.event_queue.enqueue_event(
TaskArtifactUpdateEvent(
taskId=self.task_id,
Expand Down