Skip to content

Commit dabee47

Browse files
committed
refactor(types): add default id for task context
1 parent 339a74a commit dabee47

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/strands_env/core/types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from __future__ import annotations
1818

1919
import logging
20+
import uuid
2021
from abc import ABC, abstractmethod
2122
from enum import Enum
2223
from typing import Any
@@ -41,6 +42,7 @@ class TaskContext(BaseModel):
4142

4243
model_config = ConfigDict(extra="allow")
4344

45+
id: str = Field(default_factory=lambda: str(uuid.uuid4()))
4446
ground_truth: Any = None
4547
conversation_history: Messages = Field(default_factory=list)
4648

0 commit comments

Comments
 (0)