Skip to content

Commit 4767c5c

Browse files
committed
Enable strict JSON schema validation in FunctionTool configuration
1 parent ebd34f2 commit 4767c5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples-v2/openai_agents/durable_ai_agent_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ async def run_activity(ctx: RunContextWrapper[Any], input: str) -> Any:
8080
docstring_style=None,
8181
description_override=description,
8282
use_docstring_info=True,
83-
strict_json_schema=False,
83+
strict_json_schema=True,
8484
)
8585

8686
return FunctionTool(
8787
name=schema.name,
8888
description=schema.description or "",
8989
params_json_schema=schema.params_json_schema,
9090
on_invoke_tool=run_activity,
91-
strict_json_schema=False,
91+
strict_json_schema=True,
9292
)

0 commit comments

Comments
 (0)