We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc2ec77 commit 28e6899Copy full SHA for 28e6899
src/a2a/utils/task.py
@@ -89,14 +89,6 @@ def apply_history_length(task: Task, history_length: int | None) -> Task:
89
task.history[-history_length:] if history_length > 0 else []
90
)
91
# Create a new task instance with limited history
92
- return Task(
93
- id=task.id,
94
- context_id=task.context_id,
95
- status=task.status,
96
- artifacts=task.artifacts,
97
- history=limited_history,
98
- metadata=task.metadata,
99
- kind=task.kind,
100
- )
+ return task.model_copy(update={'history': limited_history})
101
102
return task
0 commit comments