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):
256256
257257 if  (
258258 self .prompt  is  not   None 
259-  and  not  isinstance (self .prompt , ( Prompt ,  DynamicPromptFunction ) )
259+  and  not  isinstance (self .prompt , dict )
260260 and  not  callable (self .prompt )
261261 ):
262262 raise  TypeError (
@@ -297,10 +297,11 @@ def __post_init__(self):
297297 f"got { type (self .output_type ).__name__ }  " 
298298 )
299299
300+  # Fixed hooks validation - use AgentHooksBase instead of generic AgentHooks 
300301 if  self .hooks  is  not   None :
301-  from  .lifecycle  import  AgentHooks 
302+  from  .lifecycle  import  AgentHooksBase 
302303
303-  if  not  isinstance (self .hooks , AgentHooks ):
304+  if  not  isinstance (self .hooks , AgentHooksBase ):
304305 raise  TypeError (
305306 f"Agent hooks must be an AgentHooks instance or None, " 
306307 f"got { type (self .hooks ).__name__ }  " 
                                 You can’t perform that action at this time. 
               
                  
0 commit comments