Skip to content

Commit 720458f

Browse files
committed
Fix CR
1 parent f62a12b commit 720458f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/agents/tool_context.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
from dataclasses import KW_ONLY, dataclass, fields
1+
from dataclasses import fields
22
from typing import Any
33

44
from .run_context import RunContextWrapper, TContext
55

66

7-
@dataclass
87
class ToolContext(RunContextWrapper[TContext]):
98
"""The context of a tool call."""
109

11-
_: KW_ONLY
1210
tool_call_id: str
1311
"""The ID of the tool call."""
1412

13+
def __init__(self, *args: Any, tool_call_id: str, **kwargs: Any):
14+
super().__init__(*args, **kwargs)
15+
self.tool_call_id = tool_call_id
16+
1517
@classmethod
1618
def from_agent_context(
1719
cls, context: RunContextWrapper[TContext], tool_call_id: str

0 commit comments

Comments
 (0)