@@ -519,18 +519,24 @@ def __init__(self):
519
519
test_mock = {"llm_call" : lambda * args , ** kwargs : "Response text" },
520
520
)
521
521
522
- def llm_call (self , input_data : AIStructuredResponseGeneratorBlock .Input ) -> str :
522
+ def llm_call (
523
+ self ,
524
+ input_data : AIStructuredResponseGeneratorBlock .Input ,
525
+ credentials : APIKeyCredentials ,
526
+ ) -> str :
523
527
block = AIStructuredResponseGeneratorBlock ()
524
- response = block .run_once (input_data , "response" )
528
+ response = block .run_once (input_data , "response" , credentials = credentials )
525
529
self .merge_stats (block .execution_stats )
526
530
return response ["response" ]
527
531
528
- def run (self , input_data : Input , ** kwargs ) -> BlockOutput :
532
+ def run (
533
+ self , input_data : Input , * , credentials : APIKeyCredentials , ** kwargs
534
+ ) -> BlockOutput :
529
535
object_input_data = AIStructuredResponseGeneratorBlock .Input (
530
536
** {attr : getattr (input_data , attr ) for attr in input_data .model_fields },
531
537
expected_format = {},
532
538
)
533
- yield "response" , self .llm_call (object_input_data )
539
+ yield "response" , self .llm_call (object_input_data , credentials )
534
540
535
541
536
542
class SummaryStyle (Enum ):
0 commit comments