@@ -118,7 +118,7 @@ class RunConfig:
118118
119119class Runner (abc .ABC ):
120120 @abc .abstractmethod
121- async def run_impl (
121+ async def _run_impl (
122122 self ,
123123 starting_agent : Agent [TContext ],
124124 input : str | list [TResponseInputItem ],
@@ -132,7 +132,7 @@ async def run_impl(
132132 pass
133133
134134 @abc .abstractmethod
135- def run_sync_impl (
135+ def _run_sync_impl (
136136 self ,
137137 starting_agent : Agent [TContext ],
138138 input : str | list [TResponseInputItem ],
@@ -146,7 +146,7 @@ def run_sync_impl(
146146 pass
147147
148148 @abc .abstractmethod
149- def run_streamed_impl (
149+ def _run_streamed_impl (
150150 self ,
151151 starting_agent : Agent [TContext ],
152152 input : str | list [TResponseInputItem ],
@@ -197,7 +197,7 @@ async def run(
197197 agent. Agents may perform handoffs, so we don't know the specific type of the output.
198198 """
199199 runner = DEFAULT_RUNNER or DefaultRunner ()
200- return await runner .run_impl (
200+ return await runner ._run_impl (
201201 starting_agent ,
202202 input ,
203203 context = context ,
@@ -249,7 +249,7 @@ def run_sync(
249249 agent. Agents may perform handoffs, so we don't know the specific type of the output.
250250 """
251251 runner = DEFAULT_RUNNER or DefaultRunner ()
252- return runner .run_sync_impl (
252+ return runner ._run_sync_impl (
253253 starting_agent ,
254254 input ,
255255 context = context ,
@@ -297,7 +297,7 @@ def run_streamed(
297297 A result object that contains data about the run, as well as a method to stream events.
298298 """
299299 runner = DEFAULT_RUNNER or DefaultRunner ()
300- return runner .run_streamed_impl (
300+ return runner ._run_streamed_impl (
301301 starting_agent ,
302302 input ,
303303 context = context ,
@@ -339,7 +339,7 @@ def _get_model(cls, agent: Agent[Any], run_config: RunConfig) -> Model:
339339
340340
341341class DefaultRunner (Runner ):
342- async def run_impl (
342+ async def _run_impl (
343343 self ,
344344 starting_agent : Agent [TContext ],
345345 input : str | list [TResponseInputItem ],
@@ -488,7 +488,7 @@ async def run_impl(
488488 if current_span :
489489 current_span .finish (reset_current = True )
490490
491- def run_sync_impl (
491+ def _run_sync_impl (
492492 self ,
493493 starting_agent : Agent [TContext ],
494494 input : str | list [TResponseInputItem ],
@@ -511,7 +511,7 @@ def run_sync_impl(
511511 )
512512 )
513513
514- def run_streamed_impl (
514+ def _run_streamed_impl (
515515 self ,
516516 starting_agent : Agent [TContext ],
517517 input : str | list [TResponseInputItem ],
@@ -564,7 +564,7 @@ def run_streamed_impl(
564564
565565 # Kick off the actual agent loop in the background and return the streamed result object.
566566 streamed_result ._run_impl_task = asyncio .create_task (
567- self ._run_streamed_impl (
567+ self ._start_streaming (
568568 starting_input = input ,
569569 streamed_result = streamed_result ,
570570 starting_agent = starting_agent ,
@@ -621,7 +621,7 @@ async def _run_input_guardrails_with_queue(
621621 streamed_result .input_guardrail_results = guardrail_results
622622
623623 @classmethod
624- async def _run_streamed_impl (
624+ async def _start_streaming (
625625 cls ,
626626 starting_input : str | list [TResponseInputItem ],
627627 streamed_result : RunResultStreaming ,
0 commit comments