uranusjr commented on code in PR #76015:
URL: https://github.com/apache/airflow/pull/76015#discussion_r4450668057


##########
providers/common/ai/src/airflow/providers/common/ai/durable/openai_agents.py:
##########
@@ -268,6 +282,23 @@ async def on_invoke_tool(ctx: ToolContext[Any], arguments: 
str) -> Any:
     return durable_tool
 
 
+def _is_durable_tool(tool: Tool) -> TypeGuard[FunctionTool]:
+    return isinstance(tool, FunctionTool) and not callable(tool.needs_approval)

Review Comment:
   This can be folded into its only call in `_get_durable_tool`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to