File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -119,9 +119,9 @@ class Handoff(Generic[TContext, TAgent]):
119119 True, as it increases the likelihood of correct JSON input.
120120 """
121121
122- is_enabled : bool | Callable [[ RunContextWrapper [ Any ], AgentBase [ Any ]], MaybeAwaitable [ bool ]] = (
123- True
124- )
122+ is_enabled : bool | Callable [
123+ [ RunContextWrapper [ Any ], AgentBase [ Any ]], MaybeAwaitable [ bool ]
124+ ] = True
125125 """Whether the handoff is enabled. Either a bool or a Callable that takes the run context and
126126 agent and returns whether the handoff is enabled. You can use this to dynamically enable/disable
127127 a handoff based on your context/state."""
@@ -264,7 +264,7 @@ async def _invoke_handoff(
264264 async def _is_enabled (ctx : RunContextWrapper [Any ], agent_base : AgentBase [Any ]) -> bool :
265265 from .agent import Agent
266266
267- assert callable (is_enabled ), "is_enabled must be non-null here"
267+ assert callable (is_enabled ), "is_enabled must be callable here"
268268 assert isinstance (agent_base , Agent ), "Can't handoff to a non-Agent"
269269 result = is_enabled (ctx , agent_base )
270270
You can’t perform that action at this time.
0 commit comments