@@ -190,14 +190,14 @@ def __iter__(self: AgentExecutorIterator) -> Iterator[AddableDict]:
190190 name = self .run_name ,
191191 )
192192 try :
193- while self .agent_executor ._should_continue (
193+ while self .agent_executor ._should_continue ( # noqa: SLF001
194194 self .iterations ,
195195 self .time_elapsed ,
196196 ):
197197 # take the next step: this plans next action, executes it,
198198 # yielding action and observation as they are generated
199199 next_step_seq : NextStepOutput = []
200- for chunk in self .agent_executor ._iter_next_step (
200+ for chunk in self .agent_executor ._iter_next_step ( # noqa: SLF001
201201 self .name_to_tool_map ,
202202 self .color_mapping ,
203203 self .inputs ,
@@ -214,7 +214,7 @@ def __iter__(self: AgentExecutorIterator) -> Iterator[AddableDict]:
214214 yield AddableDict (steps = [chunk ], messages = chunk .messages )
215215
216216 # convert iterator output to format handled by _process_next_step_output
217- next_step = self .agent_executor ._consume_next_step (next_step_seq )
217+ next_step = self .agent_executor ._consume_next_step (next_step_seq ) # noqa: SLF001
218218 # update iterations and time elapsed
219219 self .update_iterations ()
220220 # decide if this is the final output
@@ -258,14 +258,14 @@ async def __aiter__(self) -> AsyncIterator[AddableDict]:
258258 )
259259 try :
260260 async with asyncio_timeout (self .agent_executor .max_execution_time ):
261- while self .agent_executor ._should_continue (
261+ while self .agent_executor ._should_continue ( # noqa: SLF001
262262 self .iterations ,
263263 self .time_elapsed ,
264264 ):
265265 # take the next step: this plans next action, executes it,
266266 # yielding action and observation as they are generated
267267 next_step_seq : NextStepOutput = []
268- async for chunk in self .agent_executor ._aiter_next_step (
268+ async for chunk in self .agent_executor ._aiter_next_step ( # noqa: SLF001
269269 self .name_to_tool_map ,
270270 self .color_mapping ,
271271 self .inputs ,
@@ -288,7 +288,7 @@ async def __aiter__(self) -> AsyncIterator[AddableDict]:
288288 )
289289
290290 # convert iterator output to format handled by _process_next_step
291- next_step = self .agent_executor ._consume_next_step (next_step_seq )
291+ next_step = self .agent_executor ._consume_next_step (next_step_seq ) # noqa: SLF001
292292 # update iterations and time elapsed
293293 self .update_iterations ()
294294 # decide if this is the final output
@@ -336,7 +336,7 @@ def _process_next_step_output(
336336 # Check for tool return
337337 if len (next_step_output ) == 1 :
338338 next_step_action = next_step_output [0 ]
339- tool_return = self .agent_executor ._get_tool_return (next_step_action )
339+ tool_return = self .agent_executor ._get_tool_return (next_step_action ) # noqa: SLF001
340340 if tool_return is not None :
341341 return self ._return (tool_return , run_manager = run_manager )
342342
@@ -364,7 +364,7 @@ async def _aprocess_next_step_output(
364364 # Check for tool return
365365 if len (next_step_output ) == 1 :
366366 next_step_action = next_step_output [0 ]
367- tool_return = self .agent_executor ._get_tool_return (next_step_action )
367+ tool_return = self .agent_executor ._get_tool_return (next_step_action ) # noqa: SLF001
368368 if tool_return is not None :
369369 return await self ._areturn (tool_return , run_manager = run_manager )
370370
@@ -376,7 +376,7 @@ def _stop(self, run_manager: CallbackManagerForChainRun) -> AddableDict:
376376 """
377377 logger .warning ("Stopping agent prematurely due to triggering stop condition" )
378378 # this manually constructs agent finish with output key
379- output = self .agent_executor ._action_agent .return_stopped_response (
379+ output = self .agent_executor ._action_agent .return_stopped_response ( # noqa: SLF001
380380 self .agent_executor .early_stopping_method ,
381381 self .intermediate_steps ,
382382 ** self .inputs ,
@@ -389,7 +389,7 @@ async def _astop(self, run_manager: AsyncCallbackManagerForChainRun) -> AddableD
389389 the stopped response.
390390 """
391391 logger .warning ("Stopping agent prematurely due to triggering stop condition" )
392- output = self .agent_executor ._action_agent .return_stopped_response (
392+ output = self .agent_executor ._action_agent .return_stopped_response ( # noqa: SLF001
393393 self .agent_executor .early_stopping_method ,
394394 self .intermediate_steps ,
395395 ** self .inputs ,
@@ -404,7 +404,7 @@ def _return(
404404 """
405405 Return the final output of the iterator.
406406 """
407- returned_output = self .agent_executor ._return (
407+ returned_output = self .agent_executor ._return ( # noqa: SLF001
408408 output ,
409409 self .intermediate_steps ,
410410 run_manager = run_manager ,
@@ -421,7 +421,7 @@ async def _areturn(
421421 """
422422 Return the final output of the async iterator.
423423 """
424- returned_output = await self .agent_executor ._areturn (
424+ returned_output = await self .agent_executor ._areturn ( # noqa: SLF001
425425 output ,
426426 self .intermediate_steps ,
427427 run_manager = run_manager ,
0 commit comments