8000 refactor: rename parameter name and add type annotation of _get_agent… · linuxem/adk-python@98c8a71 · GitHub
[go: up one dir, main page]

Skip to content

Commit 98c8a71

Browse files
seanzhougooglecopybara-github
authored andcommitted
refactor: rename parameter name and add type annotation of _get_agent_to_run method
PiperOrigin-RevId: 763234780
1 parent b0fb353 commit 98c8a71

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/google/adk/flows/llm_flows/base_llm_flow.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -472,14 +472,12 @@ async def _postprocess_handle_function_calls_async(
472472
yield event
473473

474474
def _get_agent_to_run(
475-
self, invocation_context: InvocationContext, transfer_to_agent
475+
self, invocation_context: InvocationContext, agent_name: str
476476
) -> BaseAgent:
477477
root_agent = invocation_context.agent.root_agent
478-
agent_to_run = root_agent.find_agent(transfer_to_agent)
478+
agent_to_run = root_agent.find_agent(agent_name)
479479
if not agent_to_run:
480-
raise ValueError(
481-
f'Agent {transfer_to_agent} not found in the agent tree.'
482-
)
480+
raise ValueError(f'Agent {agent_name} not found in the agent tree.')
483481
return agent_to_run
484482

485483
async def _call_llm_async(

0 commit comments

Comments
 (0)
0