File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
pydantic_ai_slim/pydantic_ai Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -452,18 +452,10 @@ async def run(
452
452
453
453
history : _History = _convert_history (run_input .messages )
454
454
455
- output_type_ : OutputSpec [OutputDataT | DeferredToolCalls | RunOutputDataT ]
456
- if output_type is None :
457
- # Use the agent's output type if not specified.
458
- output_type_ = [self .agent .output_type , DeferredToolCalls ]
459
- else :
460
- output_type_ = [output_type , DeferredToolCalls ]
461
-
462
455
run : AgentRun [AgentDepsT , Any ]
463
456
async with self .agent .iter (
464
457
user_prompt = None ,
465
- # TODO(steve): Could or should it just accept: [output_type, DeferredToolCalls]
466
- output_type = output_type_ ,
458
+ output_type = [output_type or self .agent .output_type , DeferredToolCalls ],
467
459
message_history = history .messages ,
468
460
model = model ,
469
461
deps = deps ,
You can’t perform that action at this time.
0 commit comments