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]):
119
119
True, as it increases the likelihood of correct JSON input.
120
120
"""
121
121
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
125
125
"""Whether the handoff is enabled. Either a bool or a Callable that takes the run context and
126
126
agent and returns whether the handoff is enabled. You can use this to dynamically enable/disable
127
127
a handoff based on your context/state."""
@@ -264,7 +264,7 @@ async def _invoke_handoff(
264
264
async def _is_enabled (ctx : RunContextWrapper [Any ], agent_base : AgentBase [Any ]) -> bool :
265
265
from .agent import Agent
266
266
267
- assert callable (is_enabled ), "is_enabled must be non-null here"
267
+ assert callable (is_enabled ), "is_enabled must be callable here"
268
268
assert isinstance (agent_base , Agent ), "Can't handoff to a non-Agent"
269
269
result = is_enabled (ctx , agent_base )
270
270
You can’t perform that action at this time.
0 commit comments