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 db85a6d commit 86361a3Copy full SHA for 86361a3
src/agents/tool.py
@@ -24,6 +24,7 @@
24
from .items import RunItem
25
from .logger import logger
26
from .run_context import RunContextWrapper
27
+from .strict_schema import ensure_strict_json_schema
28
from .tool_context import ToolContext
29
from .tracing import SpanError
30
from .util import _error_tracing
@@ -93,6 +94,10 @@ class FunctionTool:
93
94
and returns whether the tool is enabled. You can use this to dynamically enable/disable a tool
95
based on your context/state."""
96
97
+ def __post_init__(self):
98
+ if self.strict_json_schema:
99
+ self.params_json_schema = ensure_strict_json_schema(self.params_json_schema)
100
+
101
102
@dataclass
103
class FileSearchTool:
0 commit comments