File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
temporalio/contrib/openai_agents Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ def nexus_operation_as_tool(
161161 service : Type [Any ],
162162 endpoint : str ,
163163 schedule_to_close_timeout : Optional [timedelta ] = None ,
164+ strict_json_schema : bool = True ,
164165) -> Tool :
165166 """Convert a Nexus operation into an OpenAI agent tool.
166167
@@ -177,6 +178,7 @@ def nexus_operation_as_tool(
177178 fn: A Nexus operation to convert into a tool.
178179 service: The Nexus service class that contains the operation.
179180 endpoint: The Nexus endpoint to use for the operation.
181+ strict_json_schema: Whether the tool should follow a strict schema
180182
181183 Returns:
182184 An OpenAI agent tool that wraps the provided operation.
@@ -237,7 +239,7 @@ async def run_operation(ctx: RunContextWrapper[Any], input: str) -> Any:
237239 description = schema .description or "" ,
238240 params_json_schema = schema .params_json_schema ,
239241 on_invoke_tool = run_operation ,
240- strict_json_schema = True ,
242+ strict_json_schema = strict_json_schema ,
241243 )
242244
243245
You can’t perform that action at this time.
0 commit comments