@@ -349,7 +349,7 @@ def _process_provider_response(
349349 action_type_str = "function"
350350 action_payload_dict = {
351351 "type" : "function" ,
352- "name" : "search " ,
352+ "name" : "goto " ,
353353 "arguments" : {"url" : "https://www.google.com" },
354354 }
355355 else :
@@ -567,34 +567,19 @@ async def run_task(
567567 )
568568 current_url = self .handler .page .url
569569
570- function_name_called_for_feedback = ""
571- if agent_action .action_type == "function" and isinstance (
572- agent_action .action .root , FunctionAction
573- ):
574- function_name_called_for_feedback = (
575- agent_action .action .root .name
576- )
577- self ._format_action_feedback (
578- function_name_called = function_name_called_for_feedback ,
579- action_result = action_result ,
580- new_screenshot_base64 = current_screenshot_b64 ,
581- current_url = current_url ,
582- function_call_args = function_call_args ,
570+ if not invoked_function_name :
571+ self .logger .error (
572+ "Original Google function name not found for feedback loop (was None)." ,
573+ category = "agent" ,
583574 )
584- else :
585- if not invoked_function_name :
586- self .logger .error (
587- "Original Google function name not found for feedback loop (was None)." ,
588- category = "agent" ,
589- )
590- else :
591- self ._format_action_feedback (
592- function_name_called = invoked_function_name ,
593- action_result = action_result ,
594- new_screenshot_base64 = current_screenshot_b64 ,
595- current_url = current_url ,
596- function_call_args = function_call_args ,
597- )
575+
576+ self ._format_action_feedback (
577+ function_name_called = invoked_function_name ,
578+ action_result = action_result ,
579+ new_screenshot_base64 = current_screenshot_b64 ,
580+ current_url = current_url ,
581+ function_call_args = function_call_args ,
582+ )
598583
599584 if task_completed :
600585 self .logger .info (
0 commit comments