Skip to content

Commit 2812148

Browse files
author
Lukasz Kawka
committed
feat: Add extension support to TaskUpdater.add_artifact
1 parent 4186731 commit 2812148

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/a2a/server/tasks/task_updater.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ async def add_artifact( # noqa: PLR0913
9696
metadata: dict[str, Any] | None = None,
9797
append: bool | None = None,
9898
last_chunk: bool | None = None,
99+
extensions: list[str] | None = None,
99100
) -> None:
100101
"""Adds an artifact chunk to the task and publishes a `TaskArtifactUpdateEvent`.
101102
@@ -106,6 +107,7 @@ async def add_artifact( # noqa: PLR0913
106107
metadata: Optional metadata for the artifact.
107108
append: Optional boolean indicating if this chunk appends to a previous one.
108109
last_chunk: Optional boolean indicating if this is the last chunk.
110+
extensions: Optional list of extensions for the artifact.
109111
"""
110112
if not artifact_id:
111113
artifact_id = str(uuid.uuid4())
@@ -119,6 +121,7 @@ async def add_artifact( # noqa: PLR0913
119121
name=name,
120122
parts=parts,
121123
metadata=metadata,
124+
extensions=extensions,
122125
),
123126
append=append,
124127
last_chunk=last_chunk,

0 commit comments

Comments
 (0)