File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ def __post_init__(self):
256
256
257
257
if (
258
258
self .prompt is not None
259
- and not isinstance (self .prompt , ( Prompt , DynamicPromptFunction ) )
259
+ and not isinstance (self .prompt , dict )
260
260
and not callable (self .prompt )
261
261
):
262
262
raise TypeError (
@@ -297,10 +297,11 @@ def __post_init__(self):
297
297
f"got { type (self .output_type ).__name__ } "
298
298
)
299
299
300
+ # Fixed hooks validation - use AgentHooksBase instead of generic AgentHooks
300
301
if self .hooks is not None :
301
- from .lifecycle import AgentHooks
302
+ from .lifecycle import AgentHooksBase
302
303
303
- if not isinstance (self .hooks , AgentHooks ):
304
+ if not isinstance (self .hooks , AgentHooksBase ):
304
305
raise TypeError (
305
306
f"Agent hooks must be an AgentHooks instance or None, "
306
307
f"got { type (self .hooks ).__name__ } "
You can’t perform that action at this time.
0 commit comments